qutip / qutip-notebooks

A collection of IPython notebooks using QuTiP: examples, tutorials, development test, etc.
BSD 3-Clause "New" or "Revised" License
238 stars 236 forks source link

Errors when drawing Circuits #43

Closed hellmersjl3ds closed 7 years ago

hellmersjl3ds commented 7 years ago

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 commented 7 years ago

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