ProjectQ icon indicating copy to clipboard operation
ProjectQ copied to clipboard

Implement IonQ native gates support

Open Cynocracy opened this issue 2 years ago • 2 comments

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 :)

Cynocracy avatar Jun 02 '22 23:06 Cynocracy

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

InfamousPlatypus avatar Aug 04 '22 12:08 InfamousPlatypus

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

Takishima avatar Sep 01 '22 19:09 Takishima