Optimizers for Noisy Intermediate-Scale Quantum devices
Software available at pypi and github.
Classical optimizers have important roles to play in quantum computing: in calibration, circuit synthesis, hybrid algorithms, machine learning, hyper-parameter selection, etc., etc. In many cases, the inputs to the optimization consist of noisy data, the result of both stochastic noise due to experimental setups and the probabilistic nature of algorithms, and circuit-level noise due to the limitations of current quantum devices. Within QAT4Chem, we have a particular interest in the Variational Quantum Eigensolver (VQE), a hybrid quantum-classical algorithm, which alternates between a classical optimizer that drives parameter selection and a quantum step that simulates, for example, a molecule.
The figure on the right shows the effect of circuit-level noise, simulated as Gaussian noise on rotation gates, on the optimization surface close to the global minimum for a quantum simulation of an ethylene molecule. This quantum simulation involves only two parameters, with the most relevant one shown, and is about as simple as it gets. There are two effects: first, since the noise does not commute with the circuit, it leads to a random walk away from the true ground energy as calculated by the quantum chip. Second, there is a large increase in variability of experimental outcomes. Clearly, the classical optimizer in the loop needs to be noise-aware for the full VQE algorithm to run properly.
Many optimization tools readily available in standard Python software such as SciPy are not noise-aware. Some methods (e.g. trust regions) are more robust than others, but seldom by design. Fortunately, applied mathematicians in the optimization community have long been working on this type of problem and have provided high quality, open source, software. However, some of the best of these are written for MATLAB, while the quantum computing community has chosen for Python and C++.
We have taken the optimizers that handle noise well, rewritten the MATLAB ones into Python, provided consistent interfaces and plugins for frameworks such as Cirq for all, and packaged this in scikit-quant. All these optimizers easily handle the above ethylene simulation (and larger problems besides), even at the largest levels of noise shown. Unfortunately, at those levels the results of the quantum simulation itself will have drifted too much to be scientifically useful. However, at levels where the quantum chip can deliver, state-of-the-art optimizers do deliver, where standard tools can not (see image on left).
The optimization package in scikit-quant also provides tutorial notebooks with tips and hints for hyper-parameter optimization, and an evaluation harness to quickly assess the applicability of the optimizers to new problems.
RAndom Circuit Block Encoded Matrix (RACBEM)
This is an implementation of the a RAndom Circuit Block Encoded Matrix (RACBEM) and its Hermitian conjugate. It is used to build a quantum singular value circuit using the method of quantum singular value transformation (QSVT). Taking a RAndom Circuit Block Encoded Matrix (RACBEM), this function uses a quantum signal processing circuit to evaluate the matrix inverse, using the method of quantum singular value transformation (QSVT). This implements a (non-Hermitian) block-encoding of a Hermitian matrix manually.
QSP Phase Factors Solvers
A toolbox for solving phase factors in quantum signal processing. The package contains two kinds of solvers:
Direct solver (namely the GSLW method and the Haah method)
The package also contains an implementation of the Remez algorithm for finding polynomial approximation.
Applications that have been solved by these solvers:
Tequila Framework For Chemistry Quantum Simulations
Tequila is an Extensible Quantum Information and Learning Architecture where the main goal is to simplify and accelerate implementation of new ideas for quantum algorithms. It operates on abstract data structures allowing the formulation, combination, automatic differentiation and optimization of generalized objectives. Tequila can execute the underlying quantum expectation values on state of the art simulators as well as on real quantum devices.
QFast Compiler Integrated into AIDE-QC supported Berkeley Quantum Synthesis Toolkit (BQSKit)
The QFast compiler developed under QAT4Chem has been integrated into the Berkeley Quantum Synthesis Toolkit (BQSKit), and continues to be developed under the AIDE-QC project. BQSKit brings together results from compiler efforts in QAT4Chem, the Advanced Quantum Testbed (AQT) and AIDE-QC.