Skip to content

Add perform_pauli_pushing to Pattern#447

Merged
thierry-martinez merged 7 commits intoTeamGraphix:masterfrom
thierry-martinez:perform_pauli_pushing_in_pattern
Feb 21, 2026
Merged

Add perform_pauli_pushing to Pattern#447
thierry-martinez merged 7 commits intoTeamGraphix:masterfrom
thierry-martinez:perform_pauli_pushing_in_pattern

Conversation

@thierry-martinez
Copy link
Copy Markdown
Collaborator

This commit exposes the method perform_pauli_pushing in Pattern.

The method performs the Pauli pushing in place, unless called with copy=True, in which case a new pattern is returned.

By default, the method uses to_space_optimal_pattern to prepare the nodes on a need-by-need basis. If called with standardize=True, a standardized pattern is returned instead.

Warnings are issued if Pauli nodes have not been inferred or if leave_nodes contains non-Pauli nodes.

This commit exposes the method `perform_pauli_pushing` in `Pattern`.

The method performs the Pauli pushing in place, unless called with
`copy=True`, in which case a new pattern is returned.

By default, the method uses `to_space_optimal_pattern` to prepare the
nodes on a need-by-need basis. If called with `standardize=True`, a
standardized pattern is returned instead.

Warnings are issued if Pauli nodes have not been inferred or if
`leave_nodes` contains non-Pauli nodes.
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.09%. Comparing base (ed6b394) to head (30b87e2).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #447      +/-   ##
==========================================
+ Coverage   88.06%   88.09%   +0.02%     
==========================================
  Files          44       44              
  Lines        6433     6449      +16     
==========================================
+ Hits         5665     5681      +16     
  Misses        768      768              

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

Copy link
Copy Markdown
Contributor

@matulni matulni left a comment

Choose a reason for hiding this comment

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

Thanks for the blazing speed! Looks good

thierry-martinez and others added 2 commits February 20, 2026 14:14
Co-authored-by: matulni <m.uldemolins@gmail.com>
Suggested by Mateo.
Copy link
Copy Markdown
Contributor

@matulni matulni left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM!

Copy link
Copy Markdown
Contributor

@emlynsg emlynsg left a comment

Choose a reason for hiding this comment

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

LGTM, very minor comment.

stacklevel=stacklevel + 1,
)

if leave_nodes is None:
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.

Update to else

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I removed the if leave_nodes is None: block in 30b87e2.

@thierry-martinez thierry-martinez merged commit c39934e into TeamGraphix:master Feb 21, 2026
24 checks passed
Sign up for free to 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.

3 participants