Incorrect Classical Register Size in to_qasm
with Inhomogeneous Measurements
#6508
Labels
kind/bug-report
Something doesn't seem to work.
triage/accepted
there is consensus amongst maintainers that this is a real bug or a reasonable feature to add
triage/needs-more-evidence
[feature requests] this seems plausible but maintainers are not convinced about the use cases yet
Description of the issue
When a
Circuit
contains multiple measurements under the same key but with varying sizes, theto_qasm
method improperly assigns the classical register size, resulting in a smaller than required register.A potential solution includes �fixing this behavior directly or, throwing an exception for circuits with measurements of differing sizes being translated to OpenQASM, to prevent incorrect translations.
How to reproduce the issue
Result:
Cirq version
1.3.0
The text was updated successfully, but these errors were encountered: