Published July 20, 2025 | Version v5

A Haskell Adiabatic DSL: Solving Classical Optimization Problems on Quantum Hardware

  • 1. ROR icon Iowa State University
  • 2. ROR icon University of Kansas
  • 3. ROR icon Indiana University Bloomington

Description

In physics and chemistry, quantum systems are typically modeled using energy constraints formulated as Hamiltonians. Investigations into such systems often focus on the evolution of the Hamiltonians under various initial conditions, an approach summarized as Adiabatic Quantum Computing (AQC). Although this perspective may initially seem foreign to functional programmers, we demonstrate that conventional functional programming abstractions—specifically, the Traversable and Monad type classes—naturally capture the essence of AQC. To illustrate this connection, we introduce EnQ, a functional programming library designed to express diverse optimization problems as energy constraint computations (ECC). The library comprises three core components: generating the solution space, associating energy costs with potential solutions, and searching for optimal or near-optimal solutions. Because EnQ is implemented using standard Haskell, it can be executed directly through conventional classical Haskell compilers. More interestingly, we develop and implement a process to compile EnQ programs into circuits executable on quantum hardware. We validate EnQ’s effectiveness through a number of case studies, demonstrating its capacity to express and solve classical optimization problems on quantum hardware, including search problems, type inference, number partitioning, clique finding, and graph coloring.

Technical info (English)

The object is an archive in zip format containing the digital artifacts from the research process.

We provide a single script to build a Docker image and run each example in a temporary self-contained container based on the built image.

The constructed "qaskell" image size is 10.48 GB.

The artifact was tested with Docker v4.17.0 on macOS v15.5.

From the `artifact/` directory execute `run.sh`.

The whole process to build & run examples takes <10 mins.

        $ ./run.sh

This will build a container and run the following examples both classically and as a quantum Qiskit simulation.

Example for EqSum also emits a D-Wave script. D-Wave targets require credentials to run on Dwave hardware.

Files

qaskell-submission.zip

Files (344.8 kB)

Name Size Download all
md5:bc38d88cf44c6b3873a6dfcd082f0c78
344.8 kB Preview Download

Additional details

Funding

U.S. National Science Foundation
OSI-2435255