Skip to content

Input Formats

Open Quantum accepts quantum programs in three input language families. Each backend declares the families it can run in its constraint_data.supported_formats list (defaulting to OpenQASM when omitted), and both the portal and the API validate submissions against it.

input_format File extensions Shots Availability
qasm (default) .qasm, .qasm2, .qasm3 Required All gate-based quantum computers
qblox_sequence .json Not used (loops are encoded in the program) Qblox-controlled systems, with permission
qblox_schedule .json Required Qblox-controlled systems, with permission

All gate-based quantum computers accept OpenQASM. The two Qblox families are an advanced feature set: they are accepted only by systems built on a Qblox controller, require permission to use, and should be used with caution because they program the control hardware directly.

When you upload a file in the portal, the format is detected automatically: an OPENQASM 2.x or 3.x header means OpenQASM, and JSON files are classified by their structure as described below. Backends that cannot run the detected format are dimmed in the backend picker. In the SDK, pass input_format explicitly (see Job Submission).

OpenQASM

OpenQASM is the open standard assembly language for quantum circuits: qubit registers, gates, measurement, and classical control in plain text. It is the portable default, accepted by all gate-based quantum computers, and the easiest path onto the platform since every major framework (Qiskit, PennyLane, Cirq, Qrisp) can export it.

Open Quantum supports both OpenQASM 2 and OpenQASM 3. The version is detected from the mandatory header line, so no separate declaration is needed:

OPENQASM 2.0;
include "qelib1.inc";
qreg q[2];
creg c[2];
h q[0];
cx q[0],q[1];
measure q -> c;

Your circuit must include measurements; the backend returns counts over the measured bits.

References:

Qblox sequences

A Qblox sequence is a Q1ASM assembly program plus its waveform data, executed directly by the sequencers on Qblox control hardware. This is the lowest-level input the platform accepts and gives full control over timing and playback. Only systems with a Qblox controller accept sequences, and submitting them requires permission; use them with caution.

Upload a single JSON object with these keys:

Key Required Description
program Yes The Q1ASM program as a string.
waveforms Yes Waveform definitions, each with data (list of samples) and index. May be empty.
weights No Acquisition weights, same structure as waveforms.
acquisitions No Acquisition bins, each with num_bins and index.
{
    "program": "wait_sync 4\nplay 0,0,4\nstop",
    "waveforms": {
        "gaussian": { "data": [0.0, 0.05, 0.1], "index": 0 }
    },
    "weights": {},
    "acquisitions": {}
}

Repetitions are encoded as loops in the Q1ASM program itself, so no shot count is used for sequence jobs; the portal hides the shots field when a sequence is uploaded. The structure matches what qblox-instruments expects for a sequencer's sequence parameter.

References:

Qblox schedules

A Qblox schedule is a pulse-level experiment description from the qblox-scheduler package: operations (gates, pulses, acquisitions) placed on a timeline by schedulables. Unlike a sequence, a schedule is compiled on the platform against the backend's hardware configuration, and shots are supplied at submission like an OpenQASM job. Like sequences, schedules are accepted only by systems with a Qblox controller and require permission; use them with caution.

Build your schedule with qblox-scheduler and export it with the library's own serializer; do not hand-edit the result:

schedule.to_json_file("my_schedule.json")

Open Quantum accepts the serialized forms qblox-scheduler produces:

  • A serialized TimeableSchedule: an object with deserialization_type and a data body containing operation_dict (or operations) and schedulables.
  • A compiled schedule containing compiled_instructions.

References: