-8

I need to draw this picture using tikz. Could you please tell me how can I do that?enter image description here

  • Can you add an MWE? – Sebastiano Jan 9 '17 at 21:54
  • First, read the rikz manual. You can locate points on the edge of a node by naming the node and using ($(name.north west)!.1!(name.south west)$) for example with the calc tikzlibrary. – John Kormylo Jan 9 '17 at 21:56
  • 13
    Maybe you could adapt the code provided in response to your earlier do-it-for-me at tex.stackexchange.com/questions/347862/…? Or are you going to simply keep posting pictures until somebody else has provided you with code for the lot? That is not how this site is supposed to work. – cfr Jan 9 '17 at 22:40
  • 1
    @cfr, and still no ducks requested... Nothing has been learned. :P – Guilherme Zanotelli Jan 10 '17 at 9:30
  • 1
    Why does your circuit have classical input but quantum output? This circuit does not make sense. Also the arrow is commonly used to denote the end of a circuit. – Henri Menke Jan 10 '17 at 12:44
5

For quantum circuits you can use the qcircuit package (which is based on xypic).

\documentclass{article}
\usepackage[braket]{qcircuit}
\begin{document}
\[
\def\p{\parbox{2.3cm}{\centering passive \\ interferometer}}
\def\s{\mbox{squeezer}}
\Qcircuit @C=1em @R=2ex {
  \lstick{1} & \multigate{5}{\p} & \gate{\s} & \multigate{1}{\p} & \rstick{\ket{\psi}} \qwa \\
  \lstick{2} & \ghost{\p}        & \gate{\s} & \ghost{\p}        & \qwa \\
  \lstick{3} & \ghost{\p}        & \qw       & \qw               & \qwa \\
  \lstick{4} & \ghost{\p}        & \qw       & \qw               & \qwa \\
  \rstick{\vdots} \\
  \lstick{k} & \ghost{\p}        & \qw       & \qw               & \qwa
}
\]
\end{document}

enter image description here

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.