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

HLS fix to not synthesize instructions already supported (backport #13417) #13441

Merged
merged 1 commit into from
Nov 14, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Nov 14, 2024

Summary

Fixes #13412.

Needs to be backported to 1.3.0.

Details and comments

Previously HighLevelSynthesis synthesized an instruction for which a synthesis plugin was available, even when the instruction was already considered supported (either supported by the target or a part of basis_gates). This commit fixes this behavior.
Update: the control-flow operations (e.g. for-loop) belong to basis_gates but need to be recursively synthesized.

Even though the problem was only discovered for "PauliEvolution" gates also added for 1.3, the incorrect behavior for other high-level gates existed before, so I added release notes. I was not sure if they should be under releasenotes/notes/1.3 or not.


This is an automatic backport of pull request #13417 done by Mergify.

* HLS fix to not synthesize instructions already supported

* reno

* fix for control-flow-operations

The control-flow operations such as 'for-loop` are considered to be a
part of 'basis_gates`, yet they need to be recursively synthesized.

* using faster is_control_flow check

* Update test/python/transpiler/test_high_level_synthesis.py

Co-authored-by: Julien Gacon <[email protected]>

---------

Co-authored-by: Julien Gacon <[email protected]>
(cherry picked from commit b9d5c9c)
@mergify mergify bot requested review from alexanderivrii, ShellyGarion and a team as code owners November 14, 2024 17:30
@qiskit-bot
Copy link
Collaborator

Thank you for opening a new pull request.

Before your PR can be merged it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient.

While you're waiting, please feel free to review other open PRs. While only a subset of people are authorized to approve pull requests for merging, everyone is encouraged to review open pull requests. Doing reviews helps reduce the burden on the core team and helps make the project's code better for everyone.

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

  • @Qiskit/terra-core

@github-actions github-actions bot added the Changelog: Bugfix Include in the "Fixed" section of the changelog label Nov 14, 2024
@github-actions github-actions bot added this to the 1.3.0 milestone Nov 14, 2024
@coveralls
Copy link

Pull Request Test Coverage Report for Build 11842415266

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 14 unchanged lines in 4 files lost coverage.
  • Overall coverage decreased (-0.006%) to 88.908%

Files with Coverage Reduction New Missed Lines %
crates/accelerate/src/two_qubit_decompose.rs 1 92.12%
crates/qasm2/src/expr.rs 1 94.02%
crates/qasm2/src/lex.rs 6 91.73%
crates/qasm2/src/parse.rs 6 96.69%
Totals Coverage Status
Change from base Build 11820794097: -0.006%
Covered Lines: 79041
Relevant Lines: 88902

💛 - Coveralls

@mtreinish mtreinish enabled auto-merge November 14, 2024 18:14
@mtreinish mtreinish added this pull request to the merge queue Nov 14, 2024
Merged via the queue into stable/1.3 with commit 1402f76 Nov 14, 2024
20 checks passed
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants