Skip to documentation
← Quantum Computing

Quantum Computing / Guide

Circuit Composer

Build and edit a quantum circuit, inspect its behavior and run a recorded experiment.

Find your way around

Build is the circuit workspace. The gate library supplies operations; the canvas shows qubit wires and ordered gate columns. The code view provides another way to inspect the circuit. Below the circuit, the live results help you follow the current state.

Execute opens the run settings. Choose a compatible backend and available execution options there, then inspect the results in the workspace. Browse Algorithms in the header returns to the gallery; entries opened from the gallery show Back to Algorithms.

Your first circuit: a Bell pair

  1. Open Composer and start with an empty two-qubit circuit. If a circuit is already loaded, save it before clearing or replacing it.
  2. Place an H gate on q0. It prepares an equal superposition on that wire.
  3. Place a CX in a later column, with q0 as control and q1 as target. Use the gate editor to check both wires.
  4. Measure q0 into c0 and q1 into c1 after the CX.
  5. Inspect the Classical bits result. In an ideal noiseless execution the only outcomes are 00 and 11, each with probability 1/2.
  6. Open Execute, choose a compatible simulator and run. Sampled counts should be close to evenly divided; they need not be exactly equal. Sign in when prompted to save the execution in My Jobs.

The state before measurement is (|00⟩ + |11⟩)/√2. Both outcomes are random, but their two bits agree. Noise or circuit edits can introduce other outcomes.

Place and edit gates

Drag a gate from the library onto the desired wire and column. Gates execute in circuit order, so moving an operation can change the result. Select a placed gate and use its editor to inspect targets, controls and any rotation angle.

For the X family, the editor supports X, CX, CCX and MCX where enough distinct wires are available. A target cannot also be its own control. Parameterized gates such as RX, RY and RZ use angles; changing a parameter changes the operation.

Undo and redo help compare edits. Barriers visually separate stages; they are not extra physical transformations. Debug enables the circuit scrubber for inspecting intermediate steps.

Measurements and classical bits

A measurement records an outcome from a qubit into a classical bit. Confirm the destination bit in the circuit, especially when an algorithm measures only an output register.

The Qubits and Classical bits charts describe different registers. For a protocol with mid-circuit measurements, reset or classical feed-forward, use a backend that supports those operations. A circuit that is valid for one simulator may be incompatible with another.

Save, load and export

Use Save to preserve a circuit for later editing, and Load to reopen saved work. Saving a circuit and running an experiment are separate actions: a saved run records the submitted circuit and its execution settings.

The Composer also provides diagram exports and a code view for working with QASM. When applying imported or edited code, check validation messages and inspect the reconstructed circuit before running. Reopening a saved circuit does not automatically replay its historical measurement results.