Qiskit / qiskit

Qiskit is an open-source SDK for working with quantum computers at the level of extended quantum circuits, operators, and primitives.
https://www.ibm.com/quantum/qiskit
Apache License 2.0
4.85k stars 2.29k forks source link

Add remaining standard gates to rust representation #12566

Open mtreinish opened 3 weeks ago

mtreinish commented 3 weeks ago

What should we add?

After #12459 has merged there is now a native rust representation of the standard gate library. However, due to the size of #12459 not all gates were added to this rust representation. This issue tracks the migration of the remaining gates so that we have the complete standard gate library in rust. The remaining gates are:

### Tasks
- [x] C3XGate https://github.com/Qiskit/qiskit/pull/12659
- [x] C3SXGate https://github.com/Qiskit/qiskit/pull/12659
- [ ] C4XGate https://github.com/Qiskit/qiskit/pull/12659
- [x] DCXGate https://github.com/Qiskit/qiskit/pull/12644
- [x] CHGate https://github.com/Qiskit/qiskit/pull/12639
- [x] CPhaseGate https://github.com/Qiskit/qiskit/pull/12639
- [x] CRXGate https://github.com/Qiskit/qiskit/pull/12648
- [x] CRYGate https://github.com/Qiskit/qiskit/pull/12648
- [x] CRZGate https://github.com/Qiskit/qiskit/pull/12648
- [x] CSGate https://github.com/Qiskit/qiskit/pull/12639
- [x] CSdgGate https://github.com/Qiskit/qiskit/pull/12639
- [x] CSwapGate https://github.com/Qiskit/qiskit/pull/12639
- [x] CSXGate https://github.com/Qiskit/qiskit/pull/12639
- [x] CUGate https://github.com/Qiskit/qiskit/pull/12659
- [x] CU1Gate https://github.com/Qiskit/qiskit/pull/12659
- [x] CU3Gate https://github.com/Qiskit/qiskit/pull/12659
- [x] CCZGate https://github.com/Qiskit/qiskit/pull/12659
- [x] MSGate
- [x] PhaseGate
- [ ] RCCXGate https://github.com/Qiskit/qiskit/pull/12659
- [ ] RC3XGate https://github.com/Qiskit/qiskit/pull/12659
- [x] RGate https://github.com/Qiskit/qiskit/pull/12662 ~https://github.com/Qiskit/qiskit/pull/12507~
- [x] RXXGate https://github.com/Qiskit/qiskit/pull/12672
- [x] RYYGate https://github.com/Qiskit/qiskit/pull/12672
- [x] RZZGate https://github.com/Qiskit/qiskit/pull/12672
- [x] RZXGate https://github.com/Qiskit/qiskit/pull/12672
- [x] XXMinusYYGate https://github.com/Qiskit/qiskit/pull/12606
- [x] XXPlusYYGate https://github.com/Qiskit/qiskit/pull/12606
- [x] SGate https://github.com/Qiskit/qiskit/pull/12598
- [x] SdgGate https://github.com/Qiskit/qiskit/pull/12598
- [x] iSwapGate https://github.com/Qiskit/qiskit/pull/12598
- [x] SXGate https://github.com/Qiskit/qiskit/pull/12598
- [x] SXdgGate https://github.com/Qiskit/qiskit/pull/12598
- [x] TGate https://github.com/Qiskit/qiskit/pull/12598
- [x] TdgGate https://github.com/Qiskit/qiskit/pull/12598
- [x] U1Gate https://github.com/Qiskit/qiskit/pull/12572
- [x] U2Gate https://github.com/Qiskit/qiskit/pull/12572
- [x] U3Gate https://github.com/Qiskit/qiskit/pull/12572
ElePT commented 3 weeks ago

EDIT: All done now. I will give a try to the following gates with the following indices in the table:

eliarbel commented 1 week ago

Is MSGate here by accident?

mtreinish commented 1 week ago

I just copied this from the list in the python code. We can skip MSGate since it shouldn't matter unless we need to generate it from Rust. Since it's mostly there for backwards compatibility and has been superseded by GMS we don't need to worry about it for this issue. It'll be easy to add in the future if the need arises.