<font size=2 face="sans-serif">Dear Everyone,</font>
<br>
<br><font size=2 face="sans-serif">In the message below, Bryan reports
that Xy-pic 3.8 has problems with diagrams generated from Qcircuit. Since
we have a maintenance release coming up (3.8.6 with Daniel's xypdf 1.7),
any help with a quick solution from anyone who has experienced similar
problems would be most welcome!</font>
<br>
<br><font size=2 face="sans-serif">Bryan and Steve: if you can submit a
complete TeX document to the list (as .tex and .pdf attachments), which,
when typeset, explains and demonstrates the problem then that will probably
facilitate a solution.</font>
<br>
<br><font size=2 face="sans-serif">Thanks to all,</font>
<br><font size=2 face="sans-serif"> Kris</font>
<br>
<br><font size=2 face="sans-serif">[1]</font><a href=http://www.cquic.org/Qcircuit/><font size=2 face="sans-serif">http://www.cquic.org/Qcircuit/</font></a>
<br><font size=2 face="sans-serif">__<br>
Kristoffer H Rose, ph.d. <krisrose@us.ibm.com> +1(914)784-7642 (fax
-6324)<br>
IBM T.J.Watson Research Center, PO Box 704, Yorktown Heights, NY 10598<br>
</font>
<br><font size=1 color=#800080 face="sans-serif">----- Forwarded by Kristoffer
H Rose/Watson/IBM on 03/09/2011 06:51 PM -----</font>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>Bryan Eastin <beastin@gmail.com></b>
</font>
<p><font size=1 face="sans-serif">03/08/2011 11:33 AM</font>
<td width=59%>
<table width=100%>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td><font size=1 face="sans-serif">krisrose@tug.org</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td><font size=1 face="sans-serif">Steve Flammia <sflammia@gmail.com></font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td><font size=1 face="sans-serif">Xy-pic and Qcircuit</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br><tt><font size=2>Hi,<br>
<br>
I am one of the authors of Qcircuit, a macro package for drawing<br>
quantum circuits used by many researchers working in quantum<br>
computing. (See, for example, </font></tt><a href=http://arxiv.org/pdf/0710.2560><tt><font size=2>http://arxiv.org/pdf/0710.2560</font></tt></a><tt><font size=2>
or<br>
</font></tt><a href="http://arxiv.org/pdf/quant-ph/0504097"><tt><font size=2>http://arxiv.org/pdf/quant-ph/0504097</font></tt></a><tt><font size=2>
.)<br>
<br>
Qcircuit is based on Xy-pic version 3.7. It has been widely used
in<br>
the community for about 7 years, but lately I have begun to receive<br>
complaints that it is broken. I've done some investigating, and it<br>
turns out that some of the changes made this summer to Xy-pic in the<br>
3.8 release have broken Qcircuit. As users slowly upgrade their LaTeX<br>
distributions, the problems spread.<br>
<br>
I've tried to isolate what's going wrong, and I think I've identified<br>
all of the problems (Roughly. I don't know enough to dig around<br>
inside Xy-pic.). I'm not sure if these are bugs in the new release
or<br>
intentional changes, but I've catalogued the issues at the end of this<br>
email.<br>
<br>
If they're bugs then please consider this a bug report and a heartfelt<br>
request for some kind of fix. If they're not bugs I would be very<br>
grateful for any advice on how I might circumvent these features.<br>
<br>
If you're interested in knowing more about Qcircuit, the package has a<br>
webpage at </font></tt><a href=http://www.cquic.org/Qcircuit/><tt><font size=2>http://www.cquic.org/Qcircuit/</font></tt></a><tt><font size=2>
. I believe it is presently<br>
the most commonly used method for typesetting quantum circuits.<br>
<br>
Thank you for your time,<br>
Bryan Eastin<br>
<br>
[I have CC'd this email to Steven Flammia, the other author of Qcircuit.]<br>
<br>
<br>
<br>
%The following examples were generated using MikTeX version 2.7 and<br>
Xy-pic version 2.8.5 on a Windows XP machine. Not all of these<br>
problems<br>
%seem to manifest on machines running TeXLive on Ubuntu or Mac. Some<br>
variant of the first issue happens on all systems, though an error<br>
%message is not always generated.<br>
<br>
%Problem:<br>
%Cannot draw an arrow to an entry of xymatrix of size 0em.<br>
%Qcircuit command broken:<br>
%\Qcircuit<br>
%Example code:<br>
\xymatrix @*[o] @*=<0em> {<br>
& \ar @{-} [0,-1] & \ar @{-} [0,-1]<br>
}<br>
%Resultant error message:<br>
%Xy-pic Warning: division overflow [FixQcircuit:51]<br>
%<br>
%! Arithmetic overflow.<br>
%<recently read> \quotPTK@<br>
%Hack:<br>
%Set the default entry size in \xymatrix to .05em. Smaller sizes<br>
somehow result in bigger gaps.<br>
%The hack is undesirable because:<br>
%Arrows meeting at an empty entry no longer connect. Important!<br>
<br>
%Problem:<br>
%The \frm command no longer works on null objects.<br>
%Qcircuit command broken:<br>
%\targ<br>
%Example code:<br>
\xy <0em,0em>*+<.8em>\frm{o}\endxy<br>
%Resultant error message:<br>
%None.<br>
%Hack:<br>
%Insert a very tiny object.<br>
%E.g., for \targ, use the code {\xy {<0em,0em> \ar @{ - } +<.39em,0em><br>
\ar @{ - } -<.39em,0em> \ar @{ - } +<0em,.39em> \ar @{ - }<br>
-<0em,.39em>},<0em,0em>*{\rule{.01em}{.01em}}*+<.8em>\frm{o}\endxy}<br>
%The hack is undesirable because:<br>
%Aside from being inelegant, it requires a change to the original<br>
code, which has already been widely distributed. Less important.<br>
<br>
%Problem:<br>
%Erratic generation of Division Overflow Errors.<br>
%Qcircuit command broken:<br>
%Uncertain.<br>
%Example code:<br>
%The following works.<br>
\xymatrix @*[o] @*=<0.09em> @R=1.7em @C=1em {<br>
& \ar @{-} [1,1] \ar @{-} [0,-1] & & *{a} \ar @{-} [0,-1]
\\<br>
& \ar @{-} [-1,1] \ar @{-} [0,-1] & & *{a} \ar @{-} [0,-1]<br>
}<br>
%The following doesn't work:<br>
\xymatrix @*[o] @*=<0.1em> @R=1.7em @C=1em {<br>
& \ar @{-} [1,1] \ar @{-} [0,-1] & & *{a} \ar @{-} [0,-1]
\\<br>
& \ar @{-} [-1,1] \ar @{-} [0,-1] & & *{a} \ar @{-} [0,-1]<br>
}<br>
%The following works.<br>
\xymatrix @*[o] @*=<0.11em> @R=1.7em @C=1em {<br>
& \ar @{-} [1,1] \ar @{-} [0,-1] & & *{a} \ar @{-} [0,-1]
\\<br>
& \ar @{-} [-1,1] \ar @{-} [0,-1] & & *{a} \ar @{-} [0,-1]<br>
}<br>
%Resultant error message:<br>
%Xy-pic Warning: division overflow [FixQcircuit:82]<br>
%<br>
%! Arithmetic overflow.<br>
%<recently read> \quotPTK@<br>
%Hack:<br>
%Use a different number?<br>
%The hack is undesirable because:<br>
%I have no idea what will work when or whether a workable alternative<br>
will always be available.<br>
<br>
%Problem:<br>
%Arrows connect poorly to empty entries in \xymatrix<br>
%Qcircuit command broken:<br>
%\link<br>
%Example code:<br>
\xymatrix @*[o] @*=<0.01em> @R=1.7em @C=1em {<br>
& \ar @{-} [1,1] \ar @{-} [0,-1] & & \ar @{-} [0,-1]
\\<br>
& \ar @{-} [-1,1] \ar @{-} [0,-1] & & \ar @{-} [0,-1]<br>
}<br>
%Resultant error message:<br>
%None.<br>
%Hack:<br>
%Insert a very tiny object.<br>
%E.g.,<br>
\xymatrix @*[o] @*=<0.01em> @R=1.7em @C=1em {<br>
& *{\rule{.01em}{.01em}} \ar @{-} [1,1] \ar @{-} [0,-1] &<br>
*{\rule{.01em}{.01em}} & \ar @{-} [0,-1] \\<br>
& *{\rule{.01em}{.01em}} \ar @{-} [-1,1] \ar @{-} [0,-1] &<br>
*{\rule{.01em}{.01em}} & \ar @{-} [0,-1]<br>
}<br>
%The hack is undesirable because:<br>
%The connections still don't look quite right. Moderately important.<br>
</font></tt>