答案1
以下是使用tikz
\documentclass[tikz, border = 3pt]{standalone}
\begin{document}
\begin{tikzpicture}
\node[draw, minimum size = 2em] (O) {$O_f$};
\node[coordinate] (f) [right of = O, node distance = 1.5cm]{};
\node[coordinate] (i) [left of = O, node distance = 1.5cm]{};
\draw[] (O) -- (f) node[right]{$f(i)$};
\draw[] (i) node[left]{$i$} -- (O);
\end{tikzpicture}
\end{document}
答案2
看起来像包裹电路应该可以解决问题。
\documentclass[]{standalone}
\usepackage{qcircuit}
\begin{document}
\Qcircuit @C=1em @R=.3em {
& \lstick{i} & \gate{O_f} & \rstick{f(i)} \qw
}
\end{document}