Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors when drawing Circuits #43

Closed
hellmersjl3ds opened this issue Jun 6, 2017 · 1 comment
Closed

Errors when drawing Circuits #43

hellmersjl3ds opened this issue Jun 6, 2017 · 1 comment

Comments

@hellmersjl3ds
Copy link

Whenever I try to show a circuit for example
qc0.png
I get the messages
`FileNotFoundError Traceback (most recent call last)
in ()
3 qc0 = QubitCircuit(N)
4 qc0.add_gate("SWAP", [0, 1], None)
----> 5 qc0.png

/home/jhellmers/anaconda3/lib/python3.6/site-packages/qutip/qip/circuit.py in png(self)
1012 def png(self):
1013 from IPython.display import Image
-> 1014 return Image(self.repr_png(), embed=True)
1015
1016 @Property

/home/jhellmers/anaconda3/lib/python3.6/site-packages/qutip/qip/circuit.py in repr_png(self)
1004
1005 def repr_png(self):
-> 1006 return _latex_compile(self.latex_code(), format="png")
1007
1008 def repr_svg(self):

/home/jhellmers/anaconda3/lib/python3.6/site-packages/qutip/qip/circuit_latex.py in _latex_compile(code, filename, format)
60 os.system("convert -density %s %s.pdf %s.png" % (100, filename,
61 filename))
---> 62 with open("%s.png" % filename, "rb") as f:
63 result = f.read()
64 else:

FileNotFoundError: [Errno 2] No such file or directory: 'qcirc.png'`

Apparently a file called qcirc.png was supposed to be generated but wasn't.

@hellmersjl3ds
Copy link
Author

I installed the "full" version of texlive (sudo apt-get install texlive-full on Ubuntu), and now it is working wonderfully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant