Simulate the circuits inside a quantum computer: first here in your browser, then in Python with QuTiP and scqubits.
Superconducting quantum computers are built from a few kinds of circuit: a loop with a Josephson junction (the transmon, the fluxonium), a resonator that reads it, and a neighbour it talks to. Two free programs are what researchers commonly reach for to compute what such a circuit does. scqubits finds the energy levels of the circuit. QuTiP follows how its state changes in time, with losses. This page puts nineteen explorers in one place: seventeen of that physics, and two of the circuits people write on top of it in Qiskit and Cirq. Each is checked number for number against the real programs, and each sends you to the lesson that explains it and the Python that reproduces it.
Nothing here is a video: every curve is computed in your browser as you move a slider. The Workbench course (topics 24 to 41 of The Machinery) starts from nothing but vectors and matrices, fits a chip to a measurement, and ends with circuits in Qiskit and Cirq, compiled for a chip and run with noise.
A free, open-source Python package for the dynamics of quantum systems. It holds states and operators as objects, joins systems with tensor products, and solves how they change in time, with or without loss (sesolve, mesolve, mcsolve).
Expect a Rabi oscillation, a T1 decay or a pulse to be a few lines each, and the units (GHz against radians per nanosecond) and the cutoff of every oscillator to be your job to get right.
Lesson 34: Qobj · Lesson 35: solvers · documentation · QuTiP 5 paper
A free, open-source Python package that knows the Hamiltonians of the common superconducting circuits (transmon, tunable transmon, fluxonium and others) and returns their energy levels, wavefunctions, matrix elements and coherence estimates, alone or coupled to a resonator, with parameter sweeps.
Expect to go from EJ and EC to a qubit frequency and an anharmonicity in five lines, and to hand the result to QuTiP for time evolution. It does not draw the chip: it starts from the circuit’s energies.
Lesson 36: qubits · Lesson 37: coupled systems · documentation · paper (Quantum 5, 583)
Build a three-qubit state from gates and watch the eight amplitudes; then see what each extra qubit does to the memory. Lesson 24.
The Schrödinger equation for one qubit: set a field and watch the Bloch vector turn. Lesson 25.
A computer keeps a finite ladder of levels. Move the cutoff until the answer stops changing. Lesson 26.
The first experiment on a new qubit: pulse length against drive frequency. Click the picture to slice it. Lesson 27.
The exact lab-frame answer against the rotating-wave one. Lesson 27.
Set the two clocks and run a T1 and a Ramsey experiment on the Lindblad equation. Lesson 28.
Choose EJ, EC and the offset charge; read off the levels, the anharmonicity and the charge sensitivity. Lesson 29.
The spectrum, the potential and the two lowest wavefunctions; find the sweet spot at half a flux quantum. Lesson 30.
The avoided crossing and the dispersive shift that reads a qubit out. Lesson 31.
Place two transmons and watch the ZZ coupling and the frequency collisions. Lesson 32.
Six steps with a copy button on each, and a search box that points to the right page of each program’s own documentation. Lesson 33.
A line of QuTiP in, the matrix and its properties out. Lesson 34.
Rabi, T1, Ramsey or echo, with the code that gives the same curve. Lesson 35.
Choose a qubit and a parameter; see the levels or the wavefunctions; copy the code. Lesson 36.
The avoided crossing from a ParameterSweep, with the size of the gap read off. Lesson 37.
From a chip layout to a number, and the other open tools in the field. Lesson 38.
The inverse problem, as a game with a hidden answer. Lesson 39.
Build a three-qubit circuit and get the code for it in both toolkits; see why the same state has two names. Lesson 40.
Errors after each gate, idling with T1 and T2, and readout error; the fidelity, and the line below which it no longer proves entanglement. Lesson 41.
| You want | QuTiP | scqubits |
|---|---|---|
| A qubit state, an operator | basis(2, 0), sigmax(), destroy(N) | |
| Two systems joined | tensor(A, B), rho.ptrace(0) | HilbertSpace([sys1, sys2]) with add_interaction |
| The levels of a circuit | H.eigenenergies() | Transmon(EJ, EC, ng, ncut).eigenvals() |
| How a state changes in time | sesolve, mesolve, mcsolve | hs.hamiltonian() hands a QuTiP object to them |
| Add T1 and T2 | c_ops: sqrt(1/T1)*destroy(2), sqrt(gphi/2)*sigmaz() | qubit.t1_capacitive(...) estimates T1 from a loss model |
| A sweep of a parameter | a loop over sesolve | qubit.plot_evals_vs_paramvals(...), ParameterSweep |
| Check a result | run at two cutoffs and two tolerances | raise ncut or cutoff and see that it does not move |
Units everywhere on this site: energies and frequencies in GHz, times in ns; a solver wants rad per ns, so multiply a frequency by 2π.
These are topics 24 to 41 of The Machinery, eighteen lessons in six groups. Each has a picture, the intuition, the mathematics with a worked Python example, and where it is used; every number in them was produced by QuTiP, scqubits, Qiskit or Cirq and is re-checked when the site is built.