Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build ordering of BlueprintCircuit._append #11181

Merged
merged 1 commit into from
Nov 2, 2023

Conversation

jakelishman
Copy link
Member

Summary

QuantumCircuit._append is the actual append primitive and is allowed in inner-loop appends (and for QuantumCircuit to assume that it's callable from other methods), so it's important that the "ensure built" check happens there, not in append.

Details and comments

Fix #11180.

`QuantumCircuit._append` is the actual append primitive and is allowed
in inner-loop appends (and for `QuantumCircuit` to assume that it's
callable from other methods), so it's important that the "ensure built"
check happens there, not in `append`.
@jakelishman jakelishman added stable backport potential The bug might be minimal and/or import enough to be port to stable Changelog: Bugfix Include in the "Fixed" section of the changelog mod: circuit Related to the core of the `QuantumCircuit` class or the circuit library labels Nov 2, 2023
@jakelishman jakelishman added this to the 0.45.1 milestone Nov 2, 2023
@jakelishman jakelishman requested a review from a team as a code owner November 2, 2023 17:46
@qiskit-bot
Copy link
Collaborator

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

  • @Cryoris
  • @Qiskit/terra-core
  • @ajavadia

@coveralls
Copy link

Pull Request Test Coverage Report for Build 6736340589

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • 22 unchanged lines in 4 files lost coverage.
  • Overall coverage decreased (-0.02%) to 86.862%

Files with Coverage Reduction New Missed Lines %
crates/qasm2/src/expr.rs 1 93.76%
qiskit/extensions/quantum_initializer/squ.py 2 84.15%
crates/qasm2/src/lex.rs 7 90.4%
crates/qasm2/src/parse.rs 12 96.2%
Totals Coverage Status
Change from base Build 6734726663: -0.02%
Covered Lines: 74009
Relevant Lines: 85203

💛 - Coveralls

Copy link
Contributor

@kevinhartman kevinhartman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@kevinhartman kevinhartman added this pull request to the merge queue Nov 2, 2023
Merged via the queue into Qiskit:main with commit a2c5412 Nov 2, 2023
mergify bot pushed a commit that referenced this pull request Nov 2, 2023
`QuantumCircuit._append` is the actual append primitive and is allowed
in inner-loop appends (and for `QuantumCircuit` to assume that it's
callable from other methods), so it's important that the "ensure built"
check happens there, not in `append`.

(cherry picked from commit a2c5412)
@jakelishman jakelishman deleted the blueprint-circuit-append branch November 2, 2023 20:54
github-merge-queue bot pushed a commit that referenced this pull request Nov 2, 2023
`QuantumCircuit._append` is the actual append primitive and is allowed
in inner-loop appends (and for `QuantumCircuit` to assume that it's
callable from other methods), so it's important that the "ensure built"
check happens there, not in `append`.

(cherry picked from commit a2c5412)

Co-authored-by: Jake Lishman <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: Bugfix Include in the "Fixed" section of the changelog mod: circuit Related to the core of the `QuantumCircuit` class or the circuit library stable backport potential The bug might be minimal and/or import enough to be port to stable
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BlueprintCircuit subclasses rebuild out-of-order after _append
5 participants