-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Is your feature request related to a use case or problem? Please describe.
currently tags are displayed in circuit diagrams via their repr
(implicitly via str(list(tags))
). This can lead to some unruly or hard-to-read circuit diagrams, e.g.:
1: ───X^0.5───Rz(0.928π)[cirq.VirtualTag()]───X^0.5───Rz(π)[cirq.VirtualTag()]───────@──────────────────────────────────
│
2: ───X^0.5───Rz(0.072π)[cirq.VirtualTag()]───X^0.5───Rz(-0.5π)[cirq.VirtualTag()]───X───Rz(-1.5π)[cirq.VirtualTag()]───
this could be cleaned up by overriding tag.__repr__
, but usually not without breaking the expectation that eval(repr(tagged_op)) == tagged_op
Describe the solution you'd like
it seems like it'd be much more natural (and easier to customize) if the circuit diagram drawer to instead use the tags' strings, e.g.:
1: ───X^0.5───Rz(0.928π)[<virtual>]───X^0.5───Rz(π)[<virtual>]───────@──────────────────────────
│
2: ───X^0.5───Rz(0.072π)[<virtual>]───X^0.5───Rz(-0.5π)[<virtual>]───X───Rz(-1.5π)[<virtual>]───
What is the urgency from your perspective for this issue? Is it blocking important work?
P3 - I'm not really blocked by it, it is an idea I'd like to discuss / suggestion based on principle
(happy to work on this if it seems reasonable)