Skip to main content

Quantum circuit design search

Abstract

This article explores search strategies for the design of parameterized quantum circuits. We propose several optimization approaches including random search plus survival of the fittest, reinforcement learning both with classical and hybrid quantum classical controllers, and Bayesian optimization as decision makers to design a quantum circuit in an automated way for a specific task such as multi-labeled classification over a dataset. We introduce nontrivial circuit architectures that are arduous to be hand-designed and efficient in terms of trainability. In addition, we introduce reuploading of initial data into quantum circuits as an option to find more general designs. We numerically show that some of the suggested architectures for the Iris dataset accomplish better results compared to the established parameterized quantum circuit designs in the literature. In addition, we investigate the trainability of these structures on the unseen dataset Glass. We report meaningful advantages over the benchmarks for the classification of the Glass dataset which supports the fact that the suggested designs are inherently more trainable.

This is a preview of subscription content, access via your institution.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12

References

  1. Alexeev Y, Khairy S, Shaydulin R, Cincio L, Balaprakash P (2020) Reinforcement learning for finding qaoa parameters. Bull Am Phys Soc 65

  2. Beer K, Bondarenko D, Farrelly T, Osborne TJ, Salzmann R, Scheiermann D, Wolf R (2020) Training deep quantum neural networks. Nat Commun 11(1):1–6

    Article  Google Scholar 

  3. Bergholm V, Izaac J, Schuld M, Gogolin C, Sohaib Alam M, Ahmed S, Arrazola JM, Blank C, Delgado A, Jahangiri S et al (2018) Pennylane: automatic differentiation of hybrid quantum-classical computations. arXiv:1811.04968

  4. Cartis C, Fiala J, Marteau B, Roberts L (2019) Improving the flexibility and robustness of model-based derivative-free optimization solvers. ACM Trans Math Softw (TOMS) 45(3):1–41

    MathSciNet  Article  Google Scholar 

  5. Cerezo M, Sone A, Volkoff T, cincio L, Coles PJ (2020) Cost-function-dependent barren plateaus in shallow quantum neural networks. arXiv:2001.00550

  6. Chivilikhin D, Samarin A, Ulyantsev V, Iorsh I, Oganov AR, Kyriienko O (2020) Mog-vqe: multiobjective genetic variational quantum eigensolver. arXiv:2007.04424

  7. Crooks GE (2019) Gradients of parameterized quantum gates using the parameter-shift rule and gate decomposition. arXiv:1905.13311

  8. Dutta S, Suau A, Dutta S, Roy S, Behera BK, Panigrahi PK (2018) Quantum circuit design methodology for multiple linear regression. arXiv:1811.01726

  9. Frazier PI (2018) A tutorial on bayesian optimization. arXiv:1807.02811

  10. Farhi E, Goldstone J, Gutmann S (2014) A quantum approximate optimization algorithm. arXiv:1411.4028

  11. Farhi E, Neven H (2018) Classification with quantum neural networks on near term processors. arXiv:1802.06002

  12. Grant E, Benedetti M, Cao S, Hallam A, Lockhart J, Stojevic V, Green AG, Severini S (2018) Hierarchical quantum classifiers. npj Quantum Inform 4(1):1–8

    Article  Google Scholar 

  13. Grant E, Wossnig L, Ostaszewski M, Benedetti M (2019) An initialization strategy for addressing barren plateaus in parametrized quantum circuits. Quantum 3:214

    Article  Google Scholar 

  14. Huang H-Y, Bharti K, Rebentrost P (2019) Near-term quantum algorithms for linear systems of equations. arXiv:1909.07344

  15. Jones T, Benjamin SC (2018) Quantum compilation and circuit optimisation via energy dissipation. arXiv:1811.03147

  16. Kandala A, Mezzacapo A, Temme K, Takita M, Brink M, Chow JM, Gambetta JM (2017) Hardware-efficient variational quantum eigensolver for small molecules and quantum magnets. Nature 549(7671):242–246

    Article  Google Scholar 

  17. Kingma DP, Ba J (2014) Adam: a method for stochastic optimization. arXiv:1412.6980

  18. Klein A, Falkner S, Mansur N, Hutter F (2017) Robo: a flexible and robust bayesian optimization framework in python. In: NIPS 2017 Bayesian Optimization Workshop

  19. Li L, Fan M, Coram M, Riley P, Leichenauer S et al (2020) Quantum optimization with a novel gibbs objective function and ansatz architecture search. Phys Rev Res 2(2):023074

    Article  Google Scholar 

  20. McClean JR, Boixo S, Smelyanskiy VN, Babbush R, Neven H (2018) Barren plateaus in quantum neural network training landscapes. Nat Ccommun 9(1):1–6

    Article  Google Scholar 

  21. McClean JR, Romero J, Babbush R, Aspuru-Guzik A (2016) The theory of variational hybrid quantum-classical algorithms. New J Phys 18(2):023023

    Article  Google Scholar 

  22. McKiernan KA, Davis E, Sohaib Alam M, Rigetti C (2019) Automated quantum programming via reinforcement learning for combinatorial optimization. arXiv:1908.08054

  23. Mitarai K, Negoro M, Kitagawa M, Fujii K (2018) Quantum circuit learning. Phys Rev A 98(3):032309

    Article  Google Scholar 

  24. Ostaszewski M, Grant E, Benedetti M (2019) Quantum circuit structure learning. arXiv:1905.09692

  25. Peruzzo A, McClean J, Shadbolt P, Yung M-H, Zhou X-Q, Love PJ, Aspuru-Guzik A, O’brien JL (2014) A variational eigenvalue solver on a photonic quantum processor. Nat Commun 5:4213

    Article  Google Scholar 

  26. Pérez-Salinas A, Cervera-Lierta A, Gil-Fuster E, Latorre JI (2020) Data re-uploading for a universal quantum classifier. Quantum 4:226

    Article  Google Scholar 

  27. Pham H, Guan MY, Zoph B, Le QV, Dean J (2018) Efficient neural architecture search via parameter sharing. arXiv:1802.03268

  28. Pirhooshyaran M, Scheinberg K, Snyder LV (2020) Feature engineering and forecasting via derivative-free optimization and ensemble of sequence-to-sequence networks with applications in renewable energy. Energy 196:117136

    Article  Google Scholar 

  29. Preskill J (2018) Quantum computing in the nisq era and beyond. Quantum 2:79

    Article  Google Scholar 

  30. Raeisi S, Wiebe N, Sanders BC (2012) Quantum-circuit design for efficient simulations of many-body quantum dynamics. New J Phys 14(10):103017

    Article  Google Scholar 

  31. Ratcliff JW, Metzener DE (1988) Pattern-matching-the gestalt approach. Dr Dobbs J 13(7):46

    Google Scholar 

  32. Rattew AG, Hu S, Pistoia M, Chen R, Wood S (2019) A domain-agnostic, noise-resistant, hardware-efficient evolutionary variational quantum eigensolver. arXiv pages arXiv–1910

  33. Schuld M, Bergholm V, Gogolin C, Izaac J, Killoran N (2019) Evaluating analytic gradients on quantum hardware. Phys Rev A 99(3):032331

    Article  Google Scholar 

  34. Schuld M, Bocharov A, Svore KM, Wiebe N (2020) Circuit-centric quantum classifiers. Phys Rev A 101(3):032308

    MathSciNet  Article  Google Scholar 

  35. Skolik A, McClean JR, Mohseni M, van der Smagt P, Leib M (2020) Layerwise learning for quantum neural networks. arXiv:2006.14904

  36. Snoek J, Larochelle H, Adams RP (2012) Practical bayesian optimization of machine learning algorithms. In: Advances in neural information processing systems, pp 2951–2959

  37. Sutton RS, McAllester DA, Singh SP, Mansour Y (2000) Policy gradient methods for reinforcement learning with function approximation. In: Advances in neural information processing systems, pp 1057–1063

  38. Verdon G, Pye J, Broughton M (2018) A universal training algorithm for quantum deep learning. arXiv:1806.09729

  39. Williams CP, Gray AG (1998) Automated design of quantum circuits. In: NASA International conference on quantum computing and quantum communications. Springer, pp 113–125

  40. Yabuki T, Iba H (2000) Genetic algorithms for quantum circuit design-evolving a simpler teleportation circuit. In: Late breaking papers at the 2000 genetic and evolutionary computation conference. Citeseer, pp 421–425

  41. Zhang S-X, Hsieh C-Y, Zhang S, Yao H (2020) Differentiable quantum architecture search. arXiv:2010.08561

  42. Zoph B, Le QV (2016) Neural architecture search with reinforcement learning. arXiv:1611.01578

