Skip to content

Conversation

jakelishman
Copy link
Member

Summary

It's unlikely to ever be useful, but strictly there still is a well-defined behaviour for ApplyLayout on a zero-qubit circuit and backend. Previously, the pass errored out falsely asserting user error.

Details and comments

It's unlikely to ever be useful, but strictly there still is a
well-defined behaviour for `ApplyLayout` on a zero-qubit circuit and
backend.  Previously, the pass errored out falsely asserting user error.
@jakelishman jakelishman added this to the 2.1.0 milestone Jun 15, 2025
@jakelishman jakelishman added the stable backport potential The bug might be minimal and/or import enough to be port to stable label Jun 15, 2025
@jakelishman jakelishman requested a review from a team as a code owner June 15, 2025 14:59
@jakelishman jakelishman added Changelog: Bugfix Include in the "Fixed" section of the changelog mod: transpiler Issues and PRs related to Transpiler labels Jun 15, 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 15664449335

Details

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • 28 unchanged lines in 4 files lost coverage.
  • Overall coverage decreased (-0.02%) to 87.982%

Files with Coverage Reduction New Missed Lines %
crates/qasm2/src/expr.rs 1 94.23%
crates/qasm2/src/lex.rs 2 91.73%
crates/circuit/src/symbol_expr.rs 7 73.64%
crates/qasm2/src/parse.rs 18 96.68%
Totals Coverage Status
Change from base Build 15635869582: -0.02%
Covered Lines: 83144
Relevant Lines: 94501

💛 - Coveralls

Copy link
Member

@alexanderivrii alexanderivrii left a comment

Choose a reason for hiding this comment

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

Thanks Jake, the fix makes total sense to me.

@alexanderivrii alexanderivrii added this pull request to the merge queue Jun 16, 2025
Merged via the queue into Qiskit:main with commit d0630fd Jun 16, 2025
27 checks passed
mergify bot pushed a commit that referenced this pull request Jun 16, 2025
It's unlikely to ever be useful, but strictly there still is a
well-defined behaviour for `ApplyLayout` on a zero-qubit circuit and
backend.  Previously, the pass errored out falsely asserting user error.

(cherry picked from commit d0630fd)
@mtreinish
Copy link
Member

@Mergifyio backport stable/1.4 stable/2.0

Copy link
Contributor

mergify bot commented Jun 16, 2025

backport stable/1.4 stable/2.0

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Jun 16, 2025
It's unlikely to ever be useful, but strictly there still is a
well-defined behaviour for `ApplyLayout` on a zero-qubit circuit and
backend.  Previously, the pass errored out falsely asserting user error.

(cherry picked from commit d0630fd)
mergify bot pushed a commit that referenced this pull request Jun 16, 2025
It's unlikely to ever be useful, but strictly there still is a
well-defined behaviour for `ApplyLayout` on a zero-qubit circuit and
backend.  Previously, the pass errored out falsely asserting user error.

(cherry picked from commit d0630fd)
@jakelishman jakelishman deleted the apply-empty-layout branch June 16, 2025 14:26
github-merge-queue bot pushed a commit that referenced this pull request Jun 16, 2025
It's unlikely to ever be useful, but strictly there still is a
well-defined behaviour for `ApplyLayout` on a zero-qubit circuit and
backend.  Previously, the pass errored out falsely asserting user error.

(cherry picked from commit d0630fd)

Co-authored-by: Jake Lishman <jake.lishman@ibm.com>
github-merge-queue bot pushed a commit that referenced this pull request Jun 16, 2025
It's unlikely to ever be useful, but strictly there still is a
well-defined behaviour for `ApplyLayout` on a zero-qubit circuit and
backend.  Previously, the pass errored out falsely asserting user error.

(cherry picked from commit d0630fd)

Co-authored-by: Jake Lishman <jake.lishman@ibm.com>
github-merge-queue bot pushed a commit that referenced this pull request Aug 15, 2025
* Fix `ApplyLayout` with empty layout (#14606)

It's unlikely to ever be useful, but strictly there still is a
well-defined behaviour for `ApplyLayout` on a zero-qubit circuit and
backend.  Previously, the pass errored out falsely asserting user error.

(cherry picked from commit d0630fd)

* Use PassManager for empty layout tests.

* Use dummy pass for test_empty_post_layout.

Co-authored-by: Jake Lishman <jake.lishman@ibm.com>

* Ignore lint.

---------

Co-authored-by: Jake Lishman <jake.lishman@ibm.com>
Co-authored-by: Kevin Hartman <kevin@hart.mn>
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.

5 participants