Skip to content

Fix alignment checks of stretch variables #14330

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

Merged
merged 2 commits into from
May 8, 2025

Conversation

jakelishman
Copy link
Member

We treat stretch as meaning that a lower-level compiler will be rescheduling to resolve the stretch, so we don't need to worry about the alignment ourselves.

Summary

Details and comments

Fix #14264

We treat `stretch` as meaning that a lower-level compiler will be
rescheduling to resolve the stretch, so we don't need to worry about the
alignment ourselves.
@jakelishman jakelishman added this to the 2.0.1 milestone May 8, 2025
@jakelishman jakelishman requested a review from a team as a code owner May 8, 2025 16:27
@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: transpiler Issues and PRs related to Transpiler labels May 8, 2025
@qiskit-bot
Copy link
Collaborator

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

  • @Qiskit/terra-core

kevinhartman
kevinhartman previously approved these changes May 8, 2025
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.

Looks great, thanks for the fix!

@kevinhartman kevinhartman enabled auto-merge May 8, 2025 16:37
Circuits containing delays with stretches (see :meth:`.QuantumCircuit.add_stretch`) can now
successfully compile using the preset pass-managers (:func:`.transpile` and
:func:`.generate_preset_pass_manager`) when targetting a backend that has alignment constraints,
for example IBM Quantum Eagle devices like ``ibm_washington``.
Copy link
Member Author

Choose a reason for hiding this comment

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

Oh whoops, I meant ibm_sherbrooke - I think Washington got retired a few months ago?

Copy link
Member

Choose a reason for hiding this comment

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

ibm_washington was retired in June 2023: https://docs.quantum.ibm.com/guides/retired-qpus

@coveralls
Copy link

Pull Request Test Coverage Report for Build 14911618568

Details

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • 12 unchanged lines in 3 files lost coverage.
  • Overall coverage increased (+0.03%) to 87.868%

Files with Coverage Reduction New Missed Lines %
crates/accelerate/src/unitary_synthesis.rs 1 94.85%
crates/qasm2/src/lex.rs 5 92.98%
crates/qasm2/src/parse.rs 6 97.61%
Totals Coverage Status
Change from base Build 14910286730: 0.03%
Covered Lines: 74626
Relevant Lines: 84930

💛 - Coveralls

@kevinhartman kevinhartman added this pull request to the merge queue May 8, 2025
Merged via the queue into Qiskit:main with commit bf828a7 May 8, 2025
24 checks passed
@jakelishman jakelishman deleted the no-reschedule-stretch branch May 8, 2025 18:39
mergify bot pushed a commit that referenced this pull request May 8, 2025
* Fix alignment checks of `stretch` variables

We treat `stretch` as meaning that a lower-level compiler will be
rescheduling to resolve the stretch, so we don't need to worry about the
alignment ourselves.

* Use non-retired backend as an example

(cherry picked from commit bf828a7)
github-merge-queue bot pushed a commit that referenced this pull request May 9, 2025
* Fix alignment checks of `stretch` variables (#14330)

* Fix alignment checks of `stretch` variables

We treat `stretch` as meaning that a lower-level compiler will be
rescheduling to resolve the stretch, so we don't need to worry about the
alignment ourselves.

* Use non-retired backend as an example

(cherry picked from commit bf828a7)

* Fix method name for 2.0.

---------

Co-authored-by: Jake Lishman <jake.lishman@ibm.com>
Co-authored-by: Kevin Hartman <kevin@hart.mn>
rahaman-quantum pushed a commit to rahaman-quantum/qiskit that referenced this pull request Jun 20, 2025
* Fix alignment checks of `stretch` variables

We treat `stretch` as meaning that a lower-level compiler will be
rescheduling to resolve the stretch, so we don't need to worry about the
alignment ourselves.

* Use non-retired backend as an example
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: transpiler Issues and PRs related to Transpiler 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.

TranspilerError in presets when circuit with stretch is compiled to Target with alignment constraints
5 participants