Skip to content

Fix handling of plane YZ in Pauli flow - #297

Merged
thierry-martinez merged 1 commit into
TeamGraphix:masterfrom
thierry-martinez:fix_pauli_flow
Jun 6, 2025
Merged

Fix handling of plane YZ in Pauli flow#297
thierry-martinez merged 1 commit into
TeamGraphix:masterfrom
thierry-martinez:fix_pauli_flow

Conversation

@thierry-martinez

Copy link
Copy Markdown
Collaborator

@Newtech66 reported that the plane YZ was not handled correctly in Pauli flow (#279 (comment)):

It's because the get_pauli_nodes method in gflow.py is incorrect. See here. Specifically, the cases for the Y Z plane are switched.

Test cases were written following the same incorrect convention and failed to detect the issue. This commit fixes the test cases and uses the PauliMeasurement.try_from constructor instead of reimplementing the Pauli axis computation, ensuring the convention is defined in one place and for all.

@Newtech66 reported that the plane YZ was not handled correctly in
Pauli flow (TeamGraphix#279 (comment)):
| It's because the `get_pauli_nodes` method in `gflow.py` is
| incorrect. See here. Specifically, the cases for the Y Z plane are
| switched.
Test cases were written following the same incorrect convention and
failed to detect the issue. This commit fixes the test cases and uses
the `PauliMeasurement.try_from` constructor instead of reimplementing
the Pauli axis computation, ensuring the convention is defined in one
place and for all.
@codecov

codecovBot commented Jun 5, 2025

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 92.30769% with 1 line in your changes missing coverage. Please review.

Project coverage is 79.83%. Comparing base (92031c9) to head (120e893).
Report is 1 commits behind head on master.

Files with missing linesPatch %Lines
graphix/gflow.py92.30%1 Missing ⚠️
Additional details and impacted files
@@ Coverage Diff @@## master #297 +/- ##
==========================================
- Coverage 79.86% 79.83% -0.04% 
==========================================
Files 36 36 Lines 5433 5429 -4 ==========================================
- Hits 4339 4334 -5 - Misses 1094 1095 +1 

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@shinich1shinich1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, may I ask @Newtech66 also to take a quick look?

@thierry-martinez
thierry-martinez merged commit 283e53f into TeamGraphix:masterJun 6, 2025
@Newtech66Newtech66 mentioned this pull request Jun 7, 2025
10 tasks
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@thierry-martinez@shinich1