Skip to content

Fix#598: Ensure consistency for instruction qubits - #608

Open
thierry-martinez wants to merge 9 commits into
TeamGraphix:masterfrom
thierry-martinez:fix/598-instruction-consistency
Open

thierry-martinez wants to merge 9 commits into
TeamGraphix:masterfrom
thierry-martinez:fix/598-instruction-consistency

Conversation

@thierry-martinez

@thierry-martinez thierry-martinez commented Sep 23, 2026 •

Copy link
Copy Markdown
Collaborator

This PR changes the order of the attributes of the controlled instructions to put the control qubits first, to ensure consistency with controlled instructions that already take the control qubit first, to be consistent with the matrix description of the gates, and be consistent with the Circuit methods that add instructions to the circuit. The modified gates are:

  • CCX and RZZ,
  • ControlledSingleTargetInstruction (CNOT, CY)
  • ControlledRotationInstruction (CP, CRX, CRY, CRZ, CJ).

Moreover, CZ is now a ControlledSingleTargetInstruction and takes a control and a target instead of a pair of targets.

@codecov

codecov Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.96%. Comparing base (5e9c93f) to head (4ce298b).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #608      +/-   ##
==========================================
- Coverage   89.98%   89.96%   -0.02%     
==========================================
  Files          49       49              
  Lines        8235     8224      -11     
==========================================
- Hits         7410     7399      -11     
  Misses        825      825              

☔ View full report in Codecov by Harness.
📢 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.

This branch has not been deployed

No deployments
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.

1 participant