qsengine
A state-vector quantum simulator for Python. You build circuits in Python; a Rust core runs them on every CPU core or on any GPU, and hands back the counts.
Install the latest release, 1.1.1:
pip install qsengineDocumentation
Getting started
- Installation and first circuitInstall the wheel, build a Bell state, read the counts.
- ExamplesComplete programs with their real output.
Quantum physics
- Qubits and bra-ket notationWhat a qubit is and how to write its state.
User guide
- GatesEvery gate, the method that applies it, and your own unitaries.
- Running circuitsShots and counts, exact states, seeds and bit order.
Reference
- API referenceQuantumCircuit, every method, every error.
What is in qsengine
- Two backends, one API. A multithreaded CPU backend in 64-bit precision and a GPU backend for any vendor, chosen automatically.
- Nineteen gates. Paulis, phases, rotations, U, controlled gates, SWAP and Toffoli, plus any 2x2 unitary you supply.
- Mid-circuit measurement. Measure and reset qubits part-way, and condition gates on the results: enough for teleportation and error correction.
- Expectation values.
expectation("ZZI")for Pauli strings, the core of VQE and QAOA. - Measured speed. 77 ms for 22 qubits on the GPU, against 431 ms for Qiskit Aer on the same circuit.
- One wheel per platform for every CPython from 3.9.