qiskit icon indicating copy to clipboard operation
qiskit copied to clipboard

Fix handling of `Var` nodes in full-rebuild control-flow blocks

Open jakelishman opened this issue 6 months ago • 3 comments

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.

jakelishman avatar Jan 29 '24 15:01 jakelishman

One or more of the the following people are requested to review this:

  • @Qiskit/terra-core

qiskit-bot avatar Jan 29 '24 15:01 qiskit-bot

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 Coverage Status
Change from base Build 8052013397: 0.01%
Covered Lines: 59143
Relevant Lines: 66216

💛 - Coveralls

coveralls avatar Jan 29 '24 15:01 coveralls

Rebased over #11820.

jakelishman avatar Feb 26 '24 16:02 jakelishman

Standalone Var hasn't been released yet, so this is a bugfix to main only - they weren't in 1.0.

jakelishman avatar Apr 11 '24 20:04 jakelishman