# Quantum Circuit Learning with Error Backpropagation Algorithm and Experimental Implementation

^{1}

^{2}

^{3}

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Quantum Backpropagation Algorithm

## 3. Simulation Results

#### 3.1. Regression

#### 3.2. Classification

#### 3.3. Learning Efficiency Improvement

#### 3.4. Computation Efficiency

## 4. Experimental Implementation Using IBM Q

## 5. Conclusions

## Supplementary Materials

## Author Contributions

## Funding

## Institutional Review Board Statement

## Informed Consent Statement

## Data Availability Statement

## Acknowledgments

## Conflicts of Interest

## References

- Preskill, J. Quantum Computing in the NISQ Era and Beyond. Quantum
**2018**, 2, 79. [Google Scholar] [CrossRef] - Farhi, E.; Goldstone, J.; Gutmann, S. A Quantum Approximate Optimization Algorithm. arXiv
**2014**, arXiv:1411.4028. [Google Scholar] - Peruzzo, A.; McClean, J.; Shadbolt, P.; Yung, M.-H.; Zhou, X.-Q.; Love, P.J.; Aspuru-Guzik, A.; O’Brien, J.L. A Variational Eigenvalue Solver on a Photonic Quantum Processor. Nat. Commun
**2014**, 5, 4213. [Google Scholar] [CrossRef] [PubMed][Green Version] - Shiba, K.; Sakamoto, K.; Yamaguchi, K.; Malla, D.B.; Sogabe, T. Convolution Filter Embedded Quantum Gate Autoencoder. arXiv
**2019**, arXiv:1906.01196. [Google Scholar] - Chen, C.-C.; Shiau, S.-Y.; Wu, M.-F.; Wu, Y.-R. Hybrid Classical-Quantum Linear Solver Using Noisy Intermediate-Scale Quantum Machines. arXiv
**2019**, arXiv:1903.10949. [Google Scholar] [CrossRef][Green Version] - McCaskey, A.; Dumitrescu, E.; Liakh, D.; Humble, T. Hybrid Programming for Near-Term Quantum Computing Systems. arXiv
**2018**, arXiv:1805.09279. [Google Scholar] - Brooks, M. Beyond Quantum Supremacy: The Hunt for Useful Quantum Computers. Nature
**2019**, 574, 19–21. [Google Scholar] [CrossRef][Green Version] - Arute, F.; Arya, K.; Babbush, R.; Bacon, D.; Bardin, J.C.; Barends, R.; Biswas, R.; Boixo, S.; Brandao, F.G.S.L.; Buell, D.A.; et al. Quantum Supremacy Using a Programmable Superconducting Processor. Nature
**2019**, 574, 505–510. [Google Scholar] [CrossRef] [PubMed][Green Version] - Pednault, E.; Gunnels, J.A.; Nannicini, G.; Horesh, L.; Wisnieff, R. Leveraging Secondary Storage to Simulate Deep 54-Qubit Sycamore Circuits. arXiv
**2019**, arXiv:1910.09534. [Google Scholar] - Grimsley, H.R.; Economou, S.E.; Barnes, E.; Mayhall, N.J. An Adaptive Variational Algorithm for Exact Molecular Simulations on a Quantum Computer. Nat. Commun.
**2019**, 10, 3007. [Google Scholar] [CrossRef][Green Version] - Sugisaki, K.; Nakazawa, S.; Toyota, K.; Sato, K.; Shiomi, D.; Takui, T. Quantum Chemistry on Quantum Computers: Quantum Simulations of the Time Evolution of Wave Functions under the S 2 Operator and Determination of the Spin Quantum Number, S. Phys. Chem. Chem. Phys.
**2019**, 21, 15356–15361. [Google Scholar] [CrossRef][Green Version] - Romero, J.; Babbush, R.; McClean, J.R.; Hempel, C.; Love, P.; Aspuru-Guzik, A. Strategies for Quantum Computing Molecular Energies Using the Unitary Coupled Cluster Ansatz. arXiv
**2018**, arXiv:1701.02691. [Google Scholar] [CrossRef][Green Version] - Cao, Y.; Romero, J.; Olson, J.P.; Degroote, M.; Johnson, P.D.; Kieferová, M.; Kivlichan, I.D.; Menke, T.; Peropadre, B.; Sawaya, N.P.D.; et al. Quantum Chemistry in the Age of Quantum Computing. Chem. Rev.
**2019**, 119, 10856–10915. [Google Scholar] [CrossRef] [PubMed][Green Version] - Parrish, R.M.; Hohenstein, E.G.; McMahon, P.L.; Martínez, T.J. Quantum Computation of Electronic Transitions Using a Variational Quantum Eigensolver. Phys. Rev. Lett.
**2019**, 122, 230401. [Google Scholar] [CrossRef][Green Version] - Schuld, M.; Killoran, N. Quantum Machine Learning in Feature Hilbert Spaces. Phys. Rev. Lett.
**2019**, 122, 040504. [Google Scholar] [CrossRef][Green Version] - Li, T.; Chakrabarti, S.; Wu, X. Sublinear Quantum Algorithms for Training Linear and Kernel-Based Classifiers. arXiv
**2019**, arXiv:1904.02276. [Google Scholar] - Blank, C.; Park, D.K.; Rhee, J.-K.K.; Petruccione, F. Quantum Classifier with Tailored Quantum Kernel. arXiv
**2019**, arXiv:1909.02611. [Google Scholar] [CrossRef] - Srinivasan, S.; Downey, C.; Boots, B. Learning and Inference in Hilbert Space with Quantum Graphical Models. In Advances in Neural Information Processing Systems 31; The MIT Press: Cambridge, MA, USA, 2018; pp. 10338–10347. [Google Scholar]
- Nelder, J.A.; Mead, R. A Simplex Method for Function Minimization. Comput. J.
**1965**, 7, 308–313. [Google Scholar] [CrossRef] - Dey, S.; Bhattacharyya, S.; Maulik, U. Efficient Quantum Inspired Meta-Heuristics for Multi-Level True Colour Image Thresholding. Appl. Soft Comput.
**2017**, 56, 472–513. [Google Scholar] [CrossRef] - Islam, J.; Mamo Negash, B.; Vasant, P.; Ishtiaque Hossain, N.; Watada, J. Quantum-Based Analytical Techniques on the Tackling of Well Placement Optimization. Appl. Sci.
**2020**, 10, 7000. [Google Scholar] [CrossRef] - Spall, J.C. Multivariate Stochastic Approximation Using a Simultaneous Perturbation Gradient Approximation. IEEE Trans. Autom. Control
**1992**, 37, 332–341. [Google Scholar] [CrossRef][Green Version] - Mitarai, K.; Negoro, M.; Kitagawa, M.; Fujii, K. Quantum Circuit Learning. Phys. Rev. A
**2018**, 98, 032309. [Google Scholar] [CrossRef][Green Version] - Rumelhart, D.E.; Hinton, G.E.; Williams, R.J. Learning Representations by Back-Propagating Errors. Nature
**1986**, 323, 533–536. [Google Scholar] [CrossRef] - Zimmer, B.; Venkatesan, R.; Shao, Y.S.; Clemons, J.; Fojtik, M.; Jiang, N.; Keller, B.; Klinefelter, A.; Pinckney, N.; Raina, P.; et al. A 0.11 PJ/Op, 0.32-128 TOPS, Scalable Multi-Chip-Module-Based Deep Neural Network Accelerator with Ground-Reference Signaling in 16nm. In Proceedings of the 2019 Symposium on VLSI Circuits, Kyoto, Japan, 9–14 June 2019; pp. C300–C301. [Google Scholar]
- LeCun, Y.; Bengio, Y.; Hinton, G. Deep Learning. Nature
**2015**, 521, 436. [Google Scholar] [CrossRef] - Havlíček, V.; Córcoles, A.D.; Temme, K.; Harrow, A.W.; Kandala, A.; Chow, J.M.; Gambetta, J.M. Supervised Learning with Quantum-Enhanced Feature Spaces. Nature
**2019**, 567, 209–212. [Google Scholar] [CrossRef][Green Version] - Pedregosa, F.; Varoquaux, G.; Gramfort, A.; Michel, V.; Thirion, B.; Grisel, O.; Blondel, M.; Prettenhofer, P.; Weiss, R.; Dubourg, V.; et al. Scikit-Learn: Machine Learning in Python. J. Mach. Learn. Res.
**2011**, 12, 2825–2830. [Google Scholar] - Jones, T.; Brown, A.; Bush, I.; Benjamin, S.C. QuEST and High Performance Simulation of Quantum Computers. Sci. Rep.
**2019**, 9, 10736. [Google Scholar] [CrossRef] [PubMed][Green Version] - Boixo, S.; Isakov, S.V.; Smelyanskiy, V.N.; Babbush, R.; Ding, N.; Jiang, Z.; Bremner, M.J.; Martinis, J.M.; Neven, H. Characterizing Quantum Supremacy in Near-Term Devices. Nat. Phys.
**2018**, 14, 595–600. [Google Scholar] [CrossRef] - Bouland, A.; Fefferman, B.; Nirkhe, C.; Vazirani, U. Quantum Supremacy and the Complexity of Random Circuit Sampling. arXiv
**2018**, arXiv:1803.04402. [Google Scholar] - Chen, J.; Zhang, F.; Huang, C.; Newman, M.; Shi, Y. Classical Simulation of Intermediate-Size Quantum Circuits. arXiv
**2018**, arXiv:1805.01450. [Google Scholar] - Smelyanskiy, M.; Sawaya, N.P.D.; Aspuru-Guzik, A. QHiPSTER: The Quantum High Performance Software Testing Environment. arXiv
**2016**, arXiv:1601.07195. [Google Scholar] - Villalonga, B.; Boixo, S.; Nelson, B.; Henze, C.; Rieffel, E.; Biswas, R.; Mandrà, S. A Flexible High-Performance Simulator for Verifying and Benchmarking Quantum Circuits Implemented on Real Hardware. Npj Quantum Inf.
**2019**, 5, 86. [Google Scholar] [CrossRef] - IBM Quantum Experience. Available online: http://www.research.ibm.com/quantum (accessed on 20 May 2021).
- Gutiérrez, E.; Romero, S.; Trenas, M.A.; Zapata, E.L. Quantum Computer Simulation Using the CUDA Programming Model. Comput. Phys. Commun.
**2010**, 181, 283–300. [Google Scholar] [CrossRef] - Zhang, P.; Yuan, J.; Lu, X. Quantum Computer Simulation on Multi-GPU Incorporating Data Locality. In Algorithms and Architectures for Parallel Processing; Wang, G., Zomaya, A., Martinez, G., Li, K., Eds.; Lecture Notes in Computer Science; Springer International Publishing: Cham, Switzerland, 2015; Volume 9528, pp. 241–256. ISBN 978-3-319-27118-7. [Google Scholar]
- Häner, T.; Steiger, D.S. 0.5 Petabyte Simulation of a 45-Qubit Quantum Circuit. In Proceedings of the International Conference for High Performance Computing, Networking, Storage and Analysis; ACM: Denver, CO, USA, 2017; pp. 1–10. [Google Scholar]
- Chen, Z.-Y.; Zhou, Q.; Xue, C.; Yang, X.; Guo, G.-C.; Guo, G.-P. 64-Qubit Quantum Circuit Simulation. Sci. Bull.
**2018**, 63, 964–971. [Google Scholar] [CrossRef][Green Version] - Fried, E.S.; Sawaya, N.P.D.; Cao, Y.; Kivlichan, I.D.; Romero, J.; Aspuru-Guzik, A. QTorch: The Quantum Tensor Contraction Handler. PLoS ONE
**2018**, 13, e0208510. [Google Scholar] [CrossRef] [PubMed][Green Version] - Rudiak-Gould, B. The Sum-over-Histories Formulation of Quantum Computing. arXiv
**2006**, arXiv:quant-ph/0607151. [Google Scholar]

**Figure 1.**Example of three-gate quantum circuit and its corresponding fully connected quantum network, showing similarity to a four-layer neural network with equal numbers of nodes in the input layer, middle layer, and output layer. Note that the amplitude value is not normalized for better eye-guiding illustration.

**Figure 2.**(

**a**) Preparation of input state by a unitary input gate ${U}_{in}\left(\mathit{x}\right)$ exemplified by a series of rotation gates. (

**b**) Quantum circuit to present variational parameter state $W\left(\mathit{\theta}\right)$. l denotes the depth of the quantum circuit. (

**c**) Quantum entanglement circuit where ${U}_{\mathrm{ent}}$ gate is composed of CZ gates from qubit j to qubit (j + 1) mod n, j $\in \left\{0,\dots ,n-1\right\}$.

**Figure 4.**(

**a**) Regression of target function ${f}_{1}\left(x\right)=x+0.015N\left(0,1\right)$. (

**b**) Regression results for target function ${f}_{2}\left(x\right)={x}^{2}+0.015N\left(0,1\right)$. (

**c**) Regression results for target function ${f}_{3}\left(x\right)=sinx+0.015N\left(0,1\right)$.

**Figure 5.**Quantum circuit and measurement to obtain observation probability for classification task.

**Figure 6.**Quantum circuit learning results using error backpropagation for nonlinear binary classification problem with 4 qubits and 7 layers of depth. (

**a**) Training data set for make_circles, red for label ‘0’ and blue for label ‘1’. (

**b**) Test results using the learned parameter using the 200 data make_circles dataset, pink line corresponding to the median boundary of the continuous probability. (

**c**) scikit-learn-SVM classification results using the learned support vectors. (

**d**) Training data set for make_moons, red for label ‘0’ and blue for label ‘1’. (

**e**) Test results using the learned parameter under the 200 data make_moon dataset, pink line corresponding to the median boundary of the continuous probability. (

**f**) scikit-learn-SVM classification results using the learned support vectors.

**Figure 7.**Improvement of quantum learning efficiency using the 200 data make_moon dataset. (i) Effect of quantum circuit depth on the classification accuracy. Training data set of label ‘0’ and blue for label ‘1’ are shown in dotted black line, and pink line corresponds to the median boundary of the continuous probability. (

**a**) Four layers of the quantum circuit with 4 qubits. (

**b**) Seven layers of the quantum circuit with 4 qubits. (

**c**) Ten layers of the quantum circuit with 4 qubits. (ii) Effect of scaling parameter $\gamma $ on the classification accuracy. (

**d**) $\gamma =1$. (

**e**) $\gamma =3$. (

**f**) $\gamma =5$.

**Figure 8.**Comparison of computation cost for different approaches. (

**a**) Computation cost dependence on the depth of the quantum circuit. (

**b**) Computation cost dependence on the number of qubits.

**Figure 9.**Implementation architecture of error backpropagation-based quantum circuit learning on the real NISQ devices. The node color depicted in the left-side circuit denotes the noise level.

**Figure 10.**Results of linear regression using a real machine. Regression of target function $f\left(x\right)=x$. (

**a**) The number of measurements ${M}_{shot}$ of the quantum circuit is 2048 times. (

**b**) ${M}_{shot}=4096.$ Here the probability comparison for $x=0.5$ is shown. The left one is the measurement of IBM Q computer and the right one is derived from the quantum circuit simulator. (

**c**)${M}_{shot}=8192$.

Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |

© 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Watabe, M.; Shiba, K.; Chen, C.-C.; Sogabe, M.; Sakamoto, K.; Sogabe, T. Quantum Circuit Learning with Error Backpropagation Algorithm and Experimental Implementation. *Quantum Rep.* **2021**, *3*, 333-349.
https://doi.org/10.3390/quantum3020021

**AMA Style**

Watabe M, Shiba K, Chen C-C, Sogabe M, Sakamoto K, Sogabe T. Quantum Circuit Learning with Error Backpropagation Algorithm and Experimental Implementation. *Quantum Reports*. 2021; 3(2):333-349.
https://doi.org/10.3390/quantum3020021

**Chicago/Turabian Style**

Watabe, Masaya, Kodai Shiba, Chih-Chieh Chen, Masaru Sogabe, Katsuyoshi Sakamoto, and Tomah Sogabe. 2021. "Quantum Circuit Learning with Error Backpropagation Algorithm and Experimental Implementation" *Quantum Reports* 3, no. 2: 333-349.
https://doi.org/10.3390/quantum3020021