Skip to content

Conversation

alexanderivrii
Copy link
Member

@alexanderivrii alexanderivrii commented May 12, 2025

Summary

The HighLevelSynthesis transpiler pass checks whether all of the circuit instructions are already natively supported, in which case the pass terminates early. Previously this check called dag.count_ops(py, recurse=false), which however is not correct on circuits with control-flow operations when operations within the blocks that are not natively supported. The PR simply changes recurse=false to recurse=true.

Details and comments

This should fix #14338 and #14254.

@alexanderivrii alexanderivrii requested a review from a team as a code owner May 12, 2025 09:54
@alexanderivrii alexanderivrii added the Changelog: Bugfix Include in the "Fixed" section of the changelog label May 12, 2025
@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 14969341921

Details

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • 6 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.007%) to 88.743%

Files with Coverage Reduction New Missed Lines %
crates/qasm2/src/lex.rs 6 92.73%
Totals Coverage Status
Change from base Build 14937574463: 0.007%
Covered Lines: 76073
Relevant Lines: 85723

💛 - 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.

This looks good to me, thanks!

@kevinhartman kevinhartman added the stable backport potential The bug might be minimal and/or import enough to be port to stable label May 12, 2025
@kevinhartman
Copy link
Contributor

I'm adding the backport label but I think HLS has moved since 2.0 so it'll need some adapting.

@kevinhartman kevinhartman added this pull request to the merge queue May 12, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 12, 2025
@kevinhartman kevinhartman added this pull request to the merge queue May 13, 2025
Merged via the queue into Qiskit:main with commit de41d1a May 13, 2025
25 checks passed
mergify bot pushed a commit that referenced this pull request May 13, 2025
* HLS early termination bug fix

* adding test

* release notes: remove extra space

(cherry picked from commit de41d1a)
github-merge-queue bot pushed a commit that referenced this pull request May 13, 2025
* HLS early termination bug fix

* adding test

* release notes: remove extra space

(cherry picked from commit de41d1a)

Co-authored-by: Alexander Ivrii <alexi@il.ibm.com>
@1ucian0
Copy link
Member

1ucian0 commented Jun 6, 2025

rahaman-quantum pushed a commit to rahaman-quantum/qiskit that referenced this pull request Jun 20, 2025
* HLS early termination bug fix

* adding test

* release notes: remove extra space
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.

TranspilerError occurs when transpiling a circuit with for_loop
6 participants