Support zero-operand instructions in circuit drawers #9962
Labels
help wanted
community contributions welcome. For filters like http://github-help-wanted.com/
mod: visualization
qiskit.visualization
type: feature request
New feature or request
What should we add?
Currently, if there is an operation in a
QuantumCircuit
that acts on 0 qubits or clbits, it won't be drawn at all by the circuit drawers. Such an operation is well defined, though - all qubits not explicitly acted on by an operation implicitly undergo the identity. The only real use-case we have for this (right now) is the idea of a "global-phase gate" (see #9251), which leads to confusion when trying to visualise the circuit; the zero-operation gate will not be drawn, making it look like the circuit is different to what it actually is.It would be good to support these operations in the drawers. There might be more ideas, but my first thought was to say that when a zero-operand gate is encountered, it should just be drawn using the normal "box" logic, as if it acts on all the qubits (ideally without the wire input numbers, though if they end up being necessary, it's not the end of the world, I suppose).
The text was updated successfully, but these errors were encountered: