Support non-Clifford gates
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 64
- Forks
- 16
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 5
Description
For universal FTQC protocol, we need to have non-Clifford logical gates. Currently there is no support for it at all. User can get around with it by either manually specifying the checks, errors and propagation rules (which is tedious and no tools to help), or use some tricks to have the non-Clifford resource state as a separate gadget (empty body) and then use COMPOSE to build a non-Clifford logical gate. Neither of the two approaches are easy to use, and plus, we don't have a single place to describe both simulation and decoding.
I would propose adding a special set of stim gates for simulation and decoding: R_Z(), T=R_Z(0.25), R_X(), TX=R_X(0.25), R_Y(), TY=RY(0.25), T_DAG, TX_DAG, TY_DAG, ....
For simulation, we simply output these gates to the stim file (now it's an extension of stim gates, which can be understood by some simulators like CliffT or tsim)
For decoding, we can still help user find checks automatically. We can basically allocate a random bit in paulimer outcome-complete simulator: r = sim.allocate_random_bit() and then apply the corresponding Pauli (Z for R_Z) sim.apply_conditional_pauli(SparsePauli.z(qubit), [r], parity=True). This gives us a conservative set of checks even in the presence of non-Clifford gates.
Contributor 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.
Research direction
Start by reading the existing COMPOSE path and the paulimer outcome-complete simulator, including allocate_random_bit and apply_conditional_pauli. Determine how the proposed non-Clifford gates should be represented for simulation and decoding, then verify that both workflows support the gates and produce conservative checks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100