-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
QuantumCircuit.draw() invalid cross-device link error on linux #8542
Comments
Also just found out that |
If possible, could you try a development version of Qiskit Terra and change this line: https://github.com/Qiskit/qiskit-terra/blob/eaf55816470fd64c934b36b7684a02e133dfbc5f/qiskit/visualization/circuit_visualization.py#L491 to import shutil
shutil.move(base + ".pdf", filename) You're working on a system where the |
That did it! It was just on line 445 for me for some reason. |
That's great! Would you be interested in making a PR to apply that change? (No pressure.) The line-number difference isn't important - it'll just be that we've made some changes to the file I linked to between Terra 0.21.0 (which you have installed) and the current development version, which I linked to. |
Corrects issue Qiskit#8542
Done. Let me know if there's something more I can do in terms of the tests/documentation contributing steps, as I'm not familiar with tox. |
* Update circuit_visualization.py Corrects issue #8542 * Update circuit_visualization.py * Add release note Co-authored-by: Jake Lishman <[email protected]>
* Update circuit_visualization.py Corrects issue #8542 * Update circuit_visualization.py * Add release note Co-authored-by: Jake Lishman <[email protected]> (cherry picked from commit d163e89)
Fixed by #8629. |
* Update circuit_visualization.py Corrects issue #8542 * Update circuit_visualization.py * Add release note Co-authored-by: Jake Lishman <[email protected]> (cherry picked from commit d163e89) Co-authored-by: Joseph McElroy <[email protected]>
Informations
Qiskit version:
qiskit-terra | 0.21.0
qiskit-aer | 0.10.4
qiskit-ibmq-provider | 0.19.2
qiskit | 0.37.0
qiskit-nature | 0.4.1
qiskit-finance | 0.3.3
qiskit-optimization | 0.4.0
qiskit-machine-learning | 0.4.0
Python version:
Python version | 3.10.5
Python compiler | GCC
Operating system:
Linux, OpenSUSE Tumbleweed
What is the current behavior?
When running
QuantumCircuit.draw(output='latex', filename='qteleport.pdf')
, I get the following output:Steps to reproduce the problem
Use .draw with filename='something.pdf' on linux.
What is the expected behavior?
The pdf file should be created in the cwd.
Suggested solutions
It might be an issue with Pillow / Linux root permissions. Perhaps give a way to specify the output directory to bypass automatic use of /tmp.
I temporarily got around the issue with:
The text was updated successfully, but these errors were encountered: