Supported instructions
Supported Qiskit gates
Custom Felis gates
All Felis backends support two custom gates: initialize
and measure_x
:
-
initialize(value, qubit_index)
- It initializes qubit
qubit_index
to one of four supportedvalue
:'0'
,'1'
,'+'
,'-'
- It initializes qubit
-
measure_x(qubit_index, clbit_index)
- It performs an X measurement on qubit
qubit_index
and stores the result in the classical bitclbit_index
- It performs an X measurement on qubit
While these gates can be theoretically recreated using X
, H
and Z
gates, they are still needed because:
- In physical backends,
H
is not supported - In logical backends, they are a less costly way to initialize and measure than by using several gates
In addition to these two gates, you may use some or all of the other gates listed in the Qiskit documentation.
The sections below list which gates you may use depending on the backend you're using.
Logical backends
We have two candidate logical gate sets for our future error-corrected quantum processors:
- Hadamard + Toffoli
- Clifford + T
Depending on the use case, one may yield better results than the other. In the scope of Felis' logical backends, we chose to support both T and Toffoli gates, so you can choose to which gate set you will transpile your programs. Our engine currently only transpiles to Clifford + T.
More precisely, the gates natively supported by all logical backends are:
initialize
(custom Felis gate)measure_x
(custom Felis gate)delay
(native Qiskit gate)x
(native Qiskit gate)z
(native Qiskit gate)measure
(native Qiskit gate)t
(native Qiskit gate)tdg
(native Qiskit gate)h
(native Qiskit gate)s
(native Qiskit gate)sdg
(native Qiskit gate)cx
(native Qiskit gate)ccx
(native Qiskit gate)
If the gate is not part of this native gate set, it will be implemented through transpilation, as shown in this example.
Physical backends
Physical backends support a limited set of gates, summarized in this table:
Instruction | [QPU:1Q:BOSON_4x] | [EMU:1Q:LESCANNE_2020] | [EMU:6/40Q:PHYSICAL_CATS] |
---|---|---|---|
delay |
✅ | ✅ | ✅ |
initialize |
✅ | ✅ | ✅ |
z |
✅ | ✅ | ✅ |
x |
✅ | ❌ | ✅ |
rz |
❌ | ✅ | ✅ |
cx |
❌ | ❌ | ✅ |
measure |
✅ | ✅ | ✅ |
measure_x |
✅ | ✅ | ✅ |
Note that these operations are all bias-preserving (i.e. they do not convert a phase-flip error into a bit-flip error).
Because this gate set is not universal, transpiling an arbitrary circuit for physical backends is usually not possible. Physical backends are meant to run error correction experiments, rather than algorithms. If you want to run algorithms, consider using logical backends instead.
To know which gate is supported by which backend, check the table above or your backend's page in the Backends section
Supported QIR instructions
The API exposes the list of available targets (the equivalent of Qiskit backends) and details for each of them the list of supported instructions.
https://api-gcp.alice-bob.com/v1/targets/
-
Here’s a sample response (for the
EMU:1Q:LESCANNE_2020
model only).json [ { "name": "EMU:1Q:LESCANNE_2020", "numQubits": 1, "instructions": [ { "signature": "__quantum__qis__read_result__body:i1 (%Result*)" }, { "signature": "__quantum__qis__z__body:void (%Qubit*)" }, { "signature": "__quantum__qis__x__body:void (%Qubit*)" }, { "signature": "__quantum__qis__mz__body:void (%Qubit*, %Result*)" }, { "signature": "__quantum__qis__m__body:void (%Qubit*, %Result*)" }, { "signature": "__quantum__qis__measure__body:void (%Qubit*, %Result*)" }, { "signature": "__quantum__qis__mx__body:void (%Qubit*, %Result*)" }, { "signature": "__quantum__qis__reset__body:void (%Qubit*)" }, { "signature": "__quantum__qis__delay__body:void (double, %Qubit*)" }, { "signature": "__quantum__qis__prepare_x__body:void (i1, %Qubit*)" }, { "signature": "__quantum__qis__prepare_z__body:void (i1, %Qubit*)" }, { "signature": "__quantum__qis__rz__body:void (double, %Qubit*)" } ], "inputParams": { "nbShots": { "required": true, "default": 1000, "constraints": [ { "min": 1, "max": 10000000 } ] }, "averageNbPhotons": { "required": true, "default": 4.0, "constraints": [ { "min": 1.0, "max": 7.0 } ] } } }, ... ]
When working with the remote provider AliceBobRemoteProvider
, the supported QIR instructions are fetched by the provider from the API and converted into Qiskit instructions.