HLPL High-Level Programming Language

HLPL High-Level Programming Language

What is  High-Level Programming Language

The main advantage of high-level languages over low-level languages is that they are easier to read, write, and maintain. Ultimately, programs written in a high-level language must be translated into machine language by a compiler or interpreter.

The first high-level programming languages were designed in the 1950s. Now there are dozens of different languages, including Ada, Algol, BASIC, COBOL, C, C++, FORTRAN, LISP, Pascal, and Prolog.

Features of Quantum Computing Language

QCL can be defined as a high-level programming language for quantum computing. The main features of QCL are discussed in [30] and are as follows:

Like any classical programming languages, QCL supports flow control and also define functions. Different data types which are used in classical languages are also used in QCL. Some data types which are used in QCL are int, real, complex, boolean, string.

The quantum operators are unitary operators and quantum gates are reversible gates.

QCL allows on-the-fly determination of the inverse operator by inverse execution.

It has various quantum data types (qubit registers) for compile time information on accessing the modes (qureg, quconst, quvoid, quscratch).

It can manipulate quantum registers.

It supports quantum memory management to allow local quantum variables.

It provides Bennet-style scratch space management.

In QCL, qureg is used to define a quantum register. The qureg is one of the basic built-in data types in QCL. It can be realized as an array of qubits.

The following shows the register concept used in QCL:

qcl>qureg q[6]; allocates a six-qubit register

qcl>qureg b[4]; allocates another qubit register

Fig. 10, shows a quantum circuit used in this work.

Fig. 10. Quantum circuit implementation by means of Quantum Computing Language.

The QCL code for the circuit in Fig. 10, is given below:

qcl>qureg q[3];// allocates a three-qubit register

qcl>toffoli(q[2],q[3],q[4]);//q[3],q[4] are control qubits and q[2] is a target qubit

qcl>CNot(q[3],q[4]);//q[4] is a control qubit and q[3] is a target qubit



In the above QCL code q[4] = |a〉, q[3] = |b〉 and q[2] = |c〉.


This Post Has 2 Comments

  1. Govind Kumar

    Good information sir

Leave a Reply