Documentation

Language reference

The statements you need for a first circuit: qubits, gates, and measurement.

Qubits and classical bits

QUBIT q1, q2 declares quantum bits. Measurement writes into classical targets named on the right of the arrow.

Gates

  • H(q) puts a qubit in superposition.
  • X(q), Y(q), and Z(q) are the Pauli gates.
  • CNOT(control, target) flips the target when the control is 1.
  • MEASURE q -> c stores the collapsed bit.

CLI

Compile and run a file with the local simulator:

cd cli
python qubitlang_cli.py run bell.ql

The same source can be submitted from the dashboard Jobs page. Choose the simulator or an IBM backend. IonQ and Rigetti are deferred.