question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

QuantumCircuit.draw() does not draw circuit in terminal

See original GitHub issue

Information

  • Qiskit Terra version: master
  • Python version:
  • Operating system:

What is the current behavior?

Currently returns a <qiskit.visualization.text.TextDrawing>. However, it should print to the terminal because it is an explicit command to draw the circuit.

Steps to reproduce the problem

What is the expected behavior?

Suggested solutions

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
mohfazcommented, Jan 17, 2020

Try: print(qc.draw(output=‘text’))

Read more comments on GitHub >

github_iconTop Results From Across the Web

qiskit.circuit.QuantumCircuit.draw
This is useful when the drawing does not fit in the console. If None (default), it will try to guess the console width...
Read more >
Can't draw figures with Qiskit in Visual Studio
I want to draw quantum circuits, but it only shows their sizes with text instead of figures. The output on the interactive window...
Read more >
Qiskit TwoLocal does not print Quantum Circuit - Stack Overflow
from qiskit.circuit.library import TwoLocal ry = TwoLocal(8, "ry", "cz", reps=2, entanglement="full").decompose() ry.draw('mpl').
Read more >
matplotlib-based quantum circuit drawer - | notebook.community
5 intoduces matplotlib_circuit_drawer , which is a drop-in replacement of latex_circuit_drawer . If LaTeX is installed, circuit_drawer draws circuits by ...
Read more >
Running Qiskit in (Dark) Jupyter - From First Principles
To test the qiskit visualization we can now try to draw this circuit using the draw() method: Fig 7 – Drawing our first...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found