[Feature] Add missing gates to QuMat: S, S-dagger, T-dagger, CZ, Phase
Maintainers usually reply within 2 days
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 70/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- python
- Domain
- quantum-computing
Research direction
Start by reading the existing apply_t_gate in qumat/qumat.py and its implementation in qumat/qiskit_backend.py, qumat/cirq_backend.py and qumat/amazon_braket_backend.py. Pick one gate from the checklist and claim it in a comment, then add the same pattern for it plus a row in docs/qumat/basic-gates.md. Done means the gate is callable through QuMat on all three backends and a state-vector test in testing/qumat/test_single_qubit_gates.py or test_multi_qubit_gates.py passes.
Written by the indexing model from the issue text.
Description
What
QuMat currently exposes these gates: not, hadamard, cnot, toffoli, swap, cswap, pauli_x, pauli_y, pauli_z, t, rx, ry, rz, u.
Several common gates are missing. This issue tracks adding them, one gate per pull request:
-
apply_s_gate(S, phase of π/2) -
apply_sdg_gate(S-dagger) -
apply_tdg_gate(T-dagger) -
apply_cz_gate(controlled-Z) -
apply_phase_gate(Phase P(λ), accepting a float or a parameter name likerx)
Why
S, S†, T† and CZ show up in most textbook circuits and in standard transpilation targets, and the Phase gate is needed for parameterized feature maps. Users currently have to drop down to the underlying SDK to use them, which defeats the point of the unified API.
How
Follow the pattern of apply_t_gate:
- Add
QuMat.apply_<gate>_gateinqumat/qumat.py. - Implement it in all three backends:
qumat/qiskit_backend.py,qumat/cirq_backend.py,qumat/amazon_braket_backend.py. - Add a row to
docs/qumat/basic-gates.md. - Add a test in
testing/qumat/test_single_qubit_gates.pyortest_multi_qubit_gates.pythat checks the state vector on all backends.
Claim a gate by commenting with its name so two people do not pick the same one.
Part of the Apache Mahout hackathon at Community over Code Glasgow 2026 (Track A, Qumat).
- Dominant language
- Rust
- Stars
- 2.3k
- Forks
- 1k
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 7
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/mahout
-
[Bug] Amazon Braket get_final_state_vector() changes the circuit, so execute_circuit() fails afterwardsPossibly taken @Howardisme claimed this 48 days ago. Openbug enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
apache/mahout#1538 · 1 comment ·
Maintainers usually reply within 2 days
-
[Bug] Reusing a parameter name on two gates fails on Qiskit only (name conflict adding parameter)Possibly taken @Imad2702 claimed this 50 days ago. Openbug enhancement good-first-issue qumat
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
apache/mahout#1509 · 2 comments ·
Maintainers usually reply within 2 days
-
[Bug] Cirq backend ignores the initialized simulator and creates its own cirq.Simulator()Possibly taken @Howardisme claimed this 49 days ago. Openbug enhancement good-first-issue qumat
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
apache/mahout#1508 · 1 comment · 1 assignee ·
Maintainers usually reply within 2 days
-
[Bug] Unknown backend_name leaks ModuleNotFoundError instead of a clear ValueErrorPossibly taken @Asterisk-Hunter claimed this 38 days ago. Openbug enhancement good-first-issue qumat
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
apache/mahout#1506 · 5 comments ·
Maintainers usually reply within 2 days
-
bug docs enhancement question
Difficulty 5/5 Over a week Newbie friendliness 35/100
Maintainers usually reply within 2 days
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
documentation
Difficulty 1/5 1-3 hours Newbie friendliness 95/100
ClickHouse/clickhouse-rs#589 ·
Maintainers usually reply within 2 days
-
needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
pbakaus/impeccable#1887 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 95/100
bruits/satteri#400 · 2 comments ·
Maintainers usually reply within 5 days