Download references

Funding

This work is partially supported by the Defense Advanced Research Projects Agency as part of the project W911NF2010022: The Quantum Computing Revolution and Optimization: Challenges and Opportunities.

Author information

Affiliations

Authors

Corresponding author

Correspondence to Mohammad Pirhooshyaran.

Ethics declarations

Disclaimer

The authors are accountable for the conclusions documented in the paper and the points claimed in the article have not been endorsed by the sponsoring agency.

Additional information

Publisher’s note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Appendices

Appendix A: Hyperparameters and optimization schemes for R-QCDS

There are two separate parts in the R-QCDS environment, a controller and a PQC. Regardless of having a fully classical controller (DNN) or a Q-controller, the optimization part is on classical optimization methods. When we have a Q-controller, then a fixed small structure shown in Fig. 3 will be used, one for any decision to be made. That is why we limited the Q-controller to the ones where there is only one layer and that layer repeats itself. The structure is fixed while the rotation 𝜃 s are parameters of the controller and are going through optimization scheme to be optimized. (Similar to the parameters of the DNN if the controller was a classical one)

In this study for R-QCDS, we use Adam optimization algorithm (Kingma and Ba 2014) with β1 = 0.9, β2 = 0.999 and 𝜖 = 0.001 to optimize the parameters of both controller network and PQC; However, we use separate learning schemes with different learning rates. This allows independent learning paces for the two structures of the framework. Our studies show that the learning rate for controller network can be larger than the PQC learning rate. For instance, in Fig. 7 controller learning rates are 0.1, 0.2, 0.02, and 0.02 for the different R-QCDS approaches in the same order written in the plot legend while PQC learning rate is 0.01 for all the cases. Table 1 presents the hyperparameters for the R-QCDS framework. After a design is being suggested by the algorithm, then the focus is on the PQC and the controller hyperparameters are out of use.

