Skip to content

In SVG diagrams, classical bits look identical to quantum bits #5689

Open
@Strilanc

Description

@Strilanc
import cirq
from cirq.contrib.svg import SVGCircuit

with open('tmp.svg', 'w') as f:
    print(SVGCircuit(cirq.Circuit(
        cirq.measure(cirq.LineQubit(0), key="abc"),
        cirq.X(cirq.LineQubit(0)).with_classical_controls("abc"),
    ))._repr_svg_(), file=f)

image

Activity

added
no QC knowledge neededWant to contribute to Cirq, but don't know quantum computing? This issue is for you.
on Aug 3, 2022
added
triage/acceptedA consensus emerged that this bug report, feature request, or other action should be worked on
and removed
triage/discussNeeds decision / discussion, bring these up during Cirq Cynque
on Aug 10, 2022
NikolaiLong

NikolaiLong commented on Mar 19, 2025

@NikolaiLong

Hi @mhucka, I think I'd like to work on this issue next, could you assign it to me.

Also quick question - the two bit types look identical in this diagram, so what would you like the classical bits to look like @Strilanc?

NikolaiLong

NikolaiLong commented on Mar 24, 2025

@NikolaiLong

Hi @Strilanc, following up on my previous comment. Should classical bits be distinguished by having a dotted line? Would this be an acceptable solution?

@mhucka could you help confirm on this issue. I'm not sure what the desired visualization should be.

daxfohl

daxfohl commented on Mar 28, 2025

@daxfohl
Collaborator

Double lines are most common.

linked a pull request that will close this issue on Apr 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/circuitsarea/visualizationkind/bug-reportSomething doesn't seem to work.no QC knowledge neededWant to contribute to Cirq, but don't know quantum computing? This issue is for you.triage/acceptedA consensus emerged that this bug report, feature request, or other action should be worked on

Type

No type

Projects

Status

No status

Relationships

None yet

    Participants

    @Strilanc@daxfohl@mhucka@tanujkhattar@vtomole

    Issue actions

      In SVG diagrams, classical bits look identical to quantum bits · Issue #5689 · quantumlib/Cirq