Skip to content
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

Support zero-operand instructions in circuit drawers #9962

Open
jakelishman opened this issue Apr 13, 2023 · 5 comments
Open

Support zero-operand instructions in circuit drawers #9962

jakelishman opened this issue Apr 13, 2023 · 5 comments
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

Comments

@jakelishman
Copy link
Member

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).

@jakelishman jakelishman added type: feature request New feature or request mod: visualization qiskit.visualization labels Apr 13, 2023
@jakelishman jakelishman added the help wanted community contributions welcome. For filters like http://github-help-wanted.com/ label Apr 17, 2023
@thspreetham98
Copy link
Contributor

I want to give this a shot. Can I get assigned to this please?

@thspreetham98
Copy link
Contributor

Hi @jakelishman can you assign this issue to me?

@jakelishman
Copy link
Member Author

Sorry for the slow reply, sure, I've assigned you thanks.

@thspreetham98
Copy link
Contributor

Hi @jakelishman . Sorry I did not get a chance to work on this yet. I request you to assign this to someone else.

@Tarun-Kumar07
Copy link
Contributor

Hi @jakelishman , I am new to qiskit code base and wanted to tackle this issue. Can you please assign this to me?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

3 participants