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 only supports circuits represented as OpenQASM 2.0 strings. Support for OpenQASM 3.0 is planned for the first half of 2023.

OpenQASM 2.0 Requirements

Inputs to Fire Opal's execute function must be written as valid OpenQASM 2.0 strings. For an example of how to convert a quantum circuit represented in Qiskit to OpenQASM, see our How to run a Qiskit program using Fire Opal user guide. In addition to the general OpenQASM 2.0 guidelines, we have several Fire Opal-specific formatting requirements for your circuits:

  1. Measurement Gates – The program must contain at least one measurement gate.

  2. Quantum Registers – The program must contain at least one quantum register.

  3. Classical Registers – The program must contain at least one classical register.

  4. Register Names – The qubits and classical bits can not share the name of any quantum gates. For instance, qreg qubit[16] is allowed, while qreg x[16] will throw an error because "x" is the name of a quantum gate.

  5. Maximum Qubits – The program must abide by device qubit limitiations.

  6. 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

In addition to the OpenQASM 2.0 requirements, we currently support a wide variety of quantum gates. These are:

  • 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 2.0 name for the gate. You may also construct your own gates using any combination of these basic gates.

Was this useful?

Fire Opal

Optimize your quantum algorithms

Next up

Continue learning about Fire Opal

Benchmarking results

Evaluating Fire Opal performance improvement across multiple benchmark algorithms