Hi everyone,<br><br>I've compiled each of the TeX files containing error examples using a fresh Ubuntu 10.10 install, the 2009-10 version of TeXLive, and Xy-pic 2.8.5 (I replaced 2.7 manually). On this system, everything produces the correct output except the fourth example. Lots of warnings are generated for all but the second example, however. I suspect that it is the handling of these warning situations that's causing the problem on some systems.<br>
<br>Bryan<br><br><br><br><div class="gmail_quote">On Wed, Mar 9, 2011 at 5:03 PM, Kristoffer H Rose <span dir="ltr"><<a href="mailto:krisrose@us.ibm.com" target="_blank">krisrose@us.ibm.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><font face="sans-serif" size="2">Dear Everyone,</font>
<br>
<br><font face="sans-serif" size="2">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 face="sans-serif" size="2">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 face="sans-serif" size="2">Thanks to all,</font>
<br><font face="sans-serif" size="2"> Kris</font>
<br>
<br><font face="sans-serif" size="2">[1]</font><a href="http://www.cquic.org/Qcircuit/" target="_blank"><font face="sans-serif" size="2">http://www.cquic.org/Qcircuit/</font></a>
<br><font face="sans-serif" size="2">__<br>
Kristoffer H Rose, ph.d. <<a href="mailto:krisrose@us.ibm.com" target="_blank">krisrose@us.ibm.com</a>> <a href="tel:%2B1%28914%29784-7642" target="_blank">+1(914)784-7642</a> (fax
-6324)<br>
IBM T.J.Watson Research Center, PO Box 704, Yorktown Heights, NY 10598<br>
</font>
<br><font color="#800080" face="sans-serif" size="1">----- Forwarded by Kristoffer
H Rose/Watson/IBM on 03/09/2011 06:51 PM -----</font>
<br>
<table width="100%">
<tbody><tr valign="top">
<td width="40%"><div><font face="sans-serif" size="1"><b>Bryan Eastin <<a href="mailto:beastin@gmail.com" target="_blank">beastin@gmail.com</a>></b>
</font>
</div><p><font face="sans-serif" size="1">03/08/2011 11:33 AM</font>
</p></td><td width="59%">
<table width="100%">
<tbody><tr valign="top">
<td>
<div align="right"><font face="sans-serif" size="1">To</font></div>
</td><td><font face="sans-serif" size="1"><a href="mailto:krisrose@tug.org" target="_blank">krisrose@tug.org</a></font>
</td></tr><tr valign="top">
<td>
<div align="right"><font face="sans-serif" size="1">cc</font></div>
</td><td><div><font face="sans-serif" size="1">Steve Flammia <<a href="mailto:sflammia@gmail.com" target="_blank">sflammia@gmail.com</a>></font>
</div></td></tr><tr valign="top">
<td>
<div align="right"><font face="sans-serif" size="1">Subject</font></div>
</td><td><font face="sans-serif" size="1">Xy-pic and Qcircuit</font></td></tr></tbody></table>
<br>
<table>
<tbody><tr valign="top">
<td>
</td><td></td></tr></tbody></table>
<br></td></tr></tbody></table><div><div></div><div>
<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" target="_blank"><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" target="_blank"><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/" target="_blank"><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></div></div></blockquote></div><br>