Skip to content

Add controlled-Z gate to QuMat - #1580

Open
Asterisk-Hunter wants to merge 1 commit into
apache:mainfrom
Asterisk-Hunter:qumat-cz-gate
Open

Asterisk-Hunter wants to merge 1 commit into
apache:mainfrom
Asterisk-Hunter:qumat-cz-gate

Conversation

@Asterisk-Hunter

Copy link
Copy Markdown

Related Issues

Part of #1511

Changes

  • Bug fix
  • New feature
  • Refactoring
  • Documentation
  • Test
  • CI/CD pipeline
  • Other

Why

QuMat does not currently expose the controlled-Z gate through its unified API, so users must call backend-specific SDK methods for this common two-qubit operation.

How

  • Add apply_cz_gate to the QuMat API and implement it for Qiskit, Cirq, and Amazon Braket.
  • Document its action on computational basis states and its API usage.
  • Add a state-vector test that checks the phase on |11> across all three backends.

Checklist

  • Added or updated unit tests for all changes
  • Added or updated documentation for all changes

Verified with uv run --no-dev --with pytest --with numpy pytest testing/qumat/test_multi_qubit_gates.py -k cz_gate_phase_on_two_qubit_superposition -q (3 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.

1 participant