Skip to content

Invisible gate for idles/no-ops #66

@snpal

Description

@snpal

Is your feature request related to a problem? Please describe.
I would like to draw a circuit that has distinct timesteps at which certain operations are applied. Currently, if there is no operation on a qubit at a certain timestep, the next operation for that qubit is graphed immediately after the last operation.

For example:
Here is a circuit I drew using quantum-viz. The intended circuit was:

  • Hadamard(0) at timestep 0
  • Hadamard(1) at timestep 1
  • ControlledX(0, 1) at timestep 2
  • Measurement(0) at timestep 3

The drawn circuit more appropriately describes:

  • Hadamard(0) at timestep 0
  • Hadamard(1) at timestep 0
  • ControlledX(0, 1) at timestep 1
  • Measurement(0) at timestep 2

image

Describe the solution you'd like
I would like to be able to use an "invisible gate" (an idle/no-op) that simply leaves a blank line where an operation would go. This would be like the identity operators used below, except that it would not be visible. Of course, the line indicating the qubit would still be there - ideally, it would look exactly like the line for qubit 1 below the measurement in the image above.

Describe alternatives you've considered
Here is the same circuit as above with idles (identity operators) where I would like spaces:
image

Though this fix is okay for small circuits, it clutters the visual and makes circuits difficult to read. It would be very nice if I could replace these idles with an "invisible" gate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions