{"runs":[{"id":"Gn2hs6w3","prompt":"Take one qubit on a tour of the Bloch sphere","title":"Bloch sphere tour","qasm":"OPENQASM 2.0;\ninclude \"qelib1.inc\";\nqreg q[1];\ncreg c[1];\n// north pole to the equator\nh q[0];\n// four quarter-turns of T: half way round the equator\nt q[0];\nt q[0];\nt q[0];\nt q[0];\n// back over the top to the south pole\nh q[0];\n// tip it 60 degrees back up\nry(pi/3) q[0];\nmeasure q[0] -> c[0];","qubits":1,"clbits":1,"gates":7,"depth":7,"shots":1024,"counts":{"0":262,"1":762},"backend":"statevector","source":"library","author":null,"status":"done","created":1796287743856},{"id":"pJDVMcgP","prompt":"Prepare a 3-qubit W state","title":"W state","qasm":"OPENQASM 2.0;\ninclude \"qelib1.inc\";\nqreg q[3];\ncreg c[3];\n// q0 = sqrt(1/3)|0> + sqrt(2/3)|1>\nry(1.9106332362490186) q[0];\nch q[0],q[1];\nccx q[0],q[1],q[2];\ncx q[1],q[0];\ncx q[2],q[1];\n// move |000> to |010>\nx q[0];\nx q[2];\nccx q[0],q[2],q[1];\nx q[0];\nx q[2];\nmeasure q -> c;","qubits":3,"clbits":3,"gates":10,"depth":8,"shots":1024,"counts":{"100":345,"010":332,"001":347},"backend":"statevector","source":"library","author":null,"status":"done","created":1796287742856},{"id":"boXrdYHU","prompt":"Roll a fair 8-sided die","title":"Quantum random number","qasm":"OPENQASM 2.0;\ninclude \"qelib1.inc\";\nqreg q[3];\ncreg c[3];\n// three fair coins: every outcome 1/8\nh q[0];\nh q[1];\nh q[2];\nmeasure q -> c;","qubits":3,"clbits":3,"gates":3,"depth":1,"shots":1024,"counts":{"100":140,"101":117,"110":122,"111":116,"010":134,"001":132,"011":139,"000":124},"backend":"statevector","source":"library","author":null,"status":"done","created":1796287741856},{"id":"ozIEUp-9","prompt":"Send the two bits 10 by moving only one qubit","title":"Superdense coding","qasm":"OPENQASM 2.0;\ninclude \"qelib1.inc\";\nqreg q[2];\ncreg c[2];\n// shared Bell pair\nh q[0];\ncx q[0],q[1];\n// Alice encodes 10 on her half\nx q[0];\n// Bob decodes\ncx q[0],q[1];\nh q[0];\nmeasure q -> c;","qubits":2,"clbits":2,"gates":5,"depth":5,"shots":1024,"counts":{"10":1024},"backend":"statevector","source":"library","author":null,"status":"done","created":1796287740856},{"id":"imSycCg0","prompt":"Teleport a qubit from q0 to q2","title":"Teleportation","qasm":"OPENQASM 2.0;\ninclude \"qelib1.inc\";\nqreg q[3];\ncreg c[1];\n// the message: a qubit tilted 69 degrees off |0>\nry(1.2) q[0];\n// shared Bell pair between q1 and q2\nh q[1];\ncx q[1],q[2];\n// Bell measurement basis on q0, q1\ncx q[0],q[1];\nh q[0];\n// corrections, deferred\ncx q[1],q[2];\ncz q[0],q[2];\n// q2 now carries the message: P(1) = sin^2(0.6) = 0.32\nmeasure q[2] -> c[0];","qubits":3,"clbits":1,"gates":7,"depth":5,"shots":1024,"counts":{"0":714,"1":310},"backend":"statevector","source":"library","author":null,"status":"done","created":1796287739856},{"id":"rIsTRy4E","prompt":"Estimate the phase of the T gate with 3 counting qubits","title":"Phase estimation of T","qasm":"OPENQASM 2.0;\ninclude \"qelib1.inc\";\nqreg q[4];\ncreg c[3];\nh q[0];\nh q[1];\nh q[2];\n// eigenstate |1> of T\nx q[3];\n// controlled T^(2^k)\ncp(pi/4) q[0],q[3];\ncp(pi/2) q[1],q[3];\ncp(pi) q[2],q[3];\n// inverse QFT reads the phase out: 1/8 = 0.001\nswap q[0],q[2];\nh q[0];\ncp(-pi/2) q[0],q[1];\nh q[1];\ncp(-pi/4) q[0],q[2];\ncp(-pi/2) q[1],q[2];\nh q[2];\nmeasure q[0] -> c[0];\nmeasure q[1] -> c[1];\nmeasure q[2] -> c[2];","qubits":4,"clbits":3,"gates":14,"depth":10,"shots":1024,"counts":{"001":1024},"backend":"statevector","source":"library","author":null,"status":"done","created":1796287738856},{"id":"UbAQVk5p","prompt":"Recover the secret string 1011 in a single query","title":"Bernstein–Vazirani","qasm":"OPENQASM 2.0;\ninclude \"qelib1.inc\";\nqreg q[5];\ncreg c[4];\nx q[4];\nh q[0];\nh q[1];\nh q[2];\nh q[3];\nh q[4];\n// oracle for s = 1011: a CNOT wherever s has a 1\ncx q[0],q[4];\ncx q[1],q[4];\ncx q[3],q[4];\nh q[0];\nh q[1];\nh q[2];\nh q[3];\nmeasure q[0] -> c[0];\nmeasure q[1] -> c[1];\nmeasure q[2] -> c[2];\nmeasure q[3] -> c[3];","qubits":5,"clbits":4,"gates":13,"depth":6,"shots":1024,"counts":{"1011":1024},"backend":"statevector","source":"library","author":null,"status":"done","created":1796287737856},{"id":"7DL415ZB","prompt":"Is f(x) = x0 xor x1 xor x2 constant or balanced? One query.","title":"Deutsch–Jozsa","qasm":"OPENQASM 2.0;\ninclude \"qelib1.inc\";\nqreg q[4];\ncreg c[3];\n// ancilla in |->\nx q[3];\nh q[0];\nh q[1];\nh q[2];\nh q[3];\n// the oracle: parity of the input\ncx q[0],q[3];\ncx q[1],q[3];\ncx q[2],q[3];\nh q[0];\nh q[1];\nh q[2];\n// anything but 000 means balanced\nmeasure q[0] -> c[0];\nmeasure q[1] -> c[1];\nmeasure q[2] -> c[2];","qubits":4,"clbits":3,"gates":11,"depth":6,"shots":1024,"counts":{"111":1024},"backend":"statevector","source":"library","author":null,"status":"done","created":1796287736856},{"id":"5TzqIZXF","prompt":"Search 8 items for 101 using Grover, two iterations","title":"Grover search, 8 items","qasm":"OPENQASM 2.0;\ninclude \"qelib1.inc\";\nqreg q[3];\ncreg c[3];\nh q[0];\nh q[1];\nh q[2];\n// iteration 1 · oracle marks |101>\nx q[1];\nh q[2];\nccx q[0],q[1],q[2];\nh q[2];\nx q[1];\n// diffusion\nh q[0];\nh q[1];\nh q[2];\nx q[0];\nx q[1];\nx q[2];\nh q[2];\nccx q[0],q[1],q[2];\nh q[2];\nx q[0];\nx q[1];\nx q[2];\nh q[0];\nh q[1];\nh q[2];\n// iteration 2 · oracle\nx q[1];\nh q[2];\nccx q[0],q[1],q[2];\nh q[2];\nx q[1];\n// diffusion\nh q[0];\nh q[1];\nh q[2];\nx q[0];\nx q[1];\nx q[2];\nh q[2];\nccx q[0],q[1],q[2];\nh q[2];\nx q[0];\nx q[1];\nx q[2];\nh q[0];\nh q[1];\nh q[2];\nmeasure q -> c;","qubits":3,"clbits":3,"gates":43,"depth":21,"shots":1024,"counts":{"100":8,"101":965,"110":7,"111":6,"000":13,"010":11,"011":9,"001":5},"backend":"statevector","source":"library","author":null,"status":"done","created":1796287735856},{"id":"jXsDgt1P","prompt":"Find the marked item 11 in a list of four with Grover search","title":"Grover search, 4 items","qasm":"OPENQASM 2.0;\ninclude \"qelib1.inc\";\nqreg q[2];\ncreg c[2];\n// every item at once\nh q[0];\nh q[1];\n// oracle: flip the phase of |11>\ncz q[0],q[1];\n// diffusion: reflect about the average\nh q[0];\nh q[1];\nx q[0];\nx q[1];\ncz q[0],q[1];\nx q[0];\nx q[1];\nh q[0];\nh q[1];\nmeasure q -> c;","qubits":2,"clbits":2,"gates":12,"depth":7,"shots":1024,"counts":{"11":1024},"backend":"statevector","source":"library","author":null,"status":"done","created":1796287734856},{"id":"FkFHc2lI","prompt":"Make a 4-qubit GHZ state","title":"GHZ state","qasm":"OPENQASM 2.0;\ninclude \"qelib1.inc\";\nqreg q[4];\ncreg c[4];\n// one superposition…\nh q[0];\n// …fanned out to every qubit\ncx q[0],q[1];\ncx q[1],q[2];\ncx q[2],q[3];\nmeasure q -> c;","qubits":4,"clbits":4,"gates":4,"depth":4,"shots":1024,"counts":{"1111":510,"0000":514},"backend":"statevector","source":"library","author":null,"status":"done","created":1796287733856},{"id":"BRsgyrJq","prompt":"Entangle two qubits and show they always agree","title":"Bell pair","qasm":"OPENQASM 2.0;\ninclude \"qelib1.inc\";\nqreg q[2];\ncreg c[2];\n// put q0 in superposition: the arrow swings to the equator\nh q[0];\n// copy it into q1: both arrows shrink to the centre, now entangled\ncx q[0],q[1];\nmeasure q -> c;","qubits":2,"clbits":2,"gates":2,"depth":2,"shots":1024,"counts":{"11":525,"00":499},"backend":"statevector","source":"library","author":null,"status":"done","created":1796287732856}],"total":12,"shots":12288,"qubits":36}