quantum-viz.js
quantum-viz.js copied to clipboard
displayArgs for measurements
Describe the bug Display arguments are not displayed for measurements.
To Reproduce Steps to reproduce the behavior:
- Use the following circuit:
'qubits': [ {'id': 0, 'numChildren': 1}, {'id': 1, 'numChildren': 1} ], 'operations': [{ 'gate': 'MZZ', 'displayArgs': 'arg', 'isMeasurement': 'True', 'isControlled': 'True', 'controls': [{'qId': 0}], 'targets': [{'qId': 1}] }] - Display the circuit:
widget = Viewer(circuit) widget._ipython_display_() - See error (I believe this error persists for CNOTs as well).
Expected behavior I expected to see the requested arguments displayed for the operation.
Screenshots
In this image, I input displayArgs = "arg" for each operation.

Additional context
- OS: windows
I've recently noticed a bunch of weird/hardcoded behavior with measurements that we should indeed fix.