ProjectQ-Framework / ProjectQ

ProjectQ: An open source software framework for quantum computing
https://projectq.ch
Apache License 2.0
893 stars 276 forks source link

Implement IonQ native gates support #438

Open Cynocracy opened 2 years ago

Cynocracy commented 2 years ago

We recently launched our native gates, and are looking to add support in ProjectQ.

Qiskit implementation: https://github.com/Qiskit-Partners/qiskit-ionq/blob/main/qiskit_ionq/ionq_gates.py Cirq implementation: https://github.com/quantumlib/Cirq/blob/master/cirq-ionq/cirq_ionq/ionq_native_gates.py

We are considering sponsoring this for unitary hack if we can tag things appropriately :)

InfamousPlatypus commented 2 years ago

I would not mind helping, I don't know how to start though.

Takishima commented 2 years ago

Hi, Sorry for my late reply.

In order to support a new type of gate, you simply need to define a new class that derives from BasicGate. If you define the matrix property (or member function), then the simulator will know how to deal with it.

Have a look at the definitions for X, Rx for example (can be found in projectq/ops/_gates.py