Quantum Algorithm Development Guide

This guide introduces how to develop new quantum algorithms in SparQ/QRAM-Simulator. For the runtime framework these algorithms run on, see the architecture overview.

Core Paradigm

SparQ adopts the Register Level Programming paradigm (see core concepts and the quickstart), in contrast to the traditional composition of gate-level circuits:

Dimension

Traditional approach

Register Level Programming

State storage

Arrays of qubits

Register values stored directly as uint64_t

Arithmetic

Compiled into quantum gate sequences

Arithmetic performed directly on register values

Development model

Bottom-up (build from gate circuits)

Top-down (high-level modules first, then refine)

Development Workflow

  1. Environment setup - build the project and install dependencies

  2. Understand the core components - get familiar with the code structure

  3. Implement the algorithm - refer to existing experiments; copyable skeletons are provided in code templates

  4. Test and verify - ensure correctness (see testing and verification)

  5. Submit the code - PR to upstream (make sure the coding standards are followed)