Tutorials
Hands-on walkthroughs. Each takes a few minutes and needs only a free account.
1. Your first entangled pair
Open Jobs, paste this circuit (or click the Bell pair example) and run 1000 shots on the simulator.
OPENQASM 2.0;
include "qelib1.inc";
qreg q[2];
creg c[2];
h q[0];
cx q[0], q[1];
measure q -> c;You should see only 00 and 11, close to 500 each. Remove the cx line and run again: now all four results appear, because the qubits are no longer linked.
2. Three qubits that always agree
Extend the pair to a GHZ state by entangling a third qubit:
OPENQASM 2.0;
include "qelib1.inc";
qreg q[3];
creg c[3];
h q[0];
cx q[0], q[1];
cx q[1], q[2];
measure q -> c;Only 000 and 111 appear. Compare the depth reported for this job with the Bell pair's.
3. A random number generator
A Hadamard on each qubit makes every outcome equally likely, so each shot is a random 4-bit number:
OPENQASM 2.0;
include "qelib1.inc";
qreg q[4];
creg c[4];
h q[0]; h q[1]; h q[2]; h q[3];
measure q -> c;Run 1600 shots: each of the 16 results should appear about 100 times.
4. Publish your own circuit
- In Develop, create a project and open it in the browser IDE.
- Add your circuit, commit, and use Publish to Registry with version
1.0.0. - Find it in the Registry; others can now download it.
More detail in the documentation.