SparQ Documentation

SparQ is a sparse-state quantum circuit simulator framework with native QRAM support, a register-level programming paradigm, a quantum algorithm library (Grover, Shor, block encoding, Hamiltonian simulation, discrete adiabatic, etc.), and complete Python bindings (pysparq).

arXiv arXiv PyPI GitHub Documentation

Getting Started

Install PySparQ via pip (see installation for building from source):

pip install pysparq

A quick example:

import pysparq as ps

ps.System.clear()
ps.System.add_register("q", ps.UnsignedInteger, 4)
state = ps.SparseState()
ps.Hadamard_Int("q", 4)(state)
print(state)

This declares a register, creates a SparseState in the |0⟩ state, and applies the Hadamard operator. Continue with the Quick Start.

Indices and Tables