Quantum programming is a set of computer programming languages that allow the expression of quantum algorithms using high-level constructs. The point of quantum languages is not so much to provide a tool for programmers, but to provide tools for researchers to understand better how quantum computation works and how to formally reason about quantum algorithms.
Efforts are underway to develop functional programming languages for quantum computing. Examples include Selinger's QPL [1], and the Haskell-like language QML by Altenkirch and Grattage [2][3]. Higher-order quantum programming languages, based on lambda calculus, have been proposed by van Tonder [4], Selinger and Valiron [5] and by Arrighi and Dowek[6].
量子コンピューティングの為の組込関数の開発が行われています。例としてはSelingerのQPL [1]、Altenkirchと Grattage [2][3]によるHaskellのような言語のQMLです。ラムダ計算に基づく、高度の量子プログラミング言語がvan Tonder [4]、Selingerと Valiron [5] と Arrighi/ Dowek[6]により提案されています。
量子計算用の機能的プログラミング言語を開発する努力は行われている。例えば、SelingerのQPL [1]やAltenkirch や Grattage [2][3]によるHaskellのような言語QMLがある。
ラムダ計算式に基づくより高度な量子プログラミング言語が、van Tonder [4]、 Selinger 、Valiron [5]、 Arrighi、Dowek[6]らによって提案された。
Simon Gay's Quantum Programming Languages Survey has more information on the current state of research and a comprehensive bibliography of resources.
Quantum pseudocode
Quantum pseudocode proposed by E. Knill is the first formalised language for description of quantum algorithms was introduced and, moreover, it was tightly connected with a model of quantum machine called Quantum Random Access Machine (QRAM).
Quantum computing language
QCL (Quantum Computation Language) is one of the first implemented quantum programming languages. Its syntax resembles syntax of the C programming language and classical data types are similar to data types in C. You can combine a classical code and a quantum code in one source code.
The basic built-in quantum data type in QCL is the qureg (quantum register). It can be interpreted as an array of qubits (quantum bits).
Note that the dump operation is different from measurement, since it does not influence the state of the quantum machine and can be realised only using a simulator.
The QCL standard library provides standard quantum operators used in quantum algorithms:
controlled-not with many target qubits,
Hadamard operation on many qubits,
parse and controlled phase.
But the most important feature of QCL is the support for user-defined operators and functions. Like in modern programming languages, it is possible to define new operations which can be used to manipulate quantum data.
defines inverse about the mean operator used in Grover's algorithm. This allows one to define algorithms on a higher level of abstraction and extend the library of functions available for programmers.
Syntax
Data types
Quantum - qureg, quvoid, quconst, quscratch, qucond
Classical - int, real, complex, boolean, string, vector, matrix, tensor
Function types
qufunct - Pseudo-classic operators. Can only change the permutation of basic states.
operator - General unitary operators. Can change the amplitude.
procedure - Can call measure, print, and dump inside this function. This function is non-invertible.
Built-in functions
Quantum
qufunct - Fanout, Swap, Perm2, Perm4, Perm8, Not, CNot
operator - Matrix2x2, Matrix4x4, Matrix8x8, Rot, Mix, H, CPhase, SqrtNot, X, Y, Z, S, T
procedure - measure, dump, reset
Classical
Arithmetic - sin, cos, tan, log, sqrt, ...
Complex - Re, Im, conj
Q Language is the second implemented imperative quantum programming language.
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. New operators can be defined using C++ class mechanism.
Quantum memory is represented by class Qreg.
こちらで利用させてもらっています。
http://matome.naver.jp/odai/2133989341456871701