qiskit
qiskit copied to clipboard
Fix handling of `Var` nodes in full-rebuild control-flow blocks
Summary
In the control-flow builders, there are typically two ways the individual blocks can be reconstructed to be unified over the qubit and clbit resources. We generally attempt to avoid completely rebuilding the cirucits unless we have to. In cases where the resources are visited in an incompatible order, however, we have to construct new circuit objects, and in these cases, we were failing to transfer the Var
use over completely.
Details and comments
This is a bug fix for the expr.Var
support, which is going to be deferred from 1.0, so I've marked it as on hold pending the release of that.
One or more of the the following people are requested to review this:
-
@Qiskit/terra-core
Pull Request Test Coverage Report for Build 8052097515
Details
- 0 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
- 6 unchanged lines in 2 files lost coverage.
- Overall coverage increased (+0.01%) to 89.318%
Files with Coverage Reduction | New Missed Lines | % |
---|---|---|
crates/qasm2/src/expr.rs | 1 | 93.81% |
crates/qasm2/src/lex.rs | 5 | 91.18% |
<!-- | Total: | 6 |
Totals | |
---|---|
Change from base Build 8052013397: | 0.01% |
Covered Lines: | 59143 |
Relevant Lines: | 66216 |
💛 - Coveralls
Rebased over #11820.
Standalone Var
hasn't been released yet, so this is a bugfix to main
only - they weren't in 1.0.