A project by Felipe Quinteros (UdeC, Chile), Mariana Navarro (ICFO, Spain), Jorge Gidi (UdeC, Chile), and Luciano Pereira (IFF-CSIC, Spain) for the Open Hackathon in the Qhack 2023.
Variational quantum algorithms have the potential to solve real-world practical problems with quantum computers in the near term [1]. They are hybrid quantum-classical algorithms that optimize an objective function encoded on a hamiltonian over a parametric quantum circuit. This objective function is efficiently evaluated in a quantum computer, while a classical computer is used to drive the optimization. The variational algorithms find applications in areas such as chemistry and finance.
In order to reach real-word applications with variational algorithms, we have to overcome a big issue: the barren plateau phenomenon [2,3]. This consists of the lack of convergence due to the vanishing of the cost function gradient. Pictorially, we can think that the landscape of the objective function is too flat, as shown in the figure, so any optimization method stuck.
This problem can appear due to the following reasons:
1.- The cost function is global, i.e., involves measurements in many qubits [2]. For example, consider the
In [2] the authors recommend avoiding this kind of Hamiltonian in the early iterations of the algorithm and instead employ a local hamiltonian
2.- The parametric quantum circuit is too expressive, that is equivalent to saying that the parametric circuit approximates a 2-design [3]. When this condition is fulfilled the average gradient of the cost functions is null and its variance decay exponentially.
3.- The initial condition for the optimization is too far from the solution, which happens extremely often when is taken randomly. Having good initial conditions increase the probability to start the optimization with a non-zero gradient so that the protocol can converge to the optimum. For example, in [5] is proposed to classically pre-train the variational circuit with tensor networks to have a good initial condition for the quantum optimization.
4.- The problem of a lifetime: the noise [6]. The impact of the noise can be reduced by hardware-efficient circuits and local measurements.
In this project, we develop a Qiskit module that includes several proposals to reduce the impact of barren plateaus in variational quantum algorithms. We also provide an early implementation on Pennylane. For more details visit the introductory notebook or each individual tutorial notebook.
[1] Noisy intermediate-scale quantum algorithms, Rev. Mod. Phys. 94, 015004 (2002).
[2] Cost function dependent barren plateaus in shallow parametrized quantum circuits, Nat Commun 12, 1791 (2021).
[3] Barren plateaus in quantum neural network training landscapes, Nat Commun 9, 4812 (2018).
[4] Mitigating barren plateaus of variational quantum eigensolvers, arXiv:2205.13539v2 (2022).
[5] Matrix product state pre-training for quantum machine learning, Quantum Sci. Technol. 7, 035014 (2022).
[6] Noise-induced barren plateaus in variational quantum algorithms, Nat Commun 12, 6961 (2021).
Tutorials:
2.- Avoiding Cost-function induced Barren Plateaus
6.- Early implementation on Pennylane
Install via pip
as
pip install git+https://github.com/jgidi/quantum-barren-plateaus
or, equivalently,
python -m pip install git+https://github.com/jgidi/quantum-barren-plateaus