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 error message upon misalignment in PadDynamicalDecoupling #12952

Merged
merged 3 commits into from
Aug 14, 2024

Conversation

Cryoris
Copy link
Contributor

@Cryoris Cryoris commented Aug 14, 2024

Summary

If a delay is misaligned and following a DAGInNode (or preceding a DAGOutNode), the error message in PadDynamicalDecoupling previously failed, as it was trying to access non-existing attributes. This is because, unlike DAGOpNode, the in and out nodes do not have a name or qargs attribute.

@Cryoris Cryoris 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 labels Aug 14, 2024
@Cryoris Cryoris added this to the 1.2.0 milestone Aug 14, 2024
@Cryoris Cryoris requested a review from a team as a code owner August 14, 2024 08:01
@qiskit-bot
Copy link
Collaborator

One or more of the following people are relevant to this code:

  • @Qiskit/terra-core

Copy link
Member

@jakelishman jakelishman left a comment

Choose a reason for hiding this comment

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

Just for my understanding: is the expectation that the (correct) error message should only show if there's been a bug in the prior PadDelay pass, or are we expecting users to feed in manually scheduled circuits?

@coveralls
Copy link

coveralls commented Aug 14, 2024

Pull Request Test Coverage Report for Build 10384311178

Details

  • 4 of 5 (80.0%) changed or added relevant lines in 1 file are covered.
  • 5 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.03%) to 89.703%

Changes Missing Coverage Covered Lines Changed/Added Lines %
qiskit/transpiler/passes/scheduling/padding/dynamical_decoupling.py 4 5 80.0%
Files with Coverage Reduction New Missed Lines %
crates/qasm2/src/lex.rs 5 91.73%
Totals Coverage Status
Change from base Build 10374261794: 0.03%
Covered Lines: 67428
Relevant Lines: 75168

💛 - Coveralls

@Cryoris
Copy link
Contributor Author

Cryoris commented Aug 14, 2024

As I understand it, this error message should only come up if users put manual delays into the circuit and either didn't run ConstrainedReschedule or put barriers, such that the reschedule doesn't merge delays into multiples of the alignment.

@jakelishman jakelishman added this pull request to the merge queue Aug 14, 2024
Merged via the queue into Qiskit:main with commit 9252713 Aug 14, 2024
15 checks passed
mergify bot pushed a commit that referenced this pull request Aug 14, 2024
* Fix misalignment msg

* slightly better formatting

* typo

(cherry picked from commit 9252713)
github-merge-queue bot pushed a commit that referenced this pull request Aug 14, 2024
…) (#12954)

* Fix misalignment msg

* slightly better formatting

* typo

(cherry picked from commit 9252713)

Co-authored-by: Julien Gacon <jules.gacon@googlemail.com>
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 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.

4 participants