Quantum basics
A qubit is the quantum version of a bit. Instead of being only 0 or 1, it can be in a superposition of both until it is measured.
The state of one qubit is a unit vector in a two-dimensional complex space. We write the two basis states as |0⟩ and |1⟩, and a general state as:
Every single-qubit state can be drawn as a point on the Bloch sphere. The north pole is |0⟩, the south pole is |1⟩, and points on the equator are equal superpositions with different phases:
Two or more qubits live in the tensor product space. Two qubits have four basis states |00⟩, |01⟩, |10⟩, |11⟩. Qiskit orders bits with qubit 0 on the right, so |10⟩ means q1 = 1 and q0 = 0.
Measurement in the computational basis gives a classical bit: outcome x with probability |amplitude of x|². After measuring, the state collapses to that outcome. Running the same circuit many times (shots) and counting outcomes estimates the probabilities.
Gates are unitary matrices U (U†U = I). A circuit is a product of gates applied in time order, so the final state is U_n … U_2 U_1 |0…0⟩. The Compile step in QubitLab shows this matrix for circuits up to 3 qubits.
Why OpenQASM 3 only? QubitLab never runs user Python. OpenQASM is a safe description of a circuit that the server can parse and check before anything executes.