Towards a quantum programming language

2004 ◽  
Vol 14 (4) ◽  
pp. 527-586 ◽  
Author(s):  
PETER SELINGER

We propose the design of a programming language for quantum computing. Traditionally, quantum algorithms are frequently expressed at the hardware level, for instance in terms of the quantum circuit model or quantum Turing machines. These approaches do not encourage structured programming or abstractions such as data types. In this paper, we describe the syntax and semantics of a simple quantum programming language with high-level features such as loops, recursive procedures, and structured data types. The language is functional in nature, statically typed, free of run-time errors, and has an interesting denotational semantics in terms of complete partial orders of superoperators.

2022 ◽  
Vol 18 (1) ◽  
pp. 1-24
Author(s):  
N. Khammassi ◽  
I. Ashraf ◽  
J. V. Someren ◽  
R. Nane ◽  
A. M. Krol ◽  
...  

With the potential of quantum algorithms to solve intractable classical problems, quantum computing is rapidly evolving, and more algorithms are being developed and optimized. Expressing these quantum algorithms using a high-level language and making them executable on a quantum processor while abstracting away hardware details is a challenging task. First, a quantum programming language should provide an intuitive programming interface to describe those algorithms. Then a compiler has to transform the program into a quantum circuit, optimize it, and map it to the target quantum processor respecting the hardware constraints such as the supported quantum operations, the qubit connectivity, and the control electronics limitations. In this article, we propose a quantum programming framework named OpenQL, which includes a high-level quantum programming language and its associated quantum compiler. We present the programming interface of OpenQL, we describe the different layers of the compiler and how we can provide portability over different qubit technologies. Our experiments show that OpenQL allows the execution of the same high-level algorithm on two different qubit technologies, namely superconducting qubits and Si-Spin qubits. Besides the executable code, OpenQL also produces an intermediate quantum assembly code, which is technology independent and can be simulated using the QX simulator.


2015 ◽  
Vol 22 (1) ◽  
pp. 242
Author(s):  
Juliana Kaizer Vizzotto ◽  
Bruno Crestani Calegaro

To help the understanding and development of quantum algorithms there is an effort focused on the investigation of new semantic models and programming languages for quantum computing. Researchers in computer science have the challenge of deve loping programming languages to support the creation, analysis, modeling and simulation of high level quantum algorithms. Based on previous works that use monads inside the programming language Haskell to elegantly explain the odd characteristics of quantum computation (like superposition and entanglement), in this work we present a monadic Java library for quantum programming. We use the extension of the programming language Java called BGGA Closure, that allow the manipulation of anonymous functions (closures) inside Java. We exemplify the use of the library with an implementation of the Toffoli quantum circuit.


2021 ◽  
Vol 4 ◽  
pp. 78-87
Author(s):  
Yury Yuschenko

In the Address Programming Language (1955), the concept of indirect addressing of higher ranks (Pointers) was introduced, which allows the arbitrary connection of the computer’s RAM cells. This connection is based on standard sequences of the cell addresses in RAM and addressing sequences, which is determined by the programmer with indirect addressing. Two types of sequences allow programmers to determine an arbitrary connection of RAM cells with the arbitrary content: data, addresses, subroutines, program labels, etc. Therefore, the formed connections of cells can relate to each other. The result of connecting cells with the arbitrary content and any structure is called tree-shaped formats. Tree-shaped formats allow programmers to combine data into complex data structures that are like abstract data types. For tree-shaped formats, the concept of “review scheme” is defined, which is like the concept of “bypassing” trees. Programmers can define multiple overview diagrams for the one tree-shaped format. Programmers can create tree-shaped formats over the connected cells to define the desired overview schemes for these connected cells. The work gives a modern interpretation of the concept of tree-shaped formats in Address Programming. Tree-shaped formats are based on “stroke-operation” (pointer dereference), which was hardware implemented in the command system of computer “Kyiv”. Group operations of modernization of computer “Kyiv” addresses accelerate the processing of tree-shaped formats and are designed as organized cycles, like those in high-level imperative programming languages. The commands of computer “Kyiv”, due to operations with indirect addressing, have more capabilities than the first high-level programming language – Plankalkül. Machine commands of the computer “Kyiv” allow direct access to the i-th element of the “list” by its serial number in the same way as such access is obtained to the i-th element of the array by its index. Given examples of singly linked lists show the features of tree-shaped formats and their differences from abstract data types. The article opens a new branch of theoretical research, the purpose of which is to analyze the expe- diency of partial inclusion of Address Programming in modern programming languages.


1995 ◽  
Vol 5 (1) ◽  
pp. 81-110 ◽  
Author(s):  
Peter Achten ◽  
Rinus Plasmeijer

AbstractFunctional programming languages have banned assignment because of its undesirable properties. The reward of this rigorous decision is that functional programming languages are side-effect free. There is another side to the coin: because assignment plays a crucial role in Input/Output (I/O), functional languages have a hard time dealing with I/O. Functional programming languages have therefore often been stigmatised as inferior to imperative programming languages because they cannot deal with I/O very well. In this paper, we show that I/O can be incorporated in a functional programming language without loss of any of the generally accepted advantages of functional programming languages. This discussion is supported by an extensive account of the I/O system offered by the lazy, purely functional programming language Clean. Two aspects that are paramount in its I/O system make the approach novel with respect to other approaches. These aspects are the technique of explicit multiple environment passing, and the Event I/O framework to program Graphical User I/O in a highly structured and high-level way. Clean file I/O is as powerful and flexible as it is in common imperative languages (one can read, write, and seek directly in a file). Clean Event I/O provides programmers with a high-level framework to specify complex Graphical User I/O. It has been used to write applications such as a window-based text editor, an object based drawing program, a relational database, and a spreadsheet program. These graphical interactive programs are completely machine independent, but still obey the look-and-feel of the concrete window environment being used. The specifications are completely functional and make extensive use of uniqueness typing, higher-order functions, and algebraic data types. Efficient implementations are present on the Macintosh, Sun (X Windows under Open Look) and PC (OS/2).


2017 ◽  
Vol 56 (8) ◽  
pp. 2376-2412 ◽  
Author(s):  
El-Mahdy M. Ameen ◽  
Hesham A. Ali ◽  
Mofreh M. Salem ◽  
Mahmoud Badawy

Author(s):  
Göran Pulkkis ◽  
Kaj J. Grahn

This article presents state-of-the-art and future perspectives of quantum computing and communication. Timeline of relevant findings in quantum informatics, such as quantum algorithms, quantum cryptography protocols, and quantum computing models, is summarized. Mathematics of information representation with quantum states is presented. The quantum circuit and adiabatic models of quantum computation are outlined. The functionality, limitations, and security of the quantum key distribution (QKD) protocol is presented. Current implementations of quantum computers and principles of quantum programming are shortly described.


Author(s):  
Mathias Soeken ◽  
Giulia Meuli ◽  
Bruno Schmitt ◽  
Fereshte Mozafari ◽  
Heinz Riener ◽  
...  

Quantum compilation is the task of translating a quantum algorithm implemented in a high-level quantum programming language into a technology-dependent instructions flow for a physical quantum computer. To tackle the large gap between the quantum program and the low-level instructions, quantum compilation is split into a multi-stage flow consisting of several layers of abstraction. Several different individual tasks have been proposed for the layers in the flow, many of them are NP-hard. In this article, we will describe the flow and we will propose algorithms based on Boolean satisfiability, which is a good match to tackle such computationally complex problems. This article is part of the theme issue ‘Harmonizing energy-autonomous computing and intelligence’.


Author(s):  
Göran Pulkkis ◽  
Kaj J. Grahn

This chapter presents state-of-the-art and future perspectives of quantum computing and communication. Timeline of relevant findings in quantum informatics, such as quantum algorithms, quantum cryptography protocols, and quantum computing models, is summarized. Mathematics of information representation with quantum states is presented. The quantum circuit and adiabatic models of quantum computation are outlined. The functionality, limitations, and security of the quantum key distribution (QKD) protocol is presented. Current implementations of quantum computers and principles of quantum programming are shortly described.


2020 ◽  
pp. 44-48
Author(s):  
I. V. Zaika

No programming language can do without a description of structured data types such as arrays. The article discusses the possibility of working with dynamic arrays and text files in Delphi 7. The Notebook program is developed in the visual programming environment Delphi 7, which can be used to study object oriented programming in a school informatics course. The procedures and functions for working with dynamic arrays in Delphi 7 are presented. The necessary theoretical information for working with records and text files in Delphi 7 is presented. The code listings are given with detailed explanations. The Notebook program can be used to obtain and consolidate theoretical knowledge about dynamic arrays, as well as to provide practical skills in working with dynamic memory in Delphi 7.


Sign in / Sign up

Export Citation Format

Share Document