This document discusses quantum programming and quantum computers. It begins by defining quantum programming languages as those that allow constructing quantum algorithms using high-level languages. It then provides a brief history of quantum computing developments. It describes some popular quantum programming languages like QCL and Q Language. It discusses functional quantum languages like QFC and QPL. The document also covers other quantum algorithms like Shor's and Grover's algorithms that have practical applications. It concludes by stating that the first useful quantum computer is still one or two decades away.
2. Anitya Kumar Gupta And Arun Kumar
http://www.iaeme.com/IJCET/index.asp 21 editor@iaeme.com
3. TYPES OF QUANTUM LANGUAGES
3.1. QCL: It can be defined as the birth of quantum language which is known as C
programming language. The basic in-built in quantum data type is the qureg (quantum
register). It can be interpreted as an array of quantum bits.
qureg x4[2]; // 2-qubit quantum register x4
qureg x8[2];// 2-qubit quantum register x8
H(x4);// Hadamard operation on x4
H(x8[4]);// Hadamard operation on the first qubit of the register x8
Since the qcl interpreter uses quantum library it is possible to observe the internal
state of quantum machine during the execution of the programs.
qcl> dump
STATE: 4/32 qubit allocated, 28/32 qubit free
34334|0>+.34335|1>+.36435|2>+.36393|3>+.34738|8>+.35838|9>
The qcl standard library provides standard quantum operators used in quantum
algorithms:-
1. Controlled-not with many target quantum bits.
2. Hadamard operation.
3. Controlled phase.
4. Support user defined functions and operators.
4. SYNTAX
4.1. Data types
Quantum - qureg, quvoid, quconst, quscratch, qucond
Classical - int, real, complex, boolean, string, vector, matrix, tensor
4.2. 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.
4.3. Built-in functions
4.3.1. 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
4.3.2. Classical
Arithmetic - sin, cos, tan, log, sqrt,
Complex - Re, Im, conj
3. Quantum Programing In Computer World
http://www.iaeme.com/IJCET/index.asp 22 editor@iaeme.com
4.4. Q LANGUAGE: It is the second quantum language which is known as C++.
Provides the classes for basic quantum operation like QHadamard, QFourier, QNot,
and QSwap, etc..
Memory is represented by qureg
Qreg x1; // 1-qubit quantum register with initial value 0
Qreg x2(2, 0); // 2-qubit quantum register with initial value 0
5. FUNCTIONAL QUANTUM LAGUAGES
5.1. > QFC and QPL: QFC uses flow chart syntax where as QPL uses textual syntax.
These are used as the superoperators.
5.2. > QML: QML is a Haskell-like quantum programming language. Unlike
Selinger's QPL, this language takes duplication, rather than discarding, of quantum
information as a primitive operation. Duplication in this context is understood to be
the operation that maps
[ to ]
And is not to be confused with the impossible operation of cloning; QML also
introduces both classical and quantum control operators, whereas most other
languages rely on classical control.
An operational semantics for QML is given in terms of quantum circuits, while
a denotational semantics is presented in terms of superoperators, and these are shown
to agree. Both the operational and denotational semantics have been implemented
classically.
6. QUIPPER
It is an implemented embedded language using HASKELL as the host language.
For this reason, quantum programs written in Quipper are written in Haskell using
provided libraries. For example, the following code implements preparation of a
superposition
import Quipper
spos :: Bool -> Circ Qubit
spos b = do
q <- qinit b
r <- hadamard q
return r
7. BIGGER PROBLEMS AND SOLUTIONS
Deutches problem and its N-bit generalization, the Deutch-Jozsa problem, may be
interesting, but they don't have much practical value. Fortunately, there are other
quantum algorithms that promise bigger payoffs.
Shor's algorithm, for example, is able to find the period of a function of N bits in
polynomial time. While this doesn't sound like a big deal, the difficulty of factoring
and finding a discrete logarithm forms the basis of most if not all public-key
cryptography systems.
4. Anitya Kumar Gupta And Arun Kumar
http://www.iaeme.com/IJCET/index.asp 23 editor@iaeme.com
Less spectacular, but much easier to implement is Grover's algorithm which
searches an unordered list of N items in O (sqrt(N)) time. The best classical algorithm
takes, on average, N/2 iterations to search such a list.
8. CONCLUSIONS
One of the tasks of classical computers since their inception as been to simulate
electrical circuits to help design faster computers. This feedback loop has helped fuel
half a century of explosive growth in the computer industry. Quantum Computing has
the potential to shift this explosive growth into an even higher gear as QC's are used
in the creation of faster and more powerful quantum computing elements.
In Aug 2000, Isaac L. Chuang of the IBM Almaden Research Center announced
that he and his collaborators had constructed a 5 qubit machine using a molecule with
5 Fl atoms. Unfortunately this technology probably won't scale up to a usable size.
So when will the first scalable quantum computer be built? There are several
candidate technologies for storing, manipulating and moving qubits. A complete list is
beyond the scope of this article, but it's probably safe to say that the first useful QC is
still one or two decades away.
9. RESULT
At the last it reflects the production of the some of the basics concept which are used
frequently for solving the quantum problems with the help of QCL and the way of the
lambda circuits.
REFERENCES
[1] www.wikibooks.in/computer languages
[2] Vinay Verma-masters in computers
[3] Arun Kumar-Phd. in mathematics
[4] Thermo dynamical models of information processing
[5] Quantum computing spin closuers
[6] Study of the working of lambda