← Back
Home › Systems › Simulation and scientific computing

quantum-stack

quantum compiler and simulator

Qiskit, Cirq

SystemTechniques · 7Primitives · 19 quantum-stack Quantum circuit optimizationnumerics · medium: Gate cancellation, commutation and resynthesis passes over circuit DAGsQuantum gate synthesisnumerics · medium: Decompose unitaries into native gates (KAK, Solovay-Kitaev, Clifford+T synthesis)Qubit routingnumerics · medium: Map logical qubits to a device coupling graph and insert SWAPs (SABRE)Stabilizer simulationnumerics · medium: Simulate Clifford circuits in polynomial time with stabilizer tableaus (Gottesman-Knill, Stim)State vector simulationnumerics · medium: Simulate qubits as a 2^n amplitude vector with gate kernels, SIMD and GPUTensor network contractionnumerics · medium: Contract tensor networks with good contraction orders; MPS and slicing for circuit simulationGraph partitioninggraphs · medium: Split a graph into k balanced parts with few edges between them; multilevel coarsen-partition-refine (METIS, KaHIP) for quality, streaming heuristics (LDG, Fennel) for one-pass scale.›Topological sortgraphs · low: Order the vertices of a DAG so every edge points forward; the core of build systems, schedulers and dependency resolution, with cycle detection for free.›SIMD programminghardware-os · low: Process 4-16 lanes per instruction with AVX2, AVX-512 or NEON via Rust std::arch, with runtime dispatch and a portable fallback.›PRNGs (PCG, xoshiro)numerics · low: Small, fast, statistically strong non-cryptographic generators: PCG32 and xoshiro256**, with seeding, parallel streams and unbiased ranges.›Recursive-descent parsingcompilers · low: Hand-written top-down parser with one function per grammar rule; simple, fast, with full control over error messages and recovery.›CUDA and GPU languageslanguages · low: Programming GPUs: thousands of lockstep threads, bound by memory bandwidth; libraries first, Triton for fused kernels, CUDA C++ for peak speed.›E graphscompilers · low: Equality saturation: e-graphs compactly hold many equivalent programs, then extract the cheapestPeephole optimizationcompilers · low: Local pattern rewrites on short instruction windows or IRBFS and DFSgraphs · low: The two basic graph traversals; BFS gives hop distances and levels, DFS gives discovery/finish order for cycles, components and topological order.›PCA and SVDmachine-learning · low: Find orthogonal directions of maximum variance by an SVD of the centred data; randomized SVD gets the top k components in a few passes.›Floating-point errornumerics · low: How IEEE 754 rounding error accumulates and how to contain it: compensated (Kahan/Neumaier) and pairwise summation, error-free transformations with FMA, ULP comparisons.›A* searchgraphs · low: Dijkstra ordered by cost-so-far plus an admissible estimate of the remaining cost; optimal paths while exploring far fewer nodes toward the goal.›Finite field arithmeticnumerics · low: Prime-field and extension-field arithmetic (Montgomery form, Goldilocks, BabyBear), vectorizedNuma aware allocationhardware-os · low: Allocate memory and pin threads on the local NUMA node; first-touch and interleave policiesGPU compute shadersml-training · low: The vendor-neutral GPU launch model of Metal, Vulkan and WebGPU: a grid of workgroups, shared memory, barriers and subgroups, driven by recorded command buffers.›Tiled matrix multiplicationml-training · low: Block GEMM into tiles held in shared memory and registers, so each byte loaded from DRAM feeds many FMAs; the core of fast GEMM.›d-ary heapdata-structures · low: Array heap with d children per node (d = 4 typical): half the binary heap's depth, siblings in one cache line, faster priority queues.›+ 3 more primitives