QuMat.draw() says it returns a circuit visualization, but all backends just print the circuit and return None. So viz = qumat.draw() always gives you None.
Steps to Reproduce
- Create a simple circuit with
QuMat (e.g., 1-qubit Hadamard).
- Call
viz = qumat.draw().
- Check
viz in Python.
Expected Behavior
draw() should either return something you can use (string/object) or clearly say it only prints and returns nothing.
Actual Behavior
The circuit is printed to stdout, and viz is always None.
viz = qumat.draw()
circuit is printed here
print(viz)
None### Environment
- OS: Any
- Python Version: 3.10+
- Mahout/Qumat Version: main
- Backends: Qiskit, Cirq, Amazon Braket
Additional Context
Right now the docstring and the actual behavior don’t match, which is confusing if you try to use the return value.
QuMat.draw()says it returns a circuit visualization, but all backends just print the circuit and returnNone. Soviz = qumat.draw()always gives youNone.Steps to Reproduce
QuMat(e.g., 1-qubit Hadamard).viz = qumat.draw().vizin Python.Expected Behavior
draw()should either return something you can use (string/object) or clearly say it only prints and returns nothing.Actual Behavior
The circuit is printed to stdout, and
vizis alwaysNone.viz = qumat.draw()
circuit is printed here
print(viz)
None### Environment
Additional Context
Right now the docstring and the actual behavior don’t match, which is confusing if you try to use the return value.