Skip to content

Conversation

gadial
Copy link
Contributor

@gadial gadial commented Jul 9, 2025

Summary

Fixes _box_eq to return non equality when the boxes have different unit fields.

Details and comments

It seems _box_eq is invoked only when comparing circuits, not DAGOpNodes. There might be other cases we miss in other nodes due to the stricter check used by DAGOpNode.

@gadial gadial requested a review from a team as a code owner July 9, 2025 16:36
@qiskit-bot
Copy link
Collaborator

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

  • @Qiskit/terra-core

@gadial gadial added the Changelog: Bugfix Include in the "Fixed" section of the changelog label Jul 9, 2025
@mtreinish mtreinish added the stable backport potential The bug might be minimal and/or import enough to be port to stable label Jul 9, 2025
@mtreinish mtreinish added this to the 2.1.1 milestone Jul 9, 2025
@mtreinish
Copy link
Member

The fix looks good, but can you add a release note so this can be backported to 2.1.1?

@coveralls
Copy link

coveralls commented Jul 9, 2025

Pull Request Test Coverage Report for Build 16200586974

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 7 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.001%) to 87.771%

Files with Coverage Reduction New Missed Lines %
crates/qasm2/src/expr.rs 1 93.63%
crates/qasm2/src/lex.rs 6 92.01%
Totals Coverage Status
Change from base Build 16169412468: -0.001%
Covered Lines: 81486
Relevant Lines: 92839

💛 - Coveralls

mtreinish
mtreinish previously approved these changes Jul 10, 2025
@mtreinish mtreinish enabled auto-merge July 10, 2025 16:24
@mtreinish mtreinish added this pull request to the merge queue Jul 10, 2025
Merged via the queue into main with commit 925f144 Jul 10, 2025
29 checks passed
@mtreinish mtreinish deleted the box_nonequality_fix branch July 10, 2025 17:15
mergify bot pushed a commit that referenced this pull request Jul 10, 2025
* Fixed a bug where nonequal boxes were considered equal

* Release note

* Update releasenotes/notes/fix-box-eq-check-1ff339fcc1db983f.yaml

* Update releasenotes/notes/fix-box-eq-check-1ff339fcc1db983f.yaml

---------

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
(cherry picked from commit 925f144)
github-merge-queue bot pushed a commit that referenced this pull request Jul 10, 2025
* Fixed a bug where nonequal boxes were considered equal

* Release note

* Update releasenotes/notes/fix-box-eq-check-1ff339fcc1db983f.yaml

* Update releasenotes/notes/fix-box-eq-check-1ff339fcc1db983f.yaml

---------


(cherry picked from commit 925f144)

Co-authored-by: gadial <gadial@gmail.com>
Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
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.

4 participants