Table 1 Hyperparameters

Appendix B: New datasets and the structure of the discovered circuits

Generally, in the literature of PQC, there are two approaches towards dealing with the features of a dataset: (1) using preprocessing and reduction techniques to bring down the size of the features in the dataset to make it manageable for NISQ devices and (2) considering one qubit per one data feature. We point out that in our study we consider one qubit per one data feature. For the first approach though, for instance, Farhi et al. (2014) simply crop 4 × 4 = 16 feature sections out of 28 × 28 = 784 MNIST images. However, such modifications completely change the dataset. The remaining dataset is no longer a representation of MNIST. In general, the performance of the whole framework would be greatly affected by how we reduce the feature dimension.

In our study, to show the robustness of our claims, we use datasets that are already manageable in size by quantum simulators and there is no need for feature reduction. That is why we choose Iris and Glass datasets. Their original feature spaces equal to four and nine and we further consider four and nine qubit circuits for them respectively to consider a qubit per feature.

In addition, We aim to show the structures that we found are inherently strong in learning and capturing the information of other unseen datasets over which they have not been trained in comparison with standard benchmark structures. So, we do not want to change the structures, however, the implementation of these designs for the new task is not straightforward because the designs we discovered so far are for four qubit circuits and now we want nine qubit circuits and as we said earlier we prohibit ourselves from changing the Glass dataset to fit to our circuit. Hence, we set this simple rule that if needed (like this case) we repeat the structure of a discovered circuit to the point that we fill out the new circuit widthwise.

Rights and permissions

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Pirhooshyaran, M., Terlaky, T. Quantum circuit design search. Quantum Mach. Intell. 3, 25 (2021). https://doi.org/10.1007/s42484-021-00051-z

Download citation

Keywords

  • Parameterized quantum circuits
  • Quantum circuit design
  • Circuit design search
  • Random quantum circuits
  • Multi-labeled classification
  • Reinforcement learning