Superfermion logo

Superfermion

High-performance quantum computing with a Python API and Rust simulation core.

pip install superfermion

Superfermion is a high-performance quantum computing framework. A fluent Python API for everything you write, a Rust simulation core for everything the computer runs. 3–5x faster than Qiskit Aer, 23–33x for MPS, and 1.9–43x on adjoint gradients against PennyLane's qml.grad (20 down to 4 qubits).

Choose your path

What's inside

CapabilityWhat you get
SimulationStatevector (CPU/GPU), MPS (200+ qubits), Stabilizer (1000+), Density Matrix
GradientsAdjoint (O(1)), Parameter-shift, SPSA, QNG, Riemannian — 5 methods
ChemistryJordan-Wigner, Bravyi-Kitaev, UCCSD, PySCF bridge, molecular library
CompilationGate cancellation, rotation merge, SABRE routing, Pauli twirling, DD
QEC10 codes + 4 decoders: Surface, Color, Toric, MWPM, Union-Find, BP+OSD
MLQuantum layers for PyTorch, Flax/JAX, TensorFlow
ProvidersIBM Quantum, IonQ, AWS Braket, OpenQuantum
InteropQiskit, Cirq, PennyLane, OpenQASM 2/3 import/export
import superfermion as sf

# Bell state — 3 lines
qc = sf.Circuit(2).h(0).cx(0, 1)
result = sf.run(qc, shots=1024)
print(result.counts)  # {'00': ~512, '11': ~512}

# Gradient — exact, O(1) scaling
ansatz = sf.Circuit(2).ry(sf.param("t"), 0).cnot(0, 1).ry(sf.param("p"), 1)
state = sf.simulate(ansatz, params={"t": 0.5, "p": 1.2})
obs = [([3, 3], 1.0, 0.0)]      # Pauli ZZ (Rust format: 0=I 1=X 2=Y 3=Z)
grads = state.grad(obs, ansatz.to_ir(), {"t": 0.5, "p": 1.2})
print(grads)  # {'t': ~0.0, 'p': -0.932...}

On this page