2

I need to combine some quantum circuit as a node between arrows. Does everybody know how to put a quantum circuit as a point inside xymatrix?

Here is an example of the code

\[\xymatrix@C+=3cm{
  A
  \ar @{~)} @<3ex> [r]
    & 
  B 
 \Qcircuit @C=1em @R=.7em {
   & \multimeasureD{1}{\text{Bell}} &\\
   & \ghost{\text{Bell}}
 \ar @2 @<-1ex> @[l]
 }\]

I'm expecting to get something like this

qcircuit element as a node in xymatrix

but it turns out not working.

  • Welcome to TeX.SE! Please take a moment to take our Tour! You may also want to look at what makes a good Minimal Working Example (MWE) – Tavrock Jan 31 '17 at 17:03
2

I don't think you can nest \Qcircuit in \xymatrix. You can use a box, though.

\documentclass{article}
\usepackage{amsmath}
\usepackage[all,cmtip]{xy}
\usepackage{qcircuit}

\newsavebox{\cicabox}

\begin{document}

\[
\sbox\cicabox{%
  \Qcircuit @C=1em @R=.7em {
    & \multimeasureD{1}{\text{Bell}} &\\
    & \ghost{\text{Bell}}
  }%
}
\xymatrix@C+=3cm@R=0pt{
  A \ar@{~)}@<1ex>[r] &
  B
  \ar@{=>}@<1ex>[l]
  \\
  &\rlap{\hspace{-1em}\usebox{\cicabox}}
}
\]

\end{document}

enter image description here

  • Excellent! just what I need! :) Thanks a lot! – Cica Gustiani Jan 31 '17 at 9:57

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.