Skip to content

Annealing and Ising

QA-Prolog

Maintained by lanl

Quantum Annealing Prolog

GoBSD-3-Clause
QA-Prolog illustration

Resource snapshot

Category

Annealing and Ising

Stars

40

Last pushed

Jan 25, 2022Updated 4y ago

Open issues

0

What it is

QA-Prolog is maintained by lanl and sits in the Annealing and Ising lane of the open-source quantum map.

Quantum Annealing Prolog

Last verified by Qtangl generator on May 27, 2026

Who it's for

Developers interested in Ising-model formulations, annealing workflows, and D-Wave-style solver ecosystems.

What you can build or learn

  • See how annealing-oriented projects model optimization problems.
  • Understand embeddings, samplers, and the surrounding tooling needed in practice.
  • Compare annealing workflows against gate-model and hybrid alternatives.

Citation

BibTeX
@software{qaprolog,
  title = {QA Prolog},
  author = {Unknown},
  year = {n.d.},
}

License

BSD-3-Clause

SPDX identifier detected from the repository metadata or license files.

Repository README

Preview from the project README.

Rendered as Markdown inside a scrollable preview. Long READMEs stay contained; expand or open on GitHub for the full document.

~350 words · about 2 min readOpen on GitHub

QA Prolog

Go Report Card

Description

QA Prolog ("Quantum Annealing Prolog") compiles a subset of the Prolog programming language, enhanced with some native support for constraint-logic programming, into a 2-local Ising-model Hamiltonian function suitable for execution on a D‑Wave quantum annealer. Technically, though, QA Prolog produces a classical Hamiltonian function so it can in principle target classical annealers as well.

QA Prolog is largely a proof of concept, but it does hold out the possibility—not yet demonstrated—of improving Prolog program execution time by replacing backtracking with fully parallel annealing into a solution state.

Installation

See INSTALL.md.

Usage

Run qa-prolog --help for a list of command-line options. At a minimum, you'll need to provide --query=〈Prolog goal〉 and a filename corresponding to a database of Prolog facts and rules.

Here's an example (running on D‑Wave hardware):

$ qa-prolog --verbose --qmasm-args="-O1 --postproc=opt" --query='friends(P1, P2).' examples/friends.pl 
qa-prolog: INFO: Parsing examples/friends.pl as Prolog code
qa-prolog: INFO: Representing symbols with 3 bit(s) and integers with 1 bit(s)
qa-prolog: INFO: Storing intermediate files in /tmp/qap-227417173
qa-prolog: INFO: Writing Verilog code to friends.v
qa-prolog: INFO: Writing a Yosys synthesis script to friends.ys
qa-prolog: INFO: Converting Verilog code to an EDIF netlist
qa-prolog: INFO: Executing yosys -q friends.v friends.ys -b edif -o friends.edif
qa-prolog: INFO: Converting the EDIF netlist to QMASM code
qa-prolog: INFO: Executing edif2qmasm -o friends.qmasm friends.edif
qa-prolog: INFO: Executing qmasm --run --values=ints -O1 --postproc=opt --pin=Query.Valid := true friends.qmasm
P1 = charlie
P2 = alice

P1 = alice
P2 = charlie

Citation

The following journal publication discusses the design and implementation of QA Prolog:

Pakin, Scott. “Performing Fully Parallel Constraint Logic Programming on a Quantum Annealer.” Theory and Practice of Logic Programming, vol. 18, no. 5–6, pp. 928–949, September 2018. Eds.: Ferdinando Fioretto and Enrico Pontelli. Cambridge University Press. ISSN: 1475‑3081, DOI: 10.1017/S1471068418000066, arXiv:1804.00036 [cs.PL].

License

QA Prolog is provided under a BSD-ish license with a "modifications must be indicated" clause. See the LICENSE file for the full text.

QA Prolog is part of the Hybrid Quantum-Classical Computing suite, known internally as LA-CC-16-032.

Author

Scott Pakin, pakin@lanl.gov

Read on GitHub

Activity

Latest release

—

Watchers

5

Python support

—

Learn digest

Get monthly updates when library entries change.

Monthly digest: new library entries, updated flagships, and one editorial pick.

Related resources

Keep exploring nearby tools.

dwavesystems

chimera-embedding

This is a repository for algorithms to generate native-structured embeddings.

PythonApache-2.0

28 stars · Updated 7y ago

dwavesystems

dimod

A shared API for QUBO/Ising samplers.

PythonApache-2.0FlagshipQtangl relevant

142 stars · Updated 3mo ago

dwavesystems

dwave-cloud-client

A minimal implementation of the REST interface used to communicate with D-Wave Solver API (SAPI) servers.

PythonApache-2.0

62 stars · Updated 3mo ago

dwavesystems

dwave-ocean-sdk

Installer for D-Wave's Ocean tools

PythonApache-2.0FlagshipQtangl relevant

524 stars · Updated 3mo ago

dwavesystems

dwave_embedding_utilities

Provides utilities for mapping between source and target models.

PythonApache-2.0Archive

11 stars · Updated 8y ago

dwavesystems

qbsolv

Qbsolv,a decomposing solver, finds a minimum value of a large quadratic unconstrained binary optimization (QUBO) problem by splitting it into pieces solved either via a D-Wave system or a classical tabu solver.

qApache-2.0FlagshipQtangl relevantArchive

920 stars · Updated 4y ago