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

Re-allow non-standard includes in OpenQASM 3 exporter #13148

Merged
merged 1 commit into from
Sep 19, 2024

Conversation

jakelishman
Copy link
Member

Summary

Swapping the behaviour of the exporter to error on unknown includes was a mistake, and a breaking change from previous versions of the OpenQASM 3 exporter, since the basis_gates argument can be used to emulate the expected behaviour of this option, even though the previously documented behaviour was never actually fulfilled.

This restores the previous non-erroring behaviour, and corrects the documentation to note how the includes argument should be used in the near term.

Details and comments

Fix #13061

Swapping the behaviour of the exporter to error on unknown includes was
a mistake, and a breaking change from previous versions of the OpenQASM
3 exporter, since the `basis_gates` argument can be used to emulate the
expected behaviour of this option, even though the previously documented
behaviour was never actually fulfilled.

This restores the previous non-erroring behaviour, and corrects the
documentation to note how the ``includes`` argument should be used in
the near term.
@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: qasm3 Related to OpenQASM 3 import or export labels Sep 13, 2024
@jakelishman jakelishman added this to the 1.2.2 milestone Sep 13, 2024
@jakelishman jakelishman requested a review from a team as a code owner September 13, 2024 10:56
@qiskit-bot
Copy link
Collaborator

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

  • @Qiskit/terra-core

@coveralls
Copy link

Pull Request Test Coverage Report for Build 10847859520

Details

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

Files with Coverage Reduction New Missed Lines %
crates/qasm2/src/lex.rs 6 92.23%
crates/qasm2/src/parse.rs 6 97.15%
Totals Coverage Status
Change from base Build 10838928352: 0.003%
Covered Lines: 73440
Relevant Lines: 82601

💛 - 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, thanks!

@kevinhartman kevinhartman added this pull request to the merge queue Sep 18, 2024
Merged via the queue into Qiskit:main with commit 5121a0f Sep 19, 2024
15 checks passed
mergify bot pushed a commit that referenced this pull request Sep 19, 2024
Swapping the behaviour of the exporter to error on unknown includes was
a mistake, and a breaking change from previous versions of the OpenQASM
3 exporter, since the `basis_gates` argument can be used to emulate the
expected behaviour of this option, even though the previously documented
behaviour was never actually fulfilled.

This restores the previous non-erroring behaviour, and corrects the
documentation to note how the ``includes`` argument should be used in
the near term.

(cherry picked from commit 5121a0f)
@jakelishman jakelishman deleted the qasm3/no-raise-include branch September 19, 2024 06:46
github-merge-queue bot pushed a commit that referenced this pull request Sep 19, 2024
Swapping the behaviour of the exporter to error on unknown includes was
a mistake, and a breaking change from previous versions of the OpenQASM
3 exporter, since the `basis_gates` argument can be used to emulate the
expected behaviour of this option, even though the previously documented
behaviour was never actually fulfilled.

This restores the previous non-erroring behaviour, and corrects the
documentation to note how the ``includes`` argument should be used in
the near term.

(cherry picked from commit 5121a0f)

Co-authored-by: Jake Lishman <jake.lishman@ibm.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 mod: qasm3 Related to OpenQASM 3 import or export 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.

Using includes with the QASM3 Exporter raises instead of including definitions
4 participants