Fire Opal circuit requirements
A comprehensive list of circuit requirements for Fire Opal compatibility
Fire Opal automates the optimization of quantum circuits allowing the user to achieve great performance gains without any configuration. The various circuit optimizations outlined in our technical manuscript require the circuit to follow the requirements listed below. Currently Fire Opal supports circuits represented as OpenQASM 2.0 and OpenQASM 3.0 strings. OpenQASM 3.0 is currently experimentally supported by hardware platforms. For an updated list of features supported in OpenQASM 3.0, refer to the specification.
OpenQASM 2.0/3.0 Requirements
Inputs to Fire Opal's execute
function must be written as valid OpenQASM 2.0/3.0 strings. In addition to the general OpenQASM spec, the following requirements are also relvant for Fire Opal:
-
Measurement Gates – The program must contain at least one measurement gate.
-
Quantum Registers – The program must contain at least one quantum register.
-
Classical Registers – The program must contain at least one classical register.
-
Register Names – The qubits and classical bits can not share the name of any quantum gates. For instance,
qreg qubit[16]
is allowed, whileqreg x[16]
will throw an error because "x
" is the name of a quantum gate. -
Maximum Qubits – The program must abide by device qubit limitiations.
-
Ancilla Qubits – The program should not contain any register of ancilla qubits. Every qubit that is used in the circuit should belong to the sole quantum register.
Supported gates
Fire Opal supports the following quantum gates:
- Hadamard (
h
) - X (
x
) - Y (
y
) - Z (
z
) - Identity (
id
) - Phase (
p
) - Rotation X (
rx
) - Rotation Y (
ry
) - Rotation Z (
rz
) - Sqrt(X) (
sx
) - Inverse Sqrt(X) (
sxdg
) - S-Adjoint (
sdg
) - T-adjoint (
tdg
) - U1 (
u1
) - U2 (
u2
) - U3 (
u3
) - U (
u
) - Controlled-X (
cx
) - Controlled-Y (
cy
) - Controlled-Z (
cz
) - SWAP (
swap
) - Rotation-XX (
rxx
) - Rotation-ZZ (
rzz
) - Controlled-Hadamard (
ch
) - Controlled-Phase (
cp
) - Controlled-Ry (
cry
) - Controlled-Rz (
crz
) - Controlled-U (
cu
) - Controlled-U1 (
cu1
) - Toffoli (
ccx
) - Fredkin (
cswap
) - Barrier (
barrier
) - Measure (
measure
)
with each parenthetical containing the respective OpenQASM name for the gate. You may also construct your own gates using any combination of these basic gates.