<<

58 notiziariotecnico anno 29  2/2020 59

QUANTUM SOFTWARE

Michele Amoretti

Current progress in the field of quantum computer hardware makes it credible that, in just a few years, quantum comput- ers will outperform classical ones. Many research groups and companies are working on the hardware, but the key questions of what a realistically-sized quantum computer can achieve, how to do this, and how to verify the results refer to quantum software. In this article, we stress the importance of quantum software and illustrate a few meaningful examples. 60 notiziariotecnico anno 29  2/2020 61

The importance of an open source license and pub- indicators of the compiled quan- quantum software lished on GitHub (https://github. tum algorithm are, for example, cir- com/qis-unipr). cuit depth, gate count and fidelity A quantum computer is a device of quantum states. that harnesses the laws of quan- tum mechanics to solve certain Recently, some noteworthy quan- tasks using fewer computational Quantum Compiling tum compiling techniques have resources than classical comput- been proposed. For example, Zul- ers. The fundamental information- Current quantum computers are ehner et al. [Zulehner2019] pro- carrying components of a quantum noisy intermediate-scale quantum posed a strategy based on the A* computer are the quantum bits (NISQ) devices [Preskill2018], char- search algorithm [Hart1968] for (). A is a quantum-me- acterized by a reduced number of mapping the logical qubits (of the chanical system (e.g., a particle) qubits (5-50) with non-uniform ) to the physical qu- whose state can be the superposi- quality and highly constrained con- bits (of the device). The proposed tion of 0 and 1 at the same time. nectivity. Such devices may be able approach is efficient in terms of Table 1 Depth of different quantum circuits compiled with to perform tasks which surpass the running time and output depth, but ChainSwap and IBM ’s compilers At least as important as building capabilities of today's most power- may not be scalable because of the quantum computers is the quest to ful classical digital computers, but exponential space complexity of establish which problems are prone noise in quantum gates limits the A*. SABRE by Li et al. [Li2019] is ap- to quantum speed-ups and to de- size of quantum circuits that can be parently more efficient, but its code velop quantum algorithms that can executed reliably. has not been released. achieve such speed-ups. investigation of deterministic al- tool implementing new determin- In practice, this is quite unlikely. Quantum compilation, i.e., device- In general, most compiling ap- gorithms for compiling recurrent istic algorithms that cope with a ChainSwap produces circuits whose Quantum software addresses the aware implementation of quantum proaches have two common fea- quantum circuit patterns. larger set of quantum circuit pat- depth is generally very good, and in key questions of what a realisti- algorithms, is a challenging prob- tures: 1) they rely on randomized terns. some cases is ideal. cally-sized quantum computer can lem. A good quantum compiler algorithms and 2) they are general The proposed strategy focused achieve, how to do this, and how must translate an input quantum purpose, but they are not able to on quantum circuits for generat- In particular, such patterns appear to verify the results [QSManifesto]. algorithm, defined as a quantum make assumptions on circuit struc- ing Greenberger–Horne–Zeilinger in quantum circuits that are used The broad and multidisciplinary circuit, into the most efficient equiv- ture or characteristics. These kind (GHZ) entangled states. It is well to compute the ground state prop- Enhancing distributed field of quantum software includes alent of itself, getting the most out of solutions, although effective in known that GHZ states have sev- erties of molecular systems using functional monitoring a wide range of topics, such as of the available hardware. In gener- many cases, are not as much effi- eral practical applications, includ- the VQE algorithm together with a with quantum quantum algorithms and protocols, al, the quantum compilation prob- cient when facing circuits charac- ing learning. wavefunction Ansätz like the Cou- protocols theory and lem is NP-Hard [Botea2018]. terized by well-defined peculiar se- pled-Cluster expansion. verification of quantum devices. quences, i.e., patterns, of two-qubit We integrated the resulting com- Scalability concerns are motivating On NISQ devices, quantum compi- operators. This is particularly true if piler with Qiskit, IBM’s open source Some experimental results are distributed In this article, we present our re- lation is declined in the following those patterns repeat themselves software development kit for illustrated in Table 1, where architectures, and experimental ef- search activity on quantum soft- tasks: gate synthesis, which is the many times in a circuit and are not working with OpenQASM and the ChainSwap is compared to IBM forts have demonstrated some of ware, encompassing the design decomposition of an arbitrary uni- compliant with the quantum device IBM Q quantum processors. Qiskit’s Basic, Stochastic and Look- the building blocks for such a de- and development of highly efficient tary operation into a sequence of connectivity. ahead compilers. Ideally, the depth sign [VanMeter2016]. quantum compilers, quantum al- gates from a discrete set; compli- Later, with Davide Ferrari and of the compiled circuit should be gorithms and quantum protocols. ance with the hardware architec- In a research work with Davide Fer- Ivano Tavernelli [Ferrari2019], we less or equal to the depth of the With the network and communica- Our code is usually released under ture; and noise awareness. Quality rari [Ferrari2018], we started the developed ChainSwap, a software input circuit. tions functionalities provided by the 62 notiziariotecnico anno 29  2/2020 63

communication and entangle- between the coordinator and the all the N players, and QGM-Tree, ment. N players. The QGM protocol lever- where the N players assume a tree ages the special properties of Bell structure (Figure 2). An entangled state is a special states to reduce the communica- state of a group of qubits, such tion cost, with respect to the GM In QGM-flat, the coordinator is the that the state of each qubit can- protocol. Parent and the N players are its not be described independently of Children. In QGM-Tree, the N play- the state of the others. For exam- Generally speaking, the QGM pro- ers are both Children and Parents ple, Bell states are maximally en- tocol defines two roles: Parent and (with the exception of those corre- tangled states of two qubits. Child (Figure 1). sponding to the leaves of the tree, which are just Children). In QGM, Bell states are used to en- Then, there are two specializations code bit pairs and the supporting of QGM, namely QGM-Flat, where We implemented the QGM protocol qubits are moved back and forth the coordinator interacts with with SimulaQron [Dahlberg2019], a

2 Examples of QGM system configurations for solving the threshold monitoring 1 problem QGM protocol: state machines of parent and child nodes

Quantum Internet [Wehner2018], and trustworthiness that are im- tum geometric monitoring (QGM) remote quantum processing units possible by using only classical protocol to solve threshold moni- can communicate and cooper- information. toring problems, where N play- ate for executing computational ers are located at different sites, tasks that each NISQ device can- Over long distances, the primary each observing a stream of items not handle by itself. method of operating the Quan- and communicating with one co- tum Internet is to leverage opti- ordinator, whose goal is to know The main idea of the Quantum cal networks (re-using existing when a function of the union Internet is to enable quantum optical fiber) and photon-based of the streams exceeds a given communication between any two qubits. threshold. points on Earth, in synergy with the “classical” Internet, in order In a joint work with Mattia Pizzoni QGM enhances the classical geo- to achieve unmatched capabili- and Stefano Carretta [Amoret- metric monitoring (GM) protocol ties, as well as levels of resiliency ti2019], we proposed the quan- [Giatrakos2016] with quantum 64 notiziariotecnico anno 29  2/2020 65

Python library for the development Entanglement Entangled states exhibit cor- Recently, in a joint work with Ste- computational or diagonal basis. nator may not be assigned in ad- and simulation of quantum net- verification in relations that have no classical fano Carretta [Amoretti2020], we Moreover, we proved that AC2 is vance. working applications. quantum networks analog and may be used, e.g., to proposed two protocols for entan- (3/8)m-robust on any set of 2m Bell Simulation results confirmed that with tampered nodes solve leader election problems, glement verification across the states sacrificed by the Verifier and Finally, we will investigate the pos- the average communication cost in to perform distributed comput- quantum memories of any two the Prover, with the same assump- sibility to extend our entanglement QGM-based systems is lower than In general, entanglement is a pre- ing tasks, to share secrets, or to nodes of a . tion as above. verification protocols to quantum in GM-based ones, with the same cious resource in quantum net- perform remote synchronization systems that involve more than error rate. works. of clocks. The proposed protocols (denoted Here, ε-robustness means that the two qubits, to cope for example as AC1 and AC2) cope with the probability that the protocol aborts with GHZ states, W states and highly disruptive attack scenario is at most ε. Furthermore, by graph states ■ where an attacker physically cap- means of simulations, we observed tures a node and takes full control that the probability to detect the of its operations. Interacting with attacker in one round of the AC2 the local , the protocol, is greater than or equal attacker reconfigures the states of to 1/2 for any possible choice of the qubits (e.g., breaking entangled the measurement basis by the at- states shared with other nodes, tacker. by measuring local qubits) either to make a denial-of-service attack or to reprogram the node to a be- havior in accordance with her own Conclusions plans. Our current research on quantum Both AC1 and AC2 rely on local op- compilers follows two main direc- erations and classical communica- tions. On the one hand, we need to tion (LOCC), with simple quantum take into account not only the ar- circuits characterized by only a few chitecture of the hardware but also H, Z, X and CNOT quantum gates its noise profile. (Figure 3). The execution of the protocols requires that some of the On the other hand, we are work-

Bell states |β00⟩ shared by the Veri- ing on highly innovative quantum fier and the Prover are sacrificed. compilers for mapping any quan- Both protocols are randomized, tum algorithm to any distributed reason why the Prover, challenged quantum computing architecture, by the Verifier, cannot trick. in order to achieve high-quality dis- tributed quantum computations. We proved that AC1 is (3/4)m- robust on any set of m Bell states Regarding QGM, we plan to inte- sacrificed by the Verifier and the grate complementary protocols, 3 Prover, assuming that the Prover is such as quantum leader election Quantum circuits of the AC1 controlled by an attacker that per- ones, in order to cope with dynamic and AC2 protocols forms measurements either in the scenarios where the role of coordi- 66 notiziariotecnico anno 29  2/2020 67

References

1. [QSManifesto] Quantum Software EU Platform, 11. [Wehner2018] Wehner, S., Elkouss, D., Hanson, Quantum Software Manifesto (2017) R.: Quantum internet: A vision for the road ahead. 2. [QIS] Quantum Software, University of Parma, Science 362(6412) (2018) Michele Amoretti [email protected] http://www.qis.unipr.it/quantumsoftware.html 12. [Amoretti2019] Amoretti, M., Pizzoni, M., Carretta, Professore Associato presso il Dipartimento di Ingegneria e Architettura dell’Università di Parma, dove insegna "High Performance Computing" (con un modulo di “Quantum Computing”) e "Sistemi Orientati ad 3. [Preskill2018] Preskill, J.: Quantum Computing in S: Enhancing distributed functional monitoring Internet". Nel 2013 è stato Visiting Researcher presso il LIG Lab, a Grenoble, Francia. the NISQ era and beyond. Quantum 2(79) (2018) with quantum protocols. Quantum Information E’ autore di oltre 100 articoli di ricerca su riviste internazionali, atti di conferenze e libri. Si occupa di algoritmi paralleli e distribuiti, per computer classici e quantistici. Contribuisce all’iniziativa Quantum Information 4. [Botea2018] Botea, A., Kishimoto, A., Marinescu, R.: Processing 18(21), 371 (2019) Science dell’Università di Parma, guidando il gruppo di ricerca sul Quantum Software (http://www.qis.unipr. On the Complexity of Quantum Circuit Compilation. 13. [Giatrakos2016] Giatrakos, N., Deligiannakis, it/quantumsoftware.html)  The Eleventh International Symposium on A., Garofalakis, M.: Scalable approximate query Combinatorial Search (SOCS 2018) (2018) tracking over highly distributed data streams. ACM 5. [Zulehner2019] Zulehner, A., Paler, A., Wille, R.: An SIGMOD ‘16. ACM (2016) ecient methodology for mapping quantum circuits 14. [Dahlberg2019] Dahlberg, A.,Wehner, S.: to the IBM QX architectures. IEEE Trans. on CAD of Simulaqron—A simulator for developing quantum Integrated Circuits and Systems 38(7), 1226-1236 internet software. Quantum Science and (2019) Technology 4, 015001 (2019) 6. [Hart1968] Hart, P. E., Nilsson, N. J. and Raphael, 15. [Amoretti2020] Amoretti, M., Carretta, S.: B.: A formal basis for the heuristic determination of Entanglement Verification in Quantum Networks minimum cost paths. IEEE Transactions on Systems With Tampered Nodes. IEEE Journal on Selected Science and Cybernetics, vol. 4, no. 2, pp. 100–107 Areas in Communications 38 (3), pp. 598-604 (1968) (2020) 7. [Li2019] Li, G., Ding, Y., Xie, Y.: Tackling the qubit mapping problem for NISQ-era quantum devices. Twenty-Fourth International Conference on Architectural Support for Programming Languages and Operating Systems, ASPLOS '19, pp. 1001-1014 (2019) 8. [Ferrari2018] Ferrari, D., Amoretti, M., Efficient and effective quantum compiling for entanglement- based machine learning on IBM Q devices. International Journal of Quantum Information 16(08), 1840006 (2018) 9. [Ferrari2019] Ferrari, D., Tavernelli, I., Amoretti, M., Efficient Quantum Compiling for Quantum Chemistry Simulation on IBM Q. 1st European Quantum Technology Conference (EQTC), Grenoble, France (2019) 10. [VanMeter2016] Van Meter, R., Devitt, S.J.: The Path to Scalable Distributed Quantum Computing. Computer 49(9), pp. 31-42 (2016)