{"id":22668638,"url":"https://github.com/lanl/qa-prolog","last_synced_at":"2025-04-12T11:08:26.771Z","repository":{"id":141730918,"uuid":"147856671","full_name":"lanl/QA-Prolog","owner":"lanl","description":"Quantum Annealing Prolog","archived":false,"fork":false,"pushed_at":"2022-01-25T20:31:42.000Z","size":86,"stargazers_count":31,"open_issues_count":0,"forks_count":7,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-02-15T11:32:08.152Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lanl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-09-07T17:48:35.000Z","updated_at":"2024-01-11T20:24:16.000Z","dependencies_parsed_at":"2024-01-13T12:22:44.695Z","dependency_job_id":"fb1af3d9-92f8-4fe7-8677-b05b5a16d234","html_url":"https://github.com/lanl/QA-Prolog","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lanl%2FQA-Prolog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lanl%2FQA-Prolog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lanl%2FQA-Prolog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lanl%2FQA-Prolog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lanl","download_url":"https://codeload.github.com/lanl/QA-Prolog/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228911888,"owners_count":17990774,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-09T15:16:04.985Z","updated_at":"2024-12-09T15:16:05.753Z","avatar_url":"https://github.com/lanl.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"QA Prolog\n=========\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/lanl/QA-Prolog)](https://goreportcard.com/report/github.com/lanl/QA-Prolog)\n\nDescription\n-----------\n\nQA Prolog (\"Quantum Annealing Prolog\") compiles a subset of the [Prolog programming language](https://en.wikipedia.org/wiki/Prolog), enhanced with some native support for [constraint-logic programming](https://en.wikipedia.org/wiki/Constraint_logic_programming), into a [2-local Ising-model Hamiltonian function](https://en.wikipedia.org/wiki/Ising_model) suitable for execution on a [D‑Wave quantum annealer](https://www.dwavesys.com/).  Technically, though, QA Prolog produces a *classical* Hamiltonian function so it can in principle target classical annealers as well.\n\nQA 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.\n\nInstallation\n------------\n\nSee [`INSTALL.md`](INSTALL.md).\n\nUsage\n-----\n\nRun `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.\n\nHere's an example (running on D‑Wave hardware):\n\n```\n$ qa-prolog --verbose --qmasm-args=\"-O1 --postproc=opt\" --query='friends(P1, P2).' examples/friends.pl \nqa-prolog: INFO: Parsing examples/friends.pl as Prolog code\nqa-prolog: INFO: Representing symbols with 3 bit(s) and integers with 1 bit(s)\nqa-prolog: INFO: Storing intermediate files in /tmp/qap-227417173\nqa-prolog: INFO: Writing Verilog code to friends.v\nqa-prolog: INFO: Writing a Yosys synthesis script to friends.ys\nqa-prolog: INFO: Converting Verilog code to an EDIF netlist\nqa-prolog: INFO: Executing yosys -q friends.v friends.ys -b edif -o friends.edif\nqa-prolog: INFO: Converting the EDIF netlist to QMASM code\nqa-prolog: INFO: Executing edif2qmasm -o friends.qmasm friends.edif\nqa-prolog: INFO: Executing qmasm --run --values=ints -O1 --postproc=opt --pin=Query.Valid := true friends.qmasm\nP1 = charlie\nP2 = alice\n\nP1 = alice\nP2 = charlie\n```\n\nCitation\n--------\n\nThe following journal publication discusses the design and implementation of QA Prolog:\n\n\u003e Pakin, Scott. “Performing Fully Parallel Constraint Logic Programming on a Quantum Annealer.” [*Theory and Practice of Logic Programming*](https://www.cambridge.org/core/journals/theory-and-practice-of-logic-programming), [vol. 18, no. 5–6](https://www.cambridge.org/core/journals/theory-and-practice-of-logic-programming/issue/2E19771FEA173F5FEA03108D2142054C), pp. 928–949, September 2018.  Eds.: Ferdinando Fioretto and Enrico Pontelli.  Cambridge University Press. ISSN: [1475‑3081](https://www.cambridge.org/core/journals/theory-and-practice-of-logic-programming), DOI: [10.1017/S1471068418000066](https://dx.doi.org/10.1017/S1471068418000066), [arXiv:1804.00036 [cs.PL]](https://arxiv.org/abs/1804.00036).\n\nLicense\n-------\n\nQA Prolog is provided under a BSD-ish license with a \"modifications must be indicated\" clause.  See [the LICENSE file](LICENSE.md) for the full text.\n\nQA Prolog is part of the Hybrid Quantum-Classical Computing suite, known internally as LA-CC-16-032.\n\nAuthor\n------\n\nScott Pakin, \u003cpakin@lanl.gov\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flanl%2Fqa-prolog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flanl%2Fqa-prolog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flanl%2Fqa-prolog/lists"}