[Xy-pic] Fw: Xy-pic and Qcircuit

Bryan Eastin beastin at gmail.com
Thu Mar 10 07:14:40 CET 2011


Hi everyone,

First, thank you for trying to help us with this.

As requested, I have created a short LaTeX file demonstrating each error.  I
have included Qcircuit examples, so you'll need to have Qcircuit.tex in the
directory when you compile these (or somewhere else in your TeX tree).  I
have included the log files produced by each compilation and, when no errors
occurred, the output PDF.  In case it might be helpful, I have compiled a
version of each file using both Xy-pic version 3.7 and Xy-pic version
3.8.5.  Files ending in "a" are compiled with 3.8.5 and those ending with
"b" are compiled with 3.7.  The file exampleError4a.tex differs slightly
from exampleError4b.tex; I changed the latter so that it used the normal
\Qcircuit command, which I could not use in exampleError4a.tex since it
generates an error using Xy-pic 3.8.5 on my system.  Again, I'm running
MikTeX 2.7 on a Windows XP machine.

Additionally, I found that compiling with LaTeX (rather than PDFLaTeX) got
rid of the problem in exampleError2a.tex, but not any of the others.  The
command \xypdfoff didn't seem to have any effect.

Also, as requested, I included the \listfiles command in each document.

Thanks again,
Let me know if you need anything else,
Bryan



On Wed, Mar 9, 2011 at 5:03 PM, Kristoffer H Rose <krisrose at us.ibm.com>wrote:

> Dear Everyone,
>
> 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!
>
> 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.
>
> Thanks to all,
>         Kris
>
> [1]http://www.cquic.org/Qcircuit/
> __
> Kristoffer H Rose, ph.d. <krisrose at us.ibm.com> +1(914)784-7642 (fax -6324)
> IBM T.J.Watson Research Center, PO Box 704, Yorktown Heights, NY 10598
>
> ----- Forwarded by Kristoffer H Rose/Watson/IBM on 03/09/2011 06:51 PM
> -----
>  *Bryan Eastin <beastin at gmail.com>*
>
> 03/08/2011 11:33 AM
>   To
> krisrose at tug.org
> cc
> Steve Flammia <sflammia at gmail.com>
>  Subject
> Xy-pic and Qcircuit
>
>
>
>
> Hi,
>
> I am one of the authors of Qcircuit, a macro package for drawing
> quantum circuits used by many researchers working in quantum
> computing.  (See, for example, http://arxiv.org/pdf/0710.2560 or
> http://arxiv.org/pdf/quant-ph/0504097 .)
>
> Qcircuit is based on Xy-pic version 3.7.  It has been widely used in
> the community for about 7 years, but lately I have begun to receive
> complaints that it is broken.  I've done some investigating, and it
> turns out that some of the changes made this summer to Xy-pic in the
> 3.8 release have broken Qcircuit.  As users slowly upgrade their LaTeX
> distributions, the problems spread.
>
> I've tried to isolate what's going wrong, and I think I've identified
> all of the problems (Roughly.  I don't know enough to dig around
> inside Xy-pic.).  I'm not sure if these are bugs in the new release or
> intentional changes, but I've catalogued the issues at the end of this
> email.
>
> If they're bugs then please consider this a bug report and a heartfelt
> request for some kind of fix.  If they're not bugs I would be very
> grateful for any advice on how I might circumvent these features.
>
> If you're interested in knowing more about Qcircuit, the package has a
> webpage at http://www.cquic.org/Qcircuit/ .  I believe it is presently
> the most commonly used method for typesetting quantum circuits.
>
> Thank you for your time,
> Bryan Eastin
>
> [I have CC'd this email to Steven Flammia, the other author of Qcircuit.]
>
>
>
> %The following examples were generated using MikTeX version 2.7 and
> Xy-pic version 2.8.5 on a Windows XP machine.  Not all of these
> problems
> %seem to manifest on machines running TeXLive on Ubuntu or Mac.  Some
> variant of the first issue happens on all systems, though an error
> %message is not always generated.
>
> %Problem:
> %Cannot draw an arrow to an entry of xymatrix of size 0em.
> %Qcircuit command broken:
> %\Qcircuit
> %Example code:
> \xymatrix @*[o] @*=<0em> {
> & \ar @{-} [0,-1] & \ar @{-} [0,-1]
> }
> %Resultant error message:
> %Xy-pic Warning: division overflow [FixQcircuit:51]
> %
> %! Arithmetic overflow.
> %<recently read> \quotPTK@
> %Hack:
> %Set the default entry size in \xymatrix to .05em.  Smaller sizes
> somehow result in bigger gaps.
> %The hack is undesirable because:
> %Arrows meeting at an empty entry no longer connect.  Important!
>
> %Problem:
> %The \frm command no longer works on null objects.
> %Qcircuit command broken:
> %\targ
> %Example code:
> \xy <0em,0em>*+<.8em>\frm{o}\endxy
> %Resultant error message:
> %None.
> %Hack:
> %Insert a very tiny object.
> %E.g., for \targ, use the code {\xy {<0em,0em> \ar @{ - } +<.39em,0em>
> \ar @{ - } -<.39em,0em> \ar @{ - } +<0em,.39em> \ar @{ - }
> -<0em,.39em>},<0em,0em>*{\rule{.01em}{.01em}}*+<.8em>\frm{o}\endxy}
> %The hack is undesirable because:
> %Aside from being inelegant, it requires a change to the original
> code, which has already been widely distributed.  Less important.
>
> %Problem:
> %Erratic generation of Division Overflow Errors.
> %Qcircuit command broken:
> %Uncertain.
> %Example code:
> %The following works.
> \xymatrix @*[o] @*=<0.09em> @R=1.7em @C=1em {
> & \ar @{-} [1,1]  \ar @{-} [0,-1] & & *{a} \ar @{-} [0,-1] \\
> & \ar @{-} [-1,1] \ar @{-} [0,-1] & & *{a} \ar @{-} [0,-1]
> }
> %The following doesn't work:
> \xymatrix @*[o] @*=<0.1em> @R=1.7em @C=1em {
> & \ar @{-} [1,1]  \ar @{-} [0,-1] & & *{a} \ar @{-} [0,-1] \\
> & \ar @{-} [-1,1] \ar @{-} [0,-1] & & *{a} \ar @{-} [0,-1]
> }
> %The following works.
> \xymatrix @*[o] @*=<0.11em> @R=1.7em @C=1em {
> & \ar @{-} [1,1]  \ar @{-} [0,-1] & & *{a} \ar @{-} [0,-1] \\
> & \ar @{-} [-1,1] \ar @{-} [0,-1] & & *{a} \ar @{-} [0,-1]
> }
> %Resultant error message:
> %Xy-pic Warning: division overflow [FixQcircuit:82]
> %
> %! Arithmetic overflow.
> %<recently read> \quotPTK@
> %Hack:
> %Use a different number?
> %The hack is undesirable because:
> %I have no idea what will work when or whether a workable alternative
> will always be available.
>
> %Problem:
> %Arrows connect poorly to empty entries in \xymatrix
> %Qcircuit command broken:
> %\link
> %Example code:
> \xymatrix @*[o] @*=<0.01em> @R=1.7em @C=1em {
> & \ar @{-} [1,1]  \ar @{-} [0,-1] & & \ar @{-} [0,-1] \\
> & \ar @{-} [-1,1] \ar @{-} [0,-1] & & \ar @{-} [0,-1]
> }
> %Resultant error message:
> %None.
> %Hack:
> %Insert a very tiny object.
> %E.g.,
> \xymatrix @*[o] @*=<0.01em> @R=1.7em @C=1em {
> & *{\rule{.01em}{.01em}} \ar @{-} [1,1]  \ar @{-} [0,-1] &
> *{\rule{.01em}{.01em}} & \ar @{-} [0,-1] \\
> & *{\rule{.01em}{.01em}} \ar @{-} [-1,1] \ar @{-} [0,-1] &
> *{\rule{.01em}{.01em}} & \ar @{-} [0,-1]
> }
> %The hack is undesirable because:
> %The connections still don't look quite right.  Moderately important.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/xy-pic/attachments/20110309/2340dd84/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: exampleError4b.tex
Type: application/x-tex
Size: 1608 bytes
Desc: not available
URL: <http://tug.org/pipermail/xy-pic/attachments/20110309/2340dd84/attachment-0009.tex>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: exampleError1a.log
Type: application/octet-stream
Size: 6964 bytes
Desc: not available
URL: <http://tug.org/pipermail/xy-pic/attachments/20110309/2340dd84/attachment-0008.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: exampleError1a.tex
Type: application/x-tex
Size: 1163 bytes
Desc: not available
URL: <http://tug.org/pipermail/xy-pic/attachments/20110309/2340dd84/attachment-0010.tex>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: exampleError1b.log
Type: application/octet-stream
Size: 7132 bytes
Desc: not available
URL: <http://tug.org/pipermail/xy-pic/attachments/20110309/2340dd84/attachment-0009.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: exampleError1b.pdf
Type: application/pdf
Size: 16830 bytes
Desc: not available
URL: <http://tug.org/pipermail/xy-pic/attachments/20110309/2340dd84/attachment-0006.pdf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: exampleError1b.tex
Type: application/x-tex
Size: 1163 bytes
Desc: not available
URL: <http://tug.org/pipermail/xy-pic/attachments/20110309/2340dd84/attachment-0011.tex>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: exampleError2a.log
Type: application/octet-stream
Size: 8468 bytes
Desc: not available
URL: <http://tug.org/pipermail/xy-pic/attachments/20110309/2340dd84/attachment-0010.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: exampleError2a.pdf
Type: application/pdf
Size: 18107 bytes
Desc: not available
URL: <http://tug.org/pipermail/xy-pic/attachments/20110309/2340dd84/attachment-0007.pdf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: exampleError2a.tex
Type: application/x-tex
Size: 1204 bytes
Desc: not available
URL: <http://tug.org/pipermail/xy-pic/attachments/20110309/2340dd84/attachment-0012.tex>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: exampleError2b.log
Type: application/octet-stream
Size: 7581 bytes
Desc: not available
URL: <http://tug.org/pipermail/xy-pic/attachments/20110309/2340dd84/attachment-0011.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: exampleError2b.pdf
Type: application/pdf
Size: 21582 bytes
Desc: not available
URL: <http://tug.org/pipermail/xy-pic/attachments/20110309/2340dd84/attachment-0008.pdf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: exampleError2b.tex
Type: application/x-tex
Size: 1204 bytes
Desc: not available
URL: <http://tug.org/pipermail/xy-pic/attachments/20110309/2340dd84/attachment-0013.tex>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: exampleError3a.log
Type: application/octet-stream
Size: 10813 bytes
Desc: not available
URL: <http://tug.org/pipermail/xy-pic/attachments/20110309/2340dd84/attachment-0012.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: exampleError3a.tex
Type: application/x-tex
Size: 2117 bytes
Desc: not available
URL: <http://tug.org/pipermail/xy-pic/attachments/20110309/2340dd84/attachment-0014.tex>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: exampleError3b.log
Type: application/octet-stream
Size: 7290 bytes
Desc: not available
URL: <http://tug.org/pipermail/xy-pic/attachments/20110309/2340dd84/attachment-0013.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: exampleError3b.pdf
Type: application/pdf
Size: 23692 bytes
Desc: not available
URL: <http://tug.org/pipermail/xy-pic/attachments/20110309/2340dd84/attachment-0009.pdf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: exampleError3b.tex
Type: application/x-tex
Size: 2117 bytes
Desc: not available
URL: <http://tug.org/pipermail/xy-pic/attachments/20110309/2340dd84/attachment-0015.tex>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: exampleError4a.log
Type: application/octet-stream
Size: 14290 bytes
Desc: not available
URL: <http://tug.org/pipermail/xy-pic/attachments/20110309/2340dd84/attachment-0014.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: exampleError4a.pdf
Type: application/pdf
Size: 17801 bytes
Desc: not available
URL: <http://tug.org/pipermail/xy-pic/attachments/20110309/2340dd84/attachment-0010.pdf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: exampleError4a.tex
Type: application/x-tex
Size: 1772 bytes
Desc: not available
URL: <http://tug.org/pipermail/xy-pic/attachments/20110309/2340dd84/attachment-0016.tex>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: exampleError4b.log
Type: application/octet-stream
Size: 7031 bytes
Desc: not available
URL: <http://tug.org/pipermail/xy-pic/attachments/20110309/2340dd84/attachment-0015.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: exampleError4b.pdf
Type: application/pdf
Size: 20488 bytes
Desc: not available
URL: <http://tug.org/pipermail/xy-pic/attachments/20110309/2340dd84/attachment-0011.pdf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Qcircuit.tex
Type: application/x-tex
Size: 8801 bytes
Desc: not available
URL: <http://tug.org/pipermail/xy-pic/attachments/20110309/2340dd84/attachment-0017.tex>


More information about the xy-pic mailing list