Experimental Evaluation of Quantum Bayesian Networks on IBM QX Hardware

Experimental Evaluation of Quantum Bayesian Networks on IBM QX Hardware

Experimental evaluation of quantum Bayesian networks on IBM QX hardware Sima E. Borujeni Nam H. Nguyen Saideep Nannapaneni Industrial, Systems, and Boeing Research & Technology Industrial, Systems, and Manufacturing Engineering Huntington Beach, USA Manufacturing Engineering Wichita State University [email protected] Wichita State University Wichita, USA Wichita, USA [email protected] [email protected] Elizabeth C. Behrman James E. Steck Mathematics, Physics, and Statistics Aerospace Engineering Wichita State University Wichita State University Wichita, USA Wichita, USA [email protected] [email protected] Abstract—Bayesian Networks (BN) are probabilistic graphical developed quantum algorithms, the Bayesian networks should models that are widely used for uncertainty modeling, stochastic be represented on a quantum computing hardware. prediction and probabilistic inference. A Quantum Bayesian In our prior work [6], we developed a generic approach Network (QBN) is a quantum version of the Bayesian network that utilizes the principles of quantum mechanical systems to to develop a quantum circuit on the IBM quantum gate improve the computational performance of various analyses. In architecture [7] to represent any given Bayesian network. this paper, we experimentally evaluate the performance of QBN We referred to this approach as Compositional Quantum on various IBM QX hardware against Qiskit simulator and Bayesian Network (C-QBN) as the overall circuit is obtained classical analysis. We consider a 4-node BN for stock prediction by composing smaller circuits relating to marginal/conditional for our experimental evaluation. We construct a quantum circuit to represent the 4-node BN using Qiskit, and run the circuit probabilities of various nodes in the Bayesian network. More on nine IBM quantum devices: Yorktown, Vigo, Ourense, Essex, details are available in Section III. We demonstrated the Burlington, London, Rome, Athens and Melbourne. We will also developed approach using Qiskit, a Python package from IBM compare the performance of each device across the four levels of that simulates quantum computing [8]. optimization performed by the IBM Transpiler when mapping In addition to the simulator, IBM also provides free access a given quantum circuit to a given device. We use the root mean square percentage error as the metric for performance to a number of their real quantum devices with different ca- comparison of various hardware. pacities in terms of the number of qubits [9]. There are several Index Terms—Bayesian Networks, Qiskit, IBM, Quantum cir- 5-qubit devices, a 15 qubit device and a simulator available cuit, Experimental, Transpiler through IBMQ experience, which is an online platform that is used to access the IBM quantum devices. I. INTRODUCTION As these devices are physical systems, they are affected Quantum computing is a new paradigm of computing that by several types of noise in the qubits, implementation of uses the principles of quantum mechanical systems such as quantum gates and in the operating environment. Recently, superposition and entanglement. This new paradigm has in- several studies focus on evaluating the effect of noise, includ- arXiv:2005.12474v1 [quant-ph] 26 May 2020 creasing been used to develop algorithms with superior compu- ing decoherence, on performance of these devices and finding tational performance when compared to classical counterparts solutions to mitigate the noise[10]–[12]. The computational [1], [2]. The principle of amplitude amplification [3] has been performance of algorithms that run on the devices also depends used to develop computationally efficient algorithms for risk on the mapping of variables to various qubits in the devices. analysis and inference in the context of Bayesian network Even on the same device, the noise in the implementation of models [4], [5]. Bayesian networks are probabilistic graphical gates on various qubits is different. Since the number of gate models that are widely used for uncertainty representation operations applied on different qubits is different, it is desired and propagation, risk analysis, and probabilistic inference with to find the optimal mapping that minimizes the overall error. applications in several domains of science, engineering, and To accomplish this, IBM provides a transpiler that outputs healthcare such as transportation, logistics, bioinformatics, an optimal mapping to qubits on devices. Since different civil infrastructure, manufacturing, and radiotherapy treatment devices have different amounts of gate noise and different [6]. A Quantum Bayesian network (QBN) is a quantum connectivity between qubits, the optimal mapping is output version of the classical Bayesian network. In order to use the considering the gate noise and device connectivity. Assuming all the qubits are connected to each other, the input circuit B. Quantum Gates can be developed using either QASM or Qiskit, and given In this subsection, we will briefly introduce quantum gates the choice of device, the transpiler provides a transformed that are later used in the development of quantum circuit using circuit that can be run from that device [13]. Another input the C-QBN approach. to the transpiler is the amount of optimization that needs to It is a well-known theorem that the set G = fH; T; S; be performed to derive the transformed circuit. There are four CNOTg formed a universal set of gates for quantum computing levels of optimization, and each level results in a different [1]. Any n-qubit unitary operation, represented by a 2n × 2n transformed circuit. More details are available in Section IV. matrix, can be approximated up to an arbitrary precision by The goal of this paper is to answer the following questions: a sequence of gates consisting of gates from the set G. The 1) Can the existing IBM QX hardware simulate Bayesian CNOT (Controlled-NOT) gate is two-qubit gate, where one networks? qubit acts as a control qubit and the other qubit is the target 2) Is there a variation in the simulation accuracy across qubit. The matrix representations of various gates using the various IBM QX hardware? computational basis of j0i and j1i are: 3) Is there a variation in the simulation accuracy across the four levels of optimization available in the transpiler? " # " # " # 1 1 1 1 0 1 0 p Paper Organization: Section. II provides a brief back- H = S = T = iπ=4 ground to Bayesian networks and various quantum gates. 2 1 −1 0 i 0 e Section III discusses the C-QBN approach for the quantum I 0 CNOT = 2×2 ciruit representation of a QBN. Section. IV discusses various 0 X IBM QX hardware, their errors and different levels of the tran- spiler. Section. V discusses the evaluation study of executing Here, I2×2 is a 2 × 2 identity matrix. The quantum state of an illustrative 4-node Bayesian network on various hardware the target only changes by a Pauli X gate, when the control and at different levels of optimization followed by concluding is in state j1i and where remarks and future work in Section VI. " # 0 1 X = II. BACKGROUND 1 0 A. Bayesian networks A Bayesian Network (BN) is a directed acyclic graphical Rather than being able to implement various single-qubit model with nodes and edges that are used to represent various gates, H, T and S, IBM hardware can implement an arbitrary random variables and dependence among them respectively. single-qubit gate, U3(θ; φ, λ) by setting the three parameters, Mathematically, a Bayesian network represents a joint proba- θ, φ and λ. Here, θ represents the angle of rotation about the bility distribution over a set of random variables as a product Y-axis, and φ and λ represent the angles of rotation around of marginal and conditional probability distributions. the Z-axis in the Bloch sphere [6]. The matrix representation of U3 gate is given as In a BN with s nodes given by set V = fV1;V2; :::; Vsg, the joint distribution can be written as 2 θ θ 3 s cos −eiλ sin Y U (θ; φ; λ) = 6 2 2 7 P (V1;V2; :::; Vs) = P (VijΠVi ) (1) 3 (2) 4 iφ θ i(φ+λ) θ 5 i=1 e sin e cos 2 2 where Π refers to the set of parent nodes associated with Vi However, any multi-qubit gate other than CNOT must be V . For root nodes (nodes without parent nodes or the nodes i decomposed into a combination of CNOT and single-qubit at the top of a BN), P (V jΠ ) becomes equal to P (V ). i Vi i gates before it can be implemented on the actual hardware. Fig. 1 represents a simple BN with two discrete variables A The generic U gate is often called simply U gate. Imple- and B, each of which can take two values - 0 and 1. Here, A 3 menting a general U gate can be prone to hardware errors; is a root node and the parent node of B. For each value of the 3 therefore, IBM allows two additional single-qubit gates, U parent node (A=0,1), we will have a conditional probability 2 and U , which are special cases of U . U = U(π=2; φ, λ) table of the child node (B). 1 3 2 and U1 = U(0; 0; λ) [9]. We can now represent the single- qubit rotation of θ around the Y-axis, RY gate, as 2 θ θ 3 cos − sin R (θ) = U (θ; 0; 0) = 6 2 2 7 (3) Y 3 4 θ θ 5 sin cos 2 2 A controlled-U gate, CU, is an an application of the Fig. 1. An example of a two-node discrete Bayesian Network gate U to the target qubit(s) when the control qubit is j1i. For example, the controlled-RY , CRY , performs the Y-axis rotation of θ to the target qubit when the controlled qubit is nodes act as control qubits and the child node is the target in the state j1i.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    7 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