dq: Exploring Quantum Simulation with Standard ML and Futhark
dq, the DIKU Quantum Simulation Framework, provides tools for specifying, drawing, and simulating quantum circuits. It separates a circuit’s description from its execution, making it possible to explore several simulation strategies using the same circuit. These range from constructing the matrix that a circuit denotes to operating directly on a state vector and generating parallel Futhark code for GPUs.
The framework connects to the ideas in my posts on Kronecker-free quantum simulation at WQS 2025 and the PPDP/LOPSTR 2026 paper: avoiding the enormous matrix for an entire circuit while retaining a clear connection to its mathematical meaning. Its standalone Futhark gate library also supports fusing consecutive single-qubit gates on the same qubit, illustrating the connection between quantum gates and array operations described in Gate Fusion Is Map Fusion.
The repository includes examples of Grover’s algorithm in both Standard ML and Futhark, along with a tool for translating qsim circuit files into Futhark programs. It is a practical starting point for experimenting with functional descriptions of quantum circuits and their parallel execution.