The same quantum operations, written in every major framework. Click any framework to jump to its full reference.
Which framework should I use?
Learning quantum computing from scratch
Qiskit
It has the largest community, the most tutorials, and free IBM hardware access via the cloud. The documentation is exceptionally beginner-friendly, with interactive textbooks and a thriving forum.
Built specifically for differentiable quantum computing, with automatic differentiation and clean PyTorch/TensorFlow integration. It has the best QML ecosystem by far, including datasets and model zoo.
The native framework for Google's Sycamore and Willow processors. It exposes fine-grained control over qubit placement and gate timing that hardware research requires.
Unified SDK for IonQ, Rigetti, QuEra, IQM, and simulators on AWS. Ideal when you want to compare hardware backends or run production workloads on managed cloud infrastructure.
The only production-ready framework for quantum annealing. Best for QUBO/Ising problems including scheduling, logistics, and portfolio optimization. QUBO formulation is required.
Xanadu's framework for CV quantum computing on photonic hardware. Essential for Gaussian Boson Sampling and optical quantum simulation on real photonic chips.
from pyquil import Program
from pyquil.gates import H, CNOT, MEASURE
p = Program()
ro = p.declare('ro', 'BIT', 2)
p += H(0)
p += CNOT(0, 1)
p += MEASURE(0, ro[0])
p += MEASURE(1, ro[1])
import qsharp
results = [qsharp.eval("""
use (q0, q1) = (Qubit(), Qubit());
H(q0); CNOT(q0, q1);
let r = (M(q0), M(q1));
ResetAll([q0, q1]); r
""") for _ in range(1000)]
from collections import Counter
print(Counter(results))
from pytket.utils import Graph
Graph(circ).get_DAG() # DAG view
# Or render via qiskit:
from pytket.extensions.qiskit import tk_to_qiskit
tk_to_qiskit(circ).draw('mpl')