Skip to content

measure_active returns register called "measure" which breaks round tripping in QASM #12345

@nonhermitian

Description

@nonhermitian

Environment

  • Qiskit version: latest
  • Python version:
  • Operating system:

What is happening?

qc = qiskit.QuantumCircuit(1)
qc.reset(0)
qc.measure_active()

qc.cregs

[ClassicalRegister(1, 'measure')]

from qiskit.qasm3 import dumps, loads
qstr = dumps(qc)
new_qc = loads(qstr)
new_qc.cregs

[ClassicalRegister(1, 'esc__measure')]

How can we reproduce the issue?

run above

What should happen?

should be able to round trip a circuit

Any suggestions?

Unify the register name of measure_active and measure_all perhaps?

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions