[Xy-pic] Fw: Xy-pic and Qcircuit
Bryan Eastin
beastin at gmail.com
Sun Mar 20 16:40:51 CET 2011
Hi everyone,
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.
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/20110320/3d0da618/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: exampleError1c.tex
Type: application/x-tex
Size: 1163 bytes
Desc: not available
URL: <http://tug.org/pipermail/xy-pic/attachments/20110320/3d0da618/attachment-0004.tex>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: exampleError1c.log
Type: text/x-log
Size: 26340 bytes
Desc: not available
URL: <http://tug.org/pipermail/xy-pic/attachments/20110320/3d0da618/attachment-0004.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: exampleError1c.pdf
Type: application/pdf
Size: 28557 bytes
Desc: not available
URL: <http://tug.org/pipermail/xy-pic/attachments/20110320/3d0da618/attachment-0003.pdf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: exampleError2c.tex
Type: application/x-tex
Size: 1204 bytes
Desc: not available
URL: <http://tug.org/pipermail/xy-pic/attachments/20110320/3d0da618/attachment-0005.tex>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: exampleError2c.log
Type: text/x-log
Size: 7793 bytes
Desc: not available
URL: <http://tug.org/pipermail/xy-pic/attachments/20110320/3d0da618/attachment-0005.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: exampleError2c.pdf
Type: application/pdf
Size: 38679 bytes
Desc: not available
URL: <http://tug.org/pipermail/xy-pic/attachments/20110320/3d0da618/attachment-0004.pdf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: exampleError3c.tex
Type: application/x-tex
Size: 2117 bytes
Desc: not available
URL: <http://tug.org/pipermail/xy-pic/attachments/20110320/3d0da618/attachment-0006.tex>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: exampleError3c.log
Type: text/x-log
Size: 12843 bytes
Desc: not available
URL: <http://tug.org/pipermail/xy-pic/attachments/20110320/3d0da618/attachment-0006.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: exampleError3c.pdf
Type: application/pdf
Size: 41072 bytes
Desc: not available
URL: <http://tug.org/pipermail/xy-pic/attachments/20110320/3d0da618/attachment-0005.pdf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: exampleError4c.tex
Type: application/x-tex
Size: 1608 bytes
Desc: not available
URL: <http://tug.org/pipermail/xy-pic/attachments/20110320/3d0da618/attachment-0007.tex>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: exampleError4c.log
Type: text/x-log
Size: 31390 bytes
Desc: not available
URL: <http://tug.org/pipermail/xy-pic/attachments/20110320/3d0da618/attachment-0007.bin>
More information about the xy-pic
mailing list