Trouble generating quantum gates images

45 views
Skip to first unread message

eusta...@gmail.com

unread,
Mar 17, 2016, 6:14:13 PM3/17/16
to QuTiP: Quantum Toolbox in Python
Hello all,

I'm having trouble generating quantum gates images when using one of the methods exemplified in QIP examples.  An alternate method works suggesting I at least have the prerequisite packages installed (had to install pdf2svg and ImageMagick).  I attach a jupyter nb file showing the two.

specifically, command:

Image(filename='images/toffoli.png')

yields an error, and inspection of my local directory shows 'images/xxx.png' file is not being created.

I'd much appreciate some help in resolving this.

Thank you in advance,

eustace
qgate_image_gen.ipynb

Paul Nation

unread,
Mar 18, 2016, 12:58:07 PM3/18/16
to QuTiP Group
At present you need the following libraries, and have them on your path, to use the features that you want:

pdflatex, pdfcrop, pdf2svg, imagemagick (convert)

These are easy to satisfy on Linux, but somewhat more difficult to do on OSX and Win.


--
You received this message because you are subscribed to the Google Groups "QuTiP: Quantum Toolbox in Python" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qutip+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<qgate_image_gen.ipynb>

eusta...@gmail.com

unread,
Mar 18, 2016, 1:40:01 PM3/18/16
to QuTiP: Quantum Toolbox in Python, eusta...@gmail.com
Uploading rendered PDF version of attachment.
qgate_image_gen.pdf

eustace

unread,
Mar 18, 2016, 1:44:48 PM3/18/16
to qu...@googlegroups.com
Hello Paul,
Thank you for the fast response.  These requirements are already satisfied, so I doubt if they are the cause.  ‘convert’ was installed as part of ImageMagick installation.

ariel-2:hw eustace$ pwd
/Volumes/Terra/Users/eustace/Dropbox/wksps/2016sp/repos/2016sp/hw
ariel-2:hw eustace$ which pdflatex
/Library/TeX/texbin/pdflatex
ariel-2:hw eustace$ which pdf2svg
/usr/local/bin/pdf2svg
ariel-2:hw eustace$ which pdfcrop
/Library/TeX/texbin/pdfcrop
ariel-2:hw eustace$ which convert
/usr/local/bin/convert
ariel-2:hw eustace$ 

I attach rendered output with error message if it helps:

qgate_image_gen.pdf
Reply all
Reply to author
Forward
0 new messages