When calling tq.draw, the default circuit drawer is qpic, as long as qpic itself is installed. This is problematic, because it throws an error when IPython is not available (i.e. the current console is not a jupyter notebook).
|
if system_has_qpic: |
|
backend = "qpic" |
The function should either check whether IPython is installed before using the qpic backend, or even better, there should be a fallback, like matplotlib, for displaying the circuit, when IPython is not available.
When calling
tq.draw, the default circuit drawer is qpic, as long as qpic itself is installed. This is problematic, because it throws an error whenIPythonis not available (i.e. the current console is not a jupyter notebook).tequila/src/tequila/simulators/simulator_api.py
Lines 451 to 452 in a222aa8
The function should either check whether
IPythonis installed before using the qpic backend, or even better, there should be a fallback, like matplotlib, for displaying the circuit, whenIPythonis not available.