-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
area/visualizationinterface/cirq-webkind/bug-reportSomething doesn't seem to work.Something doesn't seem to work.triage/acceptedA consensus emerged that this bug report, feature request, or other action should be worked onA consensus emerged that this bug report, feature request, or other action should be worked on
Description
It would be reasonable to ignore no-target operations, as they are usually some sort of unobservable annotation. But currently cirq-web crashes instead.
Run this python code and then open the generated page and look at the browser console:
import stim
import stimcirq
import cirq_web
stim_circuit = stim.Circuit("""
QUBIT_COORDS(0, 0) 0
M 0
DETECTOR rec[-1]
""")
cirq_circuit = stimcirq.stim_circuit_to_cirq_circuit(stim_circuit)
cirq_web.Circuit3D(cirq_circuit).generate_html_file(
file_name="stim_circuit_viewer.html",
open_in_browser=True,
)
The python code succeeds, but the browser console says:
Uncaught TypeError: Cannot read properties of undefined (reading 'row')
at stim_circuit_viewer.html:5:625129
at Array.forEach (<anonymous>)
at s.buildAndAddMeshesToGroup (stim_circuit_viewer.html:5:624903)
at new s (stim_circuit_viewer.html:5:624781)
at addSymbol (stim_circuit_viewer.html:5:625961)
at new a (stim_circuit_viewer.html:5:625922)
at t.createGridCircuit (stim_circuit_viewer.html:5:629078)
at stim_circuit_viewer.html:9:56
Metadata
Metadata
Assignees
Labels
area/visualizationinterface/cirq-webkind/bug-reportSomething doesn't seem to work.Something doesn't seem to work.triage/acceptedA consensus emerged that this bug report, feature request, or other action should be worked onA consensus emerged that this bug report, feature request, or other action should be worked on
Type
Projects
Status
No status