Create your first quantum circuit

You can use Circuit Composer to build and run a complete quantum circuit. For your “Hello world” circuit, you will create a Bell state.

The visualizations at the bottom of the page will automatically update to reflect simulated results as you add operations to your circuit. However, if you would like the option to run your circuit on real quantum hardware or a simulator, or if you wish to visualize more than four qubits, you will need to sign in to IBM Quantum by clicking Sign in in the upper right corner.


To follow these steps while building the circuit in IBM Quantum Composer, use the Application switcher in the top left corner to select Quantum Composer, then click the Composer docs and tutorials icon. Under Getting Started, select Create your first circuit walkthrough.

Where to find the walkthrough.

Step 1. Open IBM Quantum Composer.

To open Circuit Composer, click the Application switcher ( switcher ) in the upper left corner, and choose Composer.

You will see a set of horizontal lines, or wires, that resemble a ruled piece of paper. The top wires (labeled q[0], q[1], etc.) are the qubits, and the bottom wire (labeled c3) is a classical register.

Step 2. Add an H gate (Hadamard gate) to your circuit.

To add an H gate to your circuit, drag and drop the H operation had from the operations catalog to the top qubit, q0.

Hadamard gate on q[0].

Step 3. Add a CNOT gate to your circuit.

To add a CNOT gate to your circuit, drag and drop the CNOT operation cnot from the operations catalog to the right of the H gate. This operation acts on two qubits.

CNOT gate added to circuit.

Step 4. Add measurement operations.

To add a measurement to your circuit, drag and drop the measurement operation meas from the operations catalog to the right of the CNOT operation, on wire q0, then add another measurement on wire q1.

measurement operations on circuit.

The measurement results are recorded as classical bits on the classical register. The vertical wire connecting the measurement operation to the bottom wire depicts information flowing from the qubit down to the classical register.

You have now built your first quantum circuit. The visualization panels below your circuit give a simulated result that updates automatically as you add and remove operations.

To learn more about visualizations, review the Visualizations topic.

For instructions to run this circuit on a quantum system, see Run circuits and view results.