Content deleted Content added
NiklasStone (talk | contribs) No edit summary Tag: Reverted |
Countercheck (talk | contribs) copyedit |
||
(44 intermediate revisions by 23 users not shown) | |||
Line 1:
{{Short description|Computer programming for quantum computers}}
{{Primary sources|date=August 2024}}
{{Use mdy dates|date=February 2023}}
{{Use American English|date=February 2023}}
'''Quantum programming'''
When working with quantum processor-based systems, quantum programming languages provide high-level abstractions to express quantum algorithms efficiently. These languages often integrate with classical programming environments and support hybrid quantum-classical workflows. The development of quantum software has been strongly influenced by the [[open-source]] community, with many toolkits and frameworks—such as [[Qiskit]], [[Cirq]], PennyLane, and qBraid SDK—available under open licenses.<ref>{{Cite journal|last1=Häner|first1=Thomas |last2=Steiger|first2=Damian S.|last3=Svore|first3=Krysta|author3-link= Krysta Svore |last4=Troyer|first4=Matthias|date=2018|title=A software methodology for compiling quantum programs|journal=Quantum Science and Technology|volume=3|issue=2|pages=020501|doi=10.1088/2058-9565/aaa5cc|issn=2058-9565|arxiv=1604.01401|bibcode=2018QS&T....3b0501H }}</ref><ref>{{Cite web|url=https://github.com/qiskit/qiskit|title=Qiskit GitHub repository|website=GitHub}}</ref>
Quantum programming can also be used to model or control experimental systems through quantum instrumentation and sensor-based platforms. While some quantum computing architectures—such as [[linear optical quantum computing]] using the [[KLM protocol]]—require specialized hardware, others use gate-based quantum processors accessible through software interfaces. In both cases, quantum programming serves as the bridge between theoretical algorithms and physical implementation.
== Quantum instruction sets ==
Quantum instruction sets are used to turn higher level algorithms into physical instructions that can be executed on quantum processors. Sometimes these instructions are specific to a given hardware platform, e.g. [[ion trap]]s or [[Superconducting quantum computing|superconducting qubits]].
=== Blackbird ===
Blackbird<ref>{{Cite web|url=https://quantum-blackbird.readthedocs.io/en/latest/|title=Blackbird Quantum Assembly Language — Blackbird 0.2.0 documentation|website=quantum-blackbird.readthedocs.io|access-date=2019-06-24}}</ref><ref>{{Cite journal|last1=Weedbrook|first1=Christian|last2=Amy|first2=Matthew|last3=Bergholm|first3=Ville|last4=Quesada|first4=Nicolás|last5=Izaac|first5=Josh|last6=Killoran|first6=Nathan|date=2019-03-11|title=Strawberry Fields: A Software Platform for Photonic Quantum Computing|journal=Quantum|language=en-GB|volume=3|pages=129|doi=10.22331/q-2019-03-11-129|arxiv=1804.03159|bibcode=2019Quant...3..129K |s2cid=54763305}}</ref> is a quantum instruction set and intermediate representation used by [[Xanadu Quantum Technologies]] and Strawberry Fields. It is designed to represent [[Continuous-variable quantum information|continuous-variable]] quantum programs that can run on photonic quantum hardware.
=== cQASM ===
cQASM,<ref>{{Cite arXiv|last1=Bertels|first1=K.|last2=Almudever|first2=C. G.|last3=Hogaboam|first3=J. W.|last4=Ashraf|first4=I.|last5=Guerreschi|first5=G. G.|last6=Khammassi|first6=N.|date=2018-05-24|title=cQASM v1.0: Towards a Common Quantum Assembly Language|language=en|eprint=1805.09607v1|class=quant-ph}}</ref> also known as common QASM, is a hardware-agnostic quantum assembly language which guarantees the interoperability between all the quantum compilation and simulation tools. It was introduced by the QCA Lab at [[TUDelft]].
=== OpenQASM ===
{{Main|OpenQASM}}
[[OpenQASM]]<ref>{{Citation|title=qiskit-openqasm: OpenQASM specification|date=2017-07-04|url=https://github.com/IBM/qiskit-openqasm|publisher=International Business Machines|access-date=2017-07-06}}</ref> is the intermediate representation introduced by IBM for use with [[#Qiskit|Qiskit]] and the
===
'''Quantum Intermediate Representation''' (QIR) is a hardware-agnostic intermediate representation developed by [[Microsoft]] as part of the [[Quantum Development Kit]]. It is based on the [[LLVM]] compiler infrastructure and is designed to represent quantum programs in a way that supports optimization and execution across diverse quantum hardware backends.<ref>{{Cite web|title=Quantum Intermediate Representation (QIR) |url=https://github.com/qir-alliance/qir-spec|website=QIR Alliance|access-date=2025-06-02}}</ref> QIR serves as a common target for quantum compilers, enabling interoperation between different programming languages, such as Q#, and low-level hardware control layers. It is maintained by the [[QIR Alliance]], a collaborative group of academic and industry partners.
=== Quil ===
{{Main|Quil (instruction set architecture)}}
[[Quil (instruction set architecture)|Quil]] is an instruction set architecture for quantum computing that first introduced a shared quantum/classical memory model. It was introduced by Robert Smith, Michael Curtis, and William Zeng in ''A Practical Quantum Instruction Set Architecture''.<ref>{{cite arXiv |eprint=1608.03355 |title=A Practical Quantum Instruction Set Architecture |last1=Smith |first1=Robert S. |last2=Curtis |first2=Michael J. |last3=Zeng |first3=William J. |year=2016 |class=quant-ph }}</ref> Many quantum algorithms (including [[quantum teleportation]], [[quantum error correction]], simulation,<ref>{{Cite journal|last1=McClean|first1=Jarrod R.|last2=Romero|first2=Jonathan|last3=Babbush|first3=Ryan|last4=Aspuru-Guzik|first4=Alán|date=2016-02-04|title=The theory of variational hybrid quantum-classical algorithms|arxiv=1509.04279|journal=New Journal of Physics|volume=18|issue=2|pages=023023|doi=10.1088/1367-2630/18/2/023023|issn=1367-2630|bibcode=2016NJPh...18b3023M|s2cid=92988541}}</ref><ref>{{cite arXiv |eprint=1610.06910 |title=A Hybrid Classical/Quantum Approach for Large-Scale Studies of Quantum Systems with Density Matrix Embedding Theory |last1=Rubin |first1=Nicholas C. |last2=Curtis |first2=Michael J. |last3=Zeng |first3=William J. |year=2016 |class=quant-ph }}</ref> and optimization algorithms<ref>{{cite arXiv |eprint=1411.4028|title=A Quantum Approximate Optimization Algorithm|last1=Farhi|first1=Edward|last2=Goldstone|first2=Jeffrey|last3=Gutmann|first3=Sam|year=2014|class=quant-ph}}</ref>) require a shared memory architecture.
== Quantum software development kits ==
Line 33 ⟶ 35:
The following [[software development kit]]s can be used to run quantum circuits on prototype quantum devices, as well as on simulators.
====
{{Main|Cirq}}
An open source project developed by [[Google]], which uses the [[Python programming]] language to create and manipulate quantum circuits. Programs written in Cirq can be run on [[IonQ]], [[Pasqal]],<ref name="auto"/> [[Rigetti Computing|Rigetti]], and [[Alpine Quantum Technologies]].<ref name="auto2"/>
==== Classiq ====
A cloud-based quantum IDE developed by Classiq, uses a high-level quantum language, [[#Qmod|Qmod]], to generate scalable and efficient quantum circuits with a hardware-aware synthesis engine, that can be deployed across a wide range of QPUs. The platform includes a large library of quantum algorithms.
==== Forest ====
An open source project developed by [[Rigetti]], which uses the [[Python programming]] language to create and manipulate quantum circuits. Results are obtained either using simulators or prototype quantum devices provided by Rigetti. As well as the ability to create programs using basic quantum operations, higher level algorithms are available within the Grove package.<ref>{{Cite web |title=Welcome to the Documentation for Grove! – Grove 1.7.0 documentation |url=https://grove-docs.readthedocs.io/en/latest/ |website=grove-docs.readthedocs.io}}</ref> Forest is based on the [[Quil (instruction set architecture)|Quil]] instruction set.
==== MindQuantum ====
MindQuantum is a quantum computing framework based on [[MindSpore]], focusing on the implementation of [[NISQ]] algorithms.<ref>{{Cite web|url=https://www.mindspore.cn/mindquantum/docs/en/master/index.html|title=MindSpore Quantum Documentation|website=www.mindspore.cn/mindquantum}}</ref><ref>{{Cite arXiv|title=MindSpore Quantum: A User-Friendly, High-Performance, and AI-Compatible Quantum Computing Framework|eprint=2406.17248 |last1=Xu |first1=Xusheng |last2=Cui |first2=Jiangyu |last3=Cui |first3=Zidong |last4=He |first4=Runhong |last5=Li |first5=Qingyu |last6=Li |first6=Xiaowei |last7=Lin |first7=Yanling |last8=Liu |first8=Jiale |last9=Liu |first9=Wuxin |last10=Lu |first10=Jiale |last11=Luo |first11=Maolin |last12=Lyu |first12=Chufan |last13=Pan |first13=Shijie |last14=Pavel |first14=Mosharev |last15=Shu |first15=Runqiu |last16=Tang |first16=Jialiang |last17=Xu |first17=Ruoqian |last18=Xu |first18=Shu |last19=Yang |first19=Kang |last20=Yu |first20=Fan |last21=Zeng |first21=Qingguo |last22=Zhao |first22=Haiying |last23=Zheng |first23=Qiang |last24=Zhou |first24=Junyuan |last25=Zhou |first25=Xu |last26=Zhu |first26=Yikang |last27=Zou |first27=Zuoheng |last28=Bayat |first28=Abolfazl |last29=Cao |first29=Xi |last30=Cui |first30=Wei |date=2024 |class=quant-ph |display-authors=1 }}</ref><ref>{{Cite web|url=https://github.com/mindspore-ai/mindquantum|title=mindquantum|website=github.com}}</ref>
==== Ocean ====
An
==== PennyLane ====
An [[open-source software|open-source]] Python library developed by [[Xanadu Quantum Technologies]] for [[differentiable programming]] of quantum computers.<ref>{{Cite web |title=PennyLane 0.14.1 documentation |url=https://pennylane.readthedocs.io/en/stable/ |access-date=2021-03-26 |website=pennylane.readthedocs.io}}</ref><ref>{{Cite web|date=2021-02-17|title=AWS joins PennyLane, an open-source framework that melds machine learning with quantum computing|url=https://siliconangle.com/2021/02/17/aws-throws-weight-behind-pennylane-open-source-framework-melds-machine-learning-quantum-computing/|access-date=2021-03-26|website=SiliconANGLE|language=en-US}}</ref><ref>{{Cite web|date=2021-02-26|title=SD Times Open-Source Project of the Week: PennyLane|url=https://sdtimes.com/open-source/sd-times-open-source-project-of-the-week-pennylane/|access-date=2021-03-26|website=SD Times|language=en-US}}</ref><ref>{{Cite web|last=Salamone|first=Salvatore|date=2020-12-13|title=Real-time Analytics News Roundup for Week Ending December 12|url=https://www.rtinsights.com/real-time-analytics-news-roundup-for-week-ending-december-12/|access-date=2021-03-26|website=RTInsights|language=en-US}}</ref> PennyLane provides users the ability to create models using [[TensorFlow]], [[NumPy]], or [[PyTorch]], and connect them with quantum computer backends available from [[IBM Quantum Experience|IBMQ]], [[Google|Google Quantum]], [[Rigetti Computing|Rigetti]], [[Quantinuum]]<ref name="auto1">{{Cite web|url=https://www.quantinuum.com/|title=Accelerating Quantum Computing|website=www.quantinuum.com}}</ref> and [[Alpine Quantum Technologies]].<ref name="auto2">{{Cite web|url=https://www.aqt.eu/|title=Home|website=AQT | ALPINE QUANTUM TECHNOLOGIES}}</ref><ref>{{Cite web |title=Plugins and ecosystem |url=https://pennylane.ai/plugins.html |url-status=dead |archive-url=https://web.archive.org/web/20210926151326/https://pennylane.ai/plugins.html |archive-date=September 26, 2021 |access-date=2021-03-26 |website=pennylane.ai |language=en}}</ref>
==== Perceval ====
An open-source project created by {{interlanguage link|Quandela|fr}} for designing photonic quantum circuits and developing quantum algorithms, based on [[Python (programming language)|Python]]. Simulations are run either on the user's own computer or on the [[cloud computing|cloud]]. Perceval is also used to connect to Quandela's cloud-based [[List of quantum processors|photonic quantum processor]].<ref>{{cite news |title=La puissance d'un ordinateur quantique testée en ligne (The power of a quantum computer tested online) |newspaper=Le Monde.fr |date=November 22, 2022 |url=https://www.lemonde.fr/sciences/article/2022/11/22/la-puissance-d-un-ordinateur-quantique-testee-en-ligne_6151063_1650684.html |publisher=Le Monde}}</ref><ref>{{cite journal |last1=Heurtel |first1=Nicolas |last2=Fyrillas |first2=Andreas |last3=de Gliniasty |first3=Grégoire |last4=Le Bihan |first4=Raphaël |last5=Malherbe |first5=Sébastien |last6=Pailhas |first6=Marceau |last7=Bertasi |first7=Eric |last8=Bourdoncle |first8=Boris |last9=Emeriau |first9=Pierre-Emmanuel |last10=Mezher |first10=Rawad |last11=Music |first11=Luka |last12=Belabas |first12=Nadia |last13=Valiron |first13=Benoît |last14=Senellart |first14=Pascale |last15=Mansfield |first15=Shane |last16=Senellart |first16=Jean |title=Perceval: A Software Platform for Discrete Variable Photonic Quantum Computing |journal=Quantum |date=February 21, 2023 |volume=7 |page=931 |doi=10.22331/q-2023-02-21-931 |arxiv=2204.00602 |bibcode=2023Quant...7..931H |s2cid=247922568 |url=https://quantum-journal.org/papers/q-2023-02-21-931/}}</ref>[[File:QProg1-Refreshed.png|thumb|upright=2.4|Sample code using projectq with Python]]
==== ProjectQ ====
An
====
The qBraid SDK is an [[open-source|open-source]] platform-agnostic quantum runtime framework developed by qBraid. It enables users to write quantum programs once and execute them across various quantum hardware and simulators without modifying the code. The SDK supports multiple quantum programming libraries, including Qiskit, Cirq, PennyLane, PyQuil, and Braket, among others. It features a graph-based transpiler that facilitates conversion between different quantum program types, allowing seamless interoperability between frameworks. The SDK also provides tools for job submission, result retrieval, and circuit visualization. It is integrated with qBraid Lab, offering access to over 20 quantum devices and simulators from providers such as IonQ, Rigetti, QuEra, and IQM.<ref>{{Cite web|url=https://docs.qbraid.com/sdk/user-guide/overview|title=qBraid SDK Overview|website=docs.qbraid.com}}</ref><ref>{{Cite web|url=https://www.qbraid.com/blog-posts/qbraid-announces-qbraid-sdk-integrated-with-amazon-braket|title=qBraid Announces qBraid SDK Integrated with Amazon Braket on qBraid Lab|website=qbraid.com}}</ref>
==== Qibo ====
An open source full-stack API for quantum simulation, quantum hardware control and calibration developed by multiple research laboratories, including [[Technology Innovation Institute|QRC]], [[Centre for Quantum Technologies|CQT]] and [[Istituto Nazionale di Fisica Nucleare|INFN]]. [https://github.com/qiboteam/qibo Qibo] is a modular framework which includes multiple backends for quantum simulation and hardware control.<ref>{{Cite journal |last1=Efthymiou |first1=Stavros |last2=Ramos-Calderer |first2=Sergi |last3=Bravo-Prieto |first3=Carlos |last4=Pérez-Salinas |first4=Adrián |last5=García-Martín |first5=Diego |last6=Garcia-Saez |first6=Artur |last7=Latorre |first7=José Ignacio |last8=Carrazza |first8=Stefano |date=2022-01-01 |title=Qibo: a framework for quantum simulation with hardware acceleration |url=https://iopscience.iop.org/article/10.1088/2058-9565/ac39f5 |journal=Quantum Science and Technology |volume=7 |issue=1 |pages=015018 |doi=10.1088/2058-9565/ac39f5 |arxiv=2009.01845 |bibcode=2022QS&T....7a5018E |hdl=2434/887963 |s2cid=221507478 |issn=2058-9565}}</ref><ref>{{Cite journal |last1=Efthymiou |first1=Stavros |last2=Lazzarin |first2=Marco |last3=Pasquale |first3=Andrea |last4=Carrazza |first4=Stefano |date=2022-09-22 |title=Quantum simulation with just-in-time compilation |url=https://quantum-journal.org/papers/q-2022-09-22-814/ |journal=Quantum |language=en-GB |volume=6 |pages=814 |doi=10.22331/q-2022-09-22-814|arxiv=2203.08826 |bibcode=2022Quant...6..814E |s2cid=247518955 |doi-access=free }}</ref> This project aims at providing a platform agnostic quantum hardware control framework with drivers for multiple instruments<ref>{{Cite web|url=https://github.com/qiboteam/qibolab|title=Qibolab|date=November 2, 2022|via=GitHub}}</ref> and tools for quantum calibration, characterization and validation.<ref>{{Cite web|url=https://github.com/qiboteam/qibocal|title=Qibocal|date=November 1, 2022|via=GitHub}}</ref> This framework focuses on self-hosted quantum devices by simplifying the software development required in labs.
==== Qiskit ====
{{Main|Qiskit}}
An
====
[[Eclipse Qrisp|Qrisp]]<ref>{{cite web|title = Qrisp official website|url=https://www.qrisp.eu/}}</ref> is an open source project coordinated by the [[Eclipse Foundation]]<ref>{{cite web |title=Eclipse Foundation (website) |url=https://www.eclipse.org/org/foundation/}}</ref> and developed in Python programming by [[Fraunhofer FOKUS]]<ref>{{cite web |title=Fraunhofer FOKUS (website) |url=https://www.fokus.fraunhofer.de/}}</ref> Qrisp is a high-level programming language for creating and compiling quantum algorithms. Its structured programming model enables scalable development and maintenance. The expressive syntax is based on variables instead of qubits, with the QuantumVariable as core class, and functions instead of gates. Additional tools, such as a performant simulator and automatic uncomputation, complement the extensive framework. Furthermore, it is platform independent, since it offers alternative compilation of elementary functions down to the circuit level, based on device-specific gate sets.
====
A project developed by [[Microsoft]]<ref>{{Cite web|url=https://learn.microsoft.com/en-us/azure/quantum/|title=Azure Quantum documentation, QDK & Q# API reference - Azure Quantum|website=learn.microsoft.com}}</ref> as part of the [[.NET Framework]]. Quantum programs can be written and run within [[Visual Studio]] and [[VSCode]] using the quantum programming language Q#. Programs developed in the QDK can be run on Microsoft's [[Microsoft Azure Quantum| Azure Quantum]],<ref>{{Cite web|url=https://learn.microsoft.com/en-us/azure/quantum/overview-azure-quantum|title=What is Azure Quantum? - Azure Quantum|website=learn.microsoft.com|date=January 11, 2023 }}</ref> and run on quantum computers from [[Quantinuum]],<ref name="auto1"/> [[IonQ]], and [[Pasqal]].<ref name="auto">{{Cite web|url=https://pasqal.io/|title=PASQAL|website=PASQAL}}{{Dead link|date=July 2025 |bot=InternetArchiveBot |fix-attempted=yes }}</ref>
==== Strawberry Fields ====
An [[open-source software|open-source]]
====
A quantum programming environment and optimizing compiler developed by Quantinuum that targets simulators and several trapped-ion quantum hardware backends, released in December 2018.<ref>{{cite web |title=pytket|website=[[GitHub]]|date=22 January 2022|url=https://github.com/CQCL/pytket}}</ref>
====
An add-on [[Wolfram Language]] paclet that provides a symbolic, high-level representation for quantum objects such as basis, states, operators, channels, measurements, and circuits, integrated with [[Mathematica]].<ref name=qf>{{Cite web|url=https://resources.wolframcloud.com/PacletRepository/resources/Wolfram/QuantumFramework/|title=QuantumFramework |website=resources.wolframcloud.com|access-date=2025-08-18}}</ref> The framework includes tools for simulation and analysis—such as time evolution, measurement simulation, entanglement monotones, partial trace/transpose, discrete Wigner transforms, stabilizer methods, and tensor-network utilities—as well as a library of named constructs (e.g., Bell/GHZ states, [[Pauli matrices|Pauli operators]], Fourier, Grover etc).<ref name=qf/> It offers built-in visualization (e.g., circuit diagrams and Bloch-sphere plots) and interoperability with external platforms, including conversion to Qiskit and Amazon Braket formats and the ability to send queries to quantum processing units (QPUs) via service connections.
== Quantum programming languages ==
Line 81 ⟶ 89:
=== Imperative languages ===
The most prominent representatives of the imperative languages are QCL,<ref>{{cite web |author=
==== Ket ====
Ket<ref>{{Cite journal |last1=Da Rosa |first1=Evandro Chagas Ribeiro |last2=De Santiago |first2=Rafael |date=2022-01-31 |title=Ket Quantum Programming |url=https://dl.acm.org/doi/10.1145/3474224 |journal=ACM Journal on Emerging Technologies in Computing Systems |language=en |volume=18 |issue=1 |pages=1–25 |doi=10.1145/3474224 |issn=1550-4832|url-access=subscription }}</ref> is an open-source embedded language designed to facilitate quantum programming, leveraging the familiar syntax and simplicity of Python. It serves as an integral component of the Ket Quantum Programming Platform,<ref>{{Cite web |title=Ket Quantum Programming |url=https://quantumket.org |access-date=2023-05-18 |website=quantumket.org |language=en}}</ref> seamlessly integrating with a [[Rust (programming language)|Rust]] [[runtime library]] and a quantum simulator. Maintained by Quantuloop, the project emphasizes accessibility and versatility for researchers and developers. The following example demonstrates the implementation of a [[Bell state]] using Ket:<syntaxhighlight lang="python" line="1">
from ket import *
a, b = quant(2) # Allocate two quantum bits
Line 95 ⟶ 103:
</syntaxhighlight>
====
The Logic of Quantum Programs (LQP) is a dynamic quantum logic, capable of expressing important features of quantum measurements and unitary evolutions of multi-partite states, and provides logical characterizations of various forms of entanglement. The logic has been used to specify and verify the correctness of various protocols in quantum computation.<ref name="LQP">A. Baltag and S. Smets, [https://arxiv.org/abs/2110.01361 "LQP: The Dynamic Logic of Quantum Information"], Mathematical Structures in Computer Science 16(3):491-525, 2006.</ref><ref name="PLQP">{{cite journal | url=https://link.springer.com/article/10.1007/s10773-013-1987-3 | doi=10.1007/s10773-013-1987-3 | title=PLQP & Company: Decidable Logics for Quantum Algorithms | year=2014 | last1=Baltag | first1=Alexandru | last2=Bergfeld | first2=Jort | last3=Kishida | first3=Kohei | last4=Sack | first4=Joshua | last5=Smets | first5=Sonja | last6=Zhong | first6=Shengyang | journal=International Journal of Theoretical Physics | volume=53 | issue=10 | pages=3628–3647 | bibcode=2014IJTP...53.3628B | s2cid=254573992 | url-access=subscription }}</ref>
==== Q language ====
Q Language is the second implemented imperative quantum programming language.<ref>{{cite web |url=http://sra.itc.it/people/serafini/qlang/ |title=Software for the Q language |date=2001-11-23 |access-date=2017-07-20 |url-status=dead |archive-url=https://web.archive.org/web/20090620011647/http://sra.itc.it/people/serafini/qlang/ |archive-date=2009-06-20 }}</ref> Q Language was implemented as an extension of [[C++]] programming language. It provides classes for basic quantum operations like QHadamard, QFourier, QNot, and QSwap, which are derived from the base class Qop.
Quantum memory is represented by class Qreg.
Line 119 ⟶ 116:
The computation process is executed using a provided simulator. Noisy environments can be simulated using parameters of the simulator.
==== Q# ====
{{Main|Q Sharp}}
A language developed by [[Microsoft]] to be used with the [[#Quantum Development Kit|Quantum Development Kit]].<ref>{{Cite web|url=https://learn.microsoft.com/en-us/azure/quantum/overview-what-is-qsharp-and-qdk|title=Introduction to Q# & Quantum Development Kit - Azure Quantum|website=learn.microsoft.com|date=March 30, 2023 }}</ref>
==== QCL ====
{{Main|Quantum Computation Language}}
[[Quantum Computation Language]] (QCL) is one of the first implemented quantum [[programming languages]].<ref>{{cite web|url=http://tph.tuwien.ac.at/~oemer/qcl.html |title=QCL - A Programming Language for Quantum Computers |website=tuwien.ac.at |access-date=2017-07-20}}</ref> The most important feature of QCL is the support for user-defined operators and functions. Its [[syntax]] resembles the syntax of the [[C (programming language)|C programming language]] and its classical [[data type]]s are similar to primitive data types in C. One can combine classical code and quantum code in the same program.
==== qGCL ====
Line 127 ⟶ 132:
==== QMASM ====
Quantum Macro Assembler (QMASM) is a low-level language specific to quantum annealers such as the D-Wave.<ref>Scott Pakin, [https://ieeexplore.ieee.org/document/7761637/ "A Quantum Macro Assembler"], Proceedings of the 20th Annual IEEE High Performance Extreme Computing Conference 2016</ref>
==== Qmod ====
Quantum Modeling (Qmod) language is a high-level language that abstracts away the gate-level qubit operation, providing a functional approach to the implementation of quantum algorithms on quantum registers. The language is part of the [https://classiq.io Classiq] platform and can be used directly with its native syntax, through a Python SDK, or with a visual editor, all methods can take advantage of the larger library of algorithms and the efficient circuit optimization.
==== Q|SI> ====
Q|SI> is a platform embedded in [[.NET Framework|.Net]] language supporting quantum programming in a quantum extension of while-language.<ref name=":0">{{Cite journal|last1=Liu|first1=Shusen|last2=Zhou|first2=li|last3=Guan|first3=Ji|last4=He|first4=Yang|last5=Duan|first5=Runyao|last6=Ying|first6=Mingsheng|date=2017-05-09|title=Q|SI>: A Quantum Programming Language|journal=Scientia Sinica Informationis|volume=47|issue=10|pages=1300|doi=10.1360/N112017-00095|arxiv=1710.09500|s2cid=9163705}}</ref><ref>{{Cite journal|last=Ying|first=Mingsheng|date=January 2012|title=Floyd–hoare Logic for Quantum Programs|journal=ACM Trans. Program. Lang. Syst.|volume=33|issue=6|pages=19:1–19:49|doi=10.1145/2049706.2049708|s2cid=416960|issn=0164-0925|doi-access=free}}</ref> This platform includes a compiler of the quantum while-language<ref>{{Cite journal|last1=Ying|first1=Mingsheng|last2=Feng|first2=Yuan|date=2010|title=A Flowchart Language for Quantum Programming|url=https://www.computer.org/csdl/trans/ts/2011/04/tts2011040466-abs.html|journal=IEEE Transactions on Software Engineering|volume=37|issue=4|pages=466–485|doi=10.1109/TSE.2010.94|s2cid=5879273|issn=0098-5589}}</ref> and a chain of tools for the simulation of quantum computation, optimisation of quantum circuits, termination analysis of quantum programs,<ref>{{Cite journal|last1=Ying|first1=Mingsheng|last2=Yu|first2=Nengkun|last3=Feng|first3=Yuan|last4=Duan|first4=Runyao|title=Verification of quantum programs|journal=Science of Computer Programming|volume=78|issue=9|pages=1679–1700|doi=10.1016/j.scico.2013.03.016|year=2013|arxiv=1106.4063|s2cid=18913620}}</ref> and verification of quantum programs.<ref>{{Citation |doi=10.1145/3093333.3009840|hdl=10453/127333 |title=Invariants of quantum programs: Characterisations and generation |date=2017 |last1=Ying |first1=Mingsheng |last2=Ying |first2=Shenggang |last3=Wu |first3=Xiaodi |journal=ACM SIGPLAN Notices |volume=52 |pages=818–832 |hdl-access=free }}</ref><ref>{{cite arXiv |eprint=1601.03835|title=A Theorem Prover for Quantum Hoare Logic and its Applications|last1=Liu|first1=Tao|last2=Li|first2=Yangjia|last3=Wang|first3=Shuling|last4=Ying|first4=Mingsheng|last5=Zhan|first5=Naijun|year=2016|class=cs.LO}}</ref>
==== Quantum pseudocode ====
Quantum pseudocode proposed by E. Knill is the first formalized language for description of [[quantum algorithm]]s. It was introduced and, moreover, was tightly connected with a model of quantum machine called [[Quantum Random Access Machine]] (QRAM).
==== Scaffold ====
Scaffold is a C-like language, that compiles to QASM and OpenQASM.
==== Silq ====
Silq is a high-level programming language for quantum computing with a strong static type system, developed at [[ETH Zurich|ETH Zürich]].<ref>{{Cite web|title=What is Silq?|url=https://silq.ethz.ch/|access-date=2020-06-21|website=silq.ethz.ch}}</ref><ref>{{Cite book|last1=Bichsel|first1=Benjamin|last2=Baader|first2=Maximilian|last3=Gehr|first3=Timon|last4=Vechev|first4=Martin|title=Proceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation |chapter=Silq: A high-level quantum language with safe uncomputation and intuitive semantics |date=2020-06-11|language=en|___location=London UK|publisher=ACM|pages=286–300|doi=10.1145/3385412.3386007|isbn=978-1-4503-7613-6|s2cid=219397029}}</ref>
=== Functional languages ===
Efforts are underway to develop [[functional programming languages]] for [[quantum computing]]. Functional programming languages are well-suited for reasoning about programs. Examples include Selinger's QPL,<ref name="qpl">Peter Selinger, [http://www.mathstat.dal.ca/~selinger/papers.html#qpl "Towards a quantum programming language"], Mathematical Structures in Computer Science 14(4):527-586, 2004.</ref> and the [[Haskell]]-like language QML by Altenkirch and Grattage.<ref name="qml1">[http://www.cs.nott.ac.uk/~jjg/qml.html Jonathan Grattage: QML Research<!-- Bot generated title -->] {{Webarchive|url=https://web.archive.org/web/20080331114452/http://www.cs.nott.ac.uk/~jjg/qml.html |date=March 31, 2008 }} (website)</ref><ref name="qml2">T. Altenkirch, V. Belavkin, J. Grattage, A. Green, A. Sabry, J. K. Vizzotto, [http://sneezy.cs.nott.ac.uk/qml QML: A Functional Quantum Programming Language]. {{webarchive|url=https://web.archive.org/web/20060710201728/http://sneezy.cs.nott.ac.uk/QML/
==== LIQUi|> ====
LIQUi|> (pronounced ''liquid'') is a quantum simulation extension on the [[F Sharp (programming language)|F#]] programming language.<ref>{{cite web|url=https://stationq.github.io/Liquid/|title=The Language Integrated Quantum Operations Simulator |website=github.io |access-date=2017-07-20}}</ref> It is currently being developed by the Quantum Architectures and Computation Group (QuArC)<ref>Quantum Architectures and Computation Group (QuArC), https://www.microsoft.com/en-us/research/group/quantum-architectures-and-computation-group-quarc/, 2011</ref> part of the StationQ efforts at Microsoft Research. LIQUi|> seeks to allow theorists to experiment with quantum algorithm design before physical quantum computers are available for use.<ref>{{cite web|url=https://stationq.microsoft.com/ |title=StationQ |website=microsoft.com |access-date=2017-07-20}}</ref>
It includes a programming language, optimization and scheduling algorithms, and quantum simulators. LIQUi|> can be used to translate a quantum algorithm written in the form of a high-level program into the low-level machine instructions for a quantum device.<ref>{{cite web|url=https://www.microsoft.com/en-us/research/project/language-integrated-quantum-operations-liqui/|title=Language-Integrated Quantum Operations: LIQUi|>|website=[[Microsoft]]|date=2016}}</ref>
==== QFC and QPL ====
Line 147 ⟶ 164:
An [[operational semantics]] for QML is given in terms of [[quantum circuit]]s, while a [[denotational semantics]] is presented in terms of [[superoperator]]s, and these are shown to agree. Both the operational and denotational semantics have been implemented (classically) in Haskell.<ref>Jonathan Grattage, [http://sneezy.cs.nott.ac.uk/qml/compiler QML: A Functional Quantum Programming Language (compiler)] {{Webarchive|url=https://web.archive.org/web/20160305052237/http://sneezy.cs.nott.ac.uk/qml/compiler/ |date=2016-03-05 }}, 2005–2008</ref>
==== Quantum lambda calculi ====
Quantum lambda calculi are extensions of the classical [[lambda calculus]] introduced by [[Alonzo Church]] and [[Stephen Cole Kleene]] in the 1930s. The purpose of quantum lambda calculi is to extend quantum programming languages with a theory of [[higher-order function]]s.
The first attempt to define a quantum lambda calculus was made by Philip Maymin in 1996.<ref>Philip Maymin, [https://arxiv.org/abs/quant-ph/9612052 "Extending the Lambda Calculus to Express Randomized and Quantumized Algorithms"], 1996</ref> His lambda-q calculus is powerful enough to express any quantum computation. However, this language can efficiently solve [[NP-complete]] problems, and therefore appears to be strictly stronger than the standard quantum computational models (such as the [[quantum Turing machine]] or the [[quantum circuit]] model). Therefore, Maymin's lambda-q calculus is probably not implementable on a physical device.{{Citation needed|date=February 2019}}
In 2003, André van Tonder defined an extension of the [[lambda calculus]] suitable for proving correctness of quantum programs. He also provided an implementation in the [[Scheme (programming language)|Scheme]] programming language.<ref>{{cite web |author=
In 2004, Selinger and Valiron defined a [[strongly typed]] lambda calculus for quantum computation with a type system based on [[linear logic]].<ref>Peter Selinger, Benoˆıt Valiron, [https://www.mscs.dal.ca/~selinger/papers/qlambdabook.pdf "Quantum Lambda Calculus"].</ref>
==== Quipper ====
{{For|the education technology company|Quipper (company)}}
Quipper was published in 2013.<ref>{{cite web | url=http://www.mathstat.dal.ca/~selinger/quipper/ | title=The Quipper Language}}</ref><ref>{{cite web |author1=Green |first=Alexander S.
<syntaxhighlight lang="haskell">
Line 175 ⟶ 186:
return r
</syntaxhighlight>
==See also==
{{Portal|Computer programming}}
* [[List of quantum computing journals]]
== References ==
Line 180 ⟶ 195:
== Further reading ==
* {{ Cite book |title=Foundations of quantum programming |last=Mingsheng |first=Ying |publisher=Morgan Kaufmann |isbn=978-
* {{Cite book |title=Quantum Software Engineering |publisher=Springer |year=2022 |isbn=978-3-031-05323-8 |edition=1st|___location=Cham, Switzerland |editor-last=Serrano |editor-first=Manuel A. |doi=10.1007/978-3-031-05324-5 |oclc=1347696597 |id=978-3-031-05326-9 (softcover) & 978-3-031-05324-5 (eBook) |editor-last2=Pérez-Castillo |editor-first2=Ricardo |editor-last3=Piattini |editor-first3=Mario}}
== External links ==
Line 188 ⟶ 204:
* [https://quantiki.org/wiki/quantum-programming-language Quantum programming language] in [http://www.quantiki.org/ Quantiki]
* [https://github.com/lanl/qmasm/wiki QMASM documentation]
*[https://pyquil.readthedocs.io/en/stable/index.html pyQuil documentation] including [https://pyquil.readthedocs.io/en/stable/intro.html Introduction to Quantum Computing]. {{Webarchive|url=https://web.archive.org/web/20180718165337/https://pyquil.readthedocs.io/en/stable/intro.html |date=July 18, 2018 }}
* [https://github.com/epiqc/ScaffCC Scaffold Source]
|