qa-prolog

Quantum Annealing Prolog

https://github.com/lanl/qa-prolog

Science Score: 85.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 4 DOI reference(s) in README
  • Academic publication links
    Links to: arxiv.org
  • Committers with academic emails
    1 of 1 committers (100.0%) from academic institutions
  • Institutional organization owner
    Organization lanl has institutional domain (www.lanl.gov)
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (9.9%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

Quantum Annealing Prolog

Basic Info
  • Host: GitHub
  • Owner: lanl
  • License: other
  • Language: Go
  • Default Branch: master
  • Size: 84 KB
Statistics
  • Stars: 39
  • Watchers: 8
  • Forks: 7
  • Open Issues: 0
  • Releases: 0
Created over 7 years ago · Last pushed about 4 years ago
Metadata Files
Readme License Citation

README.md

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

Owner

  • Name: Los Alamos National Laboratory
  • Login: lanl
  • Kind: organization
  • Email: github-register@lanl.gov
  • Location: Los Alamos, New Mexico, USA

Citation (CITATION.cff)

cff-version: 1.2.0
message: "Please cite the following publication when referencing QA Prolog"
title: "QA Prolog"
type: software
authors:
  - given-names: Scott
    family-names: Pakin
    orcid: "https://orcid.org/0000-0002-5220-1985"
repository-code: "https://github.com/lanl/QA-Prolog"
license-url: "https://github.com/lanl/QA-Prolog/blob/master/LICENSE.md"
preferred-citation:
  type: article
  authors:
    - given-names: Scott
      family-names: Pakin
      orcid: "https://orcid.org/0000-0002-5220-1985"
  editors:
    - given-names: Ferdinando
      family-names: Fioretto
    - given-names: Enrico
      family-names: Pontelli
  publisher:
    name: "Cambridge University Press"
  doi: "10.1017/S1471068418000066"
  url: "https://www.cambridge.org/core/journals/theory-and-practice-of-logic-programming/article/performing-fully-parallel-constraint-logic-programming-on-a-quantum-annealer/AB4CCF2D913D0325F770B3DA02AA262D"
  journal: "Theory and Practice of Logic Programming"
  issue-title: "Special Issue on Parallel and Distributed Logic Programming"
  month: 9
  start: 928
  end: 949
  title: "Performing Fully Parallel Constraint Logic Programming on a Quantum Annealer"
  volume: 18
  issue: 5-6
  year: 2018
  issn: 1475-3081
  identifiers:
    - type: other
      value: "arXiv:1804.00036 [cs.PL]"
      description: "The arXiv preprint of the paper"
  languages:
    - en
  keywords:
    - quantum annealing
    - quantum computing
    - constraint logic programming
    - Prolog
    - D-Wave
  abstract: >-
    A quantum annealer exploits quantum effects to solve a particular
    type of optimization problem. The advantage of this specialized
    hardware is that it effectively considers all possible solutions
    in parallel, thereby potentially outperforming classical computing
    systems. However, despite quantum annealers having recently become
    commercially available, there are relatively few high-level
    programming models that target these devices. In this article, we
    show how to compile a subset of Prolog enhanced with support for
    constraint logic programming into a two-local Ising-model
    Hamiltonian suitable for execution on a quantum annealer. In
    particular, we describe the series of transformations one can
    apply to convert constraint logic programs expressed in Prolog
    into an executable form that bears virtually no resemblance to a
    classical machine model yet that evaluates the specified
    constraints in a fully parallel manner. We evaluate our efforts on
    a 1,095-qubit D-Wave 2X quantum annealer and describe the
    approach's associated capabilities and shortcomings.

GitHub Events

Total
  • Watch event: 5
  • Fork event: 1
Last Year
  • Watch event: 5
  • Fork event: 1

Committers

Last synced: 11 months ago

All Time
  • Total Commits: 84
  • Total Committers: 1
  • Avg Commits per committer: 84.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Scott Pakin p****n@l****v 84
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 11 months ago

All Time
  • Total issues: 3
  • Total pull requests: 0
  • Average time to close issues: 9 days
  • Average time to close pull requests: N/A
  • Total issue authors: 2
  • Total pull request authors: 0
  • Average comments per issue: 6.33
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • andreaBelmont (2)
  • brurucy (1)
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 2
  • Total downloads: unknown
  • Total dependent packages: 0
    (may contain duplicates)
  • Total dependent repositories: 0
    (may contain duplicates)
  • Total versions: 0
proxy.golang.org: github.com/lanl/QA-Prolog
  • Versions: 0
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 6.4%
Average: 6.7%
Dependent repos count: 6.9%
Last synced: 6 months ago
proxy.golang.org: github.com/lanl/qa-prolog
  • Versions: 0
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 8.9%
Average: 9.5%
Dependent repos count: 10.1%
Last synced: 7 months ago