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.
Free play - write any quantum code and Run it.
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())