The Q# Programming Language Investigation

The Q# Programming Language Investigation

БИОНИКА ИНТЕЛЛЕКТА. 2018. № 1 (90). С. 18–23 хНурэ УДК 519.62 Ivan Bozhko1, Grygoriy Chetverykov2, Yaroslav Kolisnyk3 1 Khavkiv National university of radio electronics, Kharkiv, ukraine, [email protected] 2Khavkiv National university of radio electronics, Kharkiv,ukraine, [email protected], university of Szczecin, Institute of Physics and Institute of Mathematics, [email protected] 3Khavkiv National university of radio electronics, Kharkiv, ukraine, [email protected] THE Q# PROGRAMMING LANGUAGE INVESTIGATION This work is the investigation of the current state of the existing tools for quantum computing, especially the Q# programming language as the most developed tool for this nowadays. Since quantum computing is one of the main research area today, the respective tools are being created. These tools should simplify the development of quantum programs, on the one hand, and provide some platform for testing and running them, on the other hand. So the authors investigated the currently available tools and provided the results in the article. QuANTuM COMPuTINg, QuANTuM COMPuTer, Q#, QuANTuM coMPuTINg TOOLS, MIcroSoFT QuANTuM DeveloPMeNT KIT Божко І.К., Четвериков Г.Г., Колісник Я.В. Дослідження мови програмування Q#. Дана робота являє собою дослідження поточного стану існуючих інструментів квантових обчислень, особливо мови програ- мування Q# як найбільш розвиненого інструменту для цього в даний час. Оскільки квантові обчислення сьогодні є однією з основних областей досліджень, створюються відповідні інструменти. Вони покликані спростити розробку квантових програм, з одного боку, і надати платформу для тестування і запуску їх, з іншого боку. тому автори дослідили наявні в даний час інструменти і представили результати в даній статті. КВаНтОВі ОбчиСлеННя, КВаНтОВий КОМП’ютеР, Q#, іНСтРУМеНти КВаНтОВиХ ОбчиСлеНь, MIcroSoFT QuANTuM DeveloPMeNT KIT Божко И.К., Четвериков Г.Г., Колесник Я.В. Исследование языка программирования Q#. Данная работа представляет исследование текущего состояния существующих инструментов квантовых вычислений, особенно языка программирования Q# как самого развитого инструмента для этого в настоящее время. Поскольку квантовые вычисления сегодня являются одной из основных областей исследований, созда- ются соответствующие инструменты. Они призваны упростить разработку квантовых программ, с одной стороны, и предоставить платформу для тестирования и запуска их, с другой стороны. Поэтому авторы исследовали имеющиеся в настоящее время инструменты и представили результаты в данной статье. КВаНтОВЫе ВЫчиСлеНия, КВаНтОВЫй КОМПютеР, Q#, иНСтРУМеНтЫ КВаНтО- ВЫХ ВЫчиСлеНий, MIcroSoFT QuANTuM DeveloPMeNT KIT Introduction Since this task is the basis of many popular crypto- Quantum computing represents an alternative ap- graphic algorithms (for example, rSA) [2], the creation proach to automated computations using quantum of quantum computers may influence the security of the computers. data exchange in the network, and after the appearance Despite the development of research in this field to- of a real prototype of a quantum computer, it can be- day, for the first time, the idea of quantum computing come a global security issue. was advanced by the Soviet mathematician yu.I. Manin consequently, quantum computing is relevant back in 1980 in his famous monograph “computable not only for scientific problems of quantum processes and uncomputable” [1]. however, more interest in modeling, but also relevant to the world of information this type of calculation arose only in 1982, after the technology. In order to popularize them not only in the American theoretical physicist richard Feynman no- scientific world, but also among developers, tools are ticed that not all quantum-mechanical operations can created to simplify the work with quantum algorithms, be accurately transferred to a classical computer and such as the programming language Q#, which is consid- more efficiently carried out by quantum operations. ered in this paper. An additional relevance to the quantum computing problem was added by mathematician Peter Shore, who 1. Existing quantum computing tools in 1994 proposed an algorithm that allows the expan- over the past few years, with the growing popularity sion of a n-valued number to simple multipliers with of quantum computing research, tools and emulators polynomial complexity. on classical computers, this of quantum computers have begun to appear that allow task is much more complex and does not allow you to you to try calculations to practice. here are some popu- get the result for a satisfactory time. lar tools and their descriptions. 18 THE Q# PROGRAMMING LANGUAGE INVESTIGATION 1.1. Microsoft Quantum Development Kit designed for quantum computing. In terms of software Microsoft has released a preview version of Quantum engineering, this solution is most interesting as it allows Development Kit, which includes the new quantum abstracting from the paradigm of classical computing programming language Q#, integration with the visual and classical programming languages and describing a Studio development environment, simulators that work quantum algorithm using a special syntax. with both the local system and their powerful Azure consider the language Q # in more detail. cloud platform, as well as libraries and code samples 2.1. Computing model that can be used as constructive blocks. According to official Microsoft documentation [4], 1.2. IBM Quantum Experience a natural model for quantum computation is to treat IbM has created an experimental quantum 5-qubit the quantum computer as a coprocessor, similar to that processor that is available to users through the Internet used for gPus, FPgAs, and other adjunct processors. [2]. on the IbM Quantum experience website, you can The primary control logic runs classical code on a clas- find a short tutorial that explains the basics of quantum sical “host” computer. when appropriate and neces- computing and system usage instructions, the configu- sary, the host program can invoke a sub-program that ration of the queue access interfaces, a simulator that runs on the adjunct processor. when the sub-program allows you to simulate their configuration before run- completes, the host program gets access to the sub-pro- ning it on the actual machine, and access to the ma- gram’s results. chine itself that allows you to run the configuration and In this model, there are three levels of computation: view the results. • Classical computation that reads input data, sets 1.3. Rigetti Forest up the quantum computation, triggers the quantum The rigetti Forest package consists of the instruc- computation, processes the results of the computation, tions based quantum language called Quil, an open and presents the results to the user. Python library for building Quil programs called pyQuil, • Quantum computation that happens directly in a quantum library called grove, and a simulation en- the quantum device and implements a quantum algo- vironment called QvM (Quantum virtual Machine). rithm. pyQuil and grove are open source programs available • Classical computation that is required by the on github. users can develop their applications using quantum algorithm during its execution. pyQuil and grove on their own computer, and then There is no intrinsic requirement that these three transfer them to QvM for simulation through a web levels all be written in the same language. Indeed, quan- portal that is available to registered users. tum computation has somewhat different control struc- 1.4. ProjectQ tures and resource management needs than classical ProjectQ is an open source software for quantum computation, so using a custom programming language computing, implemented in Python. This allows users allows common patterns in quantum algorithms to be to implement their quantum programs in Python us- expressed more naturally. ing a powerful and intuitive syntax. ProjectQ can then Keeping classical computations separate means that broadcast these programs to any server part: a simulator the quantum programming language may be very con- that runs on a classic computer, or a quantum computer strained. These constraints may allow better optimiza- (for example, using IbM Quantum experience). other tion or faster execution of the quantum algorithm. hardware platforms are currently not supported. In addition to these tools, there are others such as Q# (Q-sharp) is a domain-specific programming cirq, Quirk, QuTiP, but they are less powerful than language used for expressing quantum algorithms. It is those described above. to be used for writing sub-programs that execute on an As can be seen from the description of existing solu- adjunct quantum processor, under the control of a clas- tions, most of them are complementary to existing pro- sical host program and computer. gramming languages ​​(in particular, Python), but given Q# provides a small set of primitive types, along the new paradigm of computations, this may cause dif- with two ways (arrays and tuples) for creating new, ficulties in programming algorithms using these tools, structured types. It supports a basic procedural model therefore, a more flexible and powerful solution is a for writing programs, with loops and if/then statements. separate programming language, which currently only The top-level constructs in Q# are user defined types, Microsoft offers. operations, and functions. Also, it is necessary to highlight the Intel solution 2.2. Q# type system with the existing experimental quantum computer, but The

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    6 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us