Application of Quantum Generative Adversarial Learning in Quantum Image Processing
Total Page:16
File Type:pdf, Size:1020Kb
2020 2nd International Conference on Information Technology and Computer Application (ITCA) Application of Quantum Generative Adversarial Learning in Quantum Image Processing Wanghao Ren1, Zhiming Li1*, Hailing Li2, Yang Li1, Chunwei Zhang1, Xiaoqian Fu1 1School of Information Science and Engineering, University of Jinan, Jinan 250022,China 2Shandong College of Electronic Technology, 250022 Jinan, China *Corresponding Author (Email:[email protected]) Abstract—Quantum machine learning is a hot topic in the fixed controlled NOT gates and adjustable qubit rotations gates. quantum community recently. The combination of quantum The PQCs composed of these gates provide a concrete way that machine learning and image processing is also one of the can be realized by adjusting the unitary operator U. PQCs are researchers' concerns. With the promotion of deep learning to composed of three parts, including encoder circuit, variational process images, the field of image processing has also shown circuit, and measurement. Variational circuits can be thought of amazing potential. The combination of quantum computing and as layers of connected computational units controlled by artificial intelligence can not only exert the computing power of adjustable parameters. The output quantum state is obtained by quantum computing but also find more applications in the field parameterized unitary operation acting on the input state. At the of image processing. This article combines quantum generative end of PQCs, the quantum state is measured, and a set of adversarial learning with the field of image processing. A estimates of the expected value are obtained from the quantum generative adversarial network is designed to load and learn classical image data. Numerical simulations intuitively show measurement. By calculating the estimator, the parameter that quantum algorithms can also effectively process images. In values could be adjusted in the variational circuit. So that the our scheme, using N qubits can load 2N classical bits of image result is more in line with our expectations. data. In classical machine learning, Generative adversarial network (GAN) is one of the most powerful generative models: Keywords-Quantum machine learning; Quantum generative a generator tries to create new sample data that mimic those of adversarial network; Image processing; Deep learning; a true data set, while a discriminator tries to distinguish I. INTRODUCTION between the true and fake data[4]. Recently, the quantum system replaces the generator, discriminator by PQCs to With the rapid development of quantum computation and translate the framework into a quantum computing context. quantum devices, quantum computing, a technology that relies Many quantum adaptations of the classical GAN scheme have on the properties of quantum systems to process information, is been proposed. Seth Lloyd first proposed three theoretical rapidly reaching maturity. As the size of the image becomes models of Quantum Generative Adversarial larger and the calculation becomes more complicated, more Learning(QGAL)[1]. resources and computing power are required. The speed of machine learning training is also affected by the size of the This work discusses the training of an image data loading image. The field of classical machine learning increases the channel with Quantum machine learning(QML) using QPIE speed of training and prediction by increasing computational [11]. More specifically, we present a feasible loading scheme resources. Due to the increasing demand for computing for the quantum image. The scheme utilizes a quantum- resources, it has become a hot topic to replace some classical classical implementation of a quantum generative adversarial computing with quantum computing. network to train a quantum channel. The quantum generator after training could be a sub-circuit of other quantum circuits. The quantum circuit model is the most common and easier The generated quantum state in the quantum register could be to understand in the actual quantum algorithm research [12]. used by other quantum circuits for quantum image processing. Classical calculations can be described by Boolean circuits. Similar to classical circuits, quantum circuit models are also The remainder of the paper is organized as follows. In Sec.2, composed of circuits and quantum logic gates. The line We introduced related work on quantum generative adversarial represents the transmission of information in qubits, while the learning. Then, in Sec.3 the QGAL-based learning and loading quantum logic gate completes the computation of quantum scheme is introduced. Furthermore, the numerical simulation of information. The unitary transformation in the quantum circuit our scheme is introduced in Sec.4. Finally, A brief conclusion maps the initial state of the qubit to a certain terminal state. follows in Sec.5. Each unitary transformation is regarded as a unitary gate, which is composed of several quantum logic gates. II. RELATED WORK Quantum computing is a new type of computing model To utilize existing quantum computers to their fullest extent, based on the principles of quantum mechanics, which has parameterized quantum circuits(PQCs)[5] provide a concrete shown great potential in the field of quantum machine learning. method to implement algorithms in the Noisy Intermediate Scale Quantum (NISQ) era[2]. PQCs are typically composed of 978-0-7381-1141-4/20/$31.00 ©2020 IEEE 467 DOI 10.1109/ITCA52113.2020.00104 Finding suitable applications for these algorithms is a hot topic The information of a pixel position is encoded in a right now. computational basis state, while the pixel information for each pixel is represented by probability amplitude. After defining Jinfeng Zeng et al. use quantum generative adversarial the image encoding method, the corresponding relationship circuits to infer missing data in Bars-and-Stripes dataset[6]. An between the quantum state and the image is corresponding. The adversarial training scheme was proposed to train quantum encoder circuit in PQCs can effectively encode classical circuits. The training approach involves a game between a information into the quantum state. quantum circuit generator and a classical neural network discriminator. The quantum generator generates a probability We propose a quantum generative adversarial learning distribution close to the classical data, and at the same time, the algorithm to learning the encoded quantum image, which classical discriminator determines whether the distribution rapidly converges to Nash equilibrium. We formally define the comes from real data or generated data. The trained quantum quantum generative adversarial learning problem and devise a circuit can be used to infer the missing data. Jonathan Romero general framework for using quantum generative adversarial et al. used a quantum generator and a classical neural network learning to accomplish quantum image processing tasks. as the discriminator and used automatic differentiation tools to perform the optimization of PQCs[7]. The trained quantum Quantum generative adversarial learning consists of a circuit can produce a continuous distribution similar to the data quantum generator G and a quantum discriminator D in Fig1. set. Similarly, Christa Zoufal et al. applied the designed Both the quantum generator and the discriminator are quantum generative adversarial network to the field of quantum composed of universal quantum circuits[13]. Assuming that a finance[8]. quantum state is represented by N quanta, our goal is to generate similar quantum states. Both the generator and the However, for the first time, we use quantum generative discriminator are composed of quantum circuits. Both the adversarial networks learning and load images into quantum quantum generator and the discriminator are composed of devices. Our framework can also learn quantum images quantum circuits. Each quantum circuit is composed of generated by other circuits. The application of learning pictures universal quantum gates. The basic unit of quantum circuits is a is the basis of quantum image processing. By learning the universal quantum gate. Each universal quantum gate can pictures produced by other quantum programs, the circuit can represent the quantum state of any two qubits. learn the quantum state without measuring the entire qubit. The generator attempts to generate data similar to real data III. QUANTUM GENERATIVE ADVERSARIAL LEARNING BY R. Instead, the discriminator tries to distinguish real data from QUANTUM CIRCUITS generated data. The generator G and discriminator D together form a zero-sum game. This zero-sum game can be described Many quantum image processing algorithms need to encode by a loss function: classic images into quantum states. There are three main ways to express encoded information in a quantum state in the field L(G,D) = P(T|fake)P(G) + P(F|real)P(R), of quantum image processing. A flexible representation of quantum images(FRQI)[9] and a novel enhanced quantum representation(NEQR)[10] encode pixel information into an where P(T|fake),P(F|real) donate the probability of angle and basis of qubits respectively. Quantum probability misjudgment. The training goal of the generator is to maximize image encoding(QPIE) directly encodes pixel information into the probability of error making the generated data approximate the probability amplitude. Different image representation to the real data. On the contrary, the discriminator should methods have different emphasis. QPIE can use