1
$\begingroup$

Trying to run below snippet to generate circuit diagram in a Jupyter notebook on Windows.

import qiskit
qc = qiskit.QuantumCircuit(1)
qc.x(0)
qc.draw('latex')

I have install the texlive for windows as mentioned here. Although, this still throws below error trace:

MissingOptionalLibraryError               Traceback (most recent call last)
Input In [2], in <cell line: 4>()
      2 qc = qiskit.QuantumCircuit(1)
      3 qc.x(0)
----> 4 qc.draw('latex')
...
MissingOptionalLibraryError: "The 'pdflatex' library is required to use 'LaTeX circuit drawing'.  You will likely need to install a full LaTeX distribution for your system."

Anything missing?

$\endgroup$

1 Answer 1

1
$\begingroup$

It seems the executable pdflatex is not in path. You might need to restart your Windows or extend the PATH variable with the pdflatex directory.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.