Quantum Lab - write quantum code, solve challenges

Write Python using the built-in QuantumCircuit API. Your code runs in a secure sandbox. Build your circuit in a variable named qc, then Run to see the state or Check to grade your solution.

Challenges
Loading...
Playground

Free play - write any quantum code and Run it.

Output
Run your code to see output here.
Measurement probabilities
No circuit simulated yet.
Gate cheat sheet
qc = QuantumCircuit(n) · qc.h(q) Hadamard · qc.x/y/z(q) Pauli · qc.s(q)/qc.t(q) phase · qc.rx/ry/rz(theta, q) rotations · qc.cx(c, t) CNOT · qc.cz(c, t) · qc.swap(a, b) · qc.ccx(c1, c2, t) Toffoli · print(qc.draw())
Qubit 0 is the left-most bit: |q0 q1 ...>.