quantum-viz.js icon indicating copy to clipboard operation
quantum-viz.js copied to clipboard

displayArgs for measurements

Open snpal opened this issue 3 years ago • 1 comments

Describe the bug Display arguments are not displayed for measurements.

To Reproduce Steps to reproduce the behavior:

  1. 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}] }]
  2. Display the circuit: widget = Viewer(circuit) widget._ipython_display_()
  3. 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. MicrosoftTeams-image (1)

Additional context

  • OS: windows

snpal avatar Jun 02 '22 18:06 snpal

I've recently noticed a bunch of weird/hardcoded behavior with measurements that we should indeed fix.

anpaz avatar Jun 10 '22 05:06 anpaz