GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - lanl/QA-Prolog: Quantum Annealing Prolog

BranchesTags
Open more actions menu

Latest commit

 

History

85 Commits
85 Commits

Folders and files

NameName
Last commit message
Last commit date
examples
examples
 
 
.gitignore
.gitignore
 
 
CITATION.cff
CITATION.cff
 
 
INSTALL.md
INSTALL.md
 
 
LICENSE.md
LICENSE.md
 
 
Makefile
Makefile
 
 
README.md
README.md
 
 
astnodetype_string.go
astnodetype_string.go
 
 
parser.go
parser.go
 
 
parser.peg
parser.peg
 
 
preproc.go
preproc.go
 
 
qa-prolog.go
qa-prolog.go
 
 
run.go
run.go
 
 
type-inf.go
type-inf.go
 
 
verilog.go
verilog.go
 
 

Repository files navigation

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, [email protected]

About

Quantum Annealing Prolog

Resources

Readme
License
Activity
Custom properties

Stars

40 stars

Watchers

5 watching

Forks

8 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.