0

I'm currently trying to draw this circuit in the quantikz package: quantum circuit

This is what I have so far (+ the output):

\begin{quantikz}
  \lstick{$\ket{x_1}$} & \gate{NOT} & \gate[2]{NAND} &            &                & \\
  \lstick{$\ket{x_2}$} & \gate{NOT} &                & \gate{NOT} & \gate[2]{NAND} & \qw \\
  \lstick{$\ket{x_3}$} & \gate{NOT} & \qw            & \qw        &                &
\end{quantikz}

quantum circuit tikz output

I feel like I'm pretty close here, but the main difference is that I'm not sure how to make the first NAND output be in the center of the gate -- it seems like it needs to stay with the ket{x_2} row. Is there any way to get the output to look similar to the drawn image, while using the quantikz package?

Thanks for your time!

bz0
  • 1
  • 1
    It looks like you're trying to draw a wholly classical circuit for which circuitikz would be much more appropriate. quantikz is explicitly for quantum circuits, in which the number of inputs and outputs of a quantum gate should always match. – Dai Bowen May 06 '23 at 23:21
  • 1
    Gotcha! I'll look into circuitikz in that case. Thank you! – bz0 May 06 '23 at 23:24
  • With circuitikz you can do that using classic shapes for gates, either IEEE https://tex.stackexchange.com/a/684376/38080 or European https://tex.stackexchange.com/questions/684906/use-circle-of-output-negation-for-input-negation-with-circuitikz – Rmano May 07 '23 at 16:29

0 Answers0