Symbolic & parametric treatment of quantum(-assisted) workflows for tailored circuit optimization

This abstract has open access
Problem description and relevance

Quantum circuits are inherently parametric and optimization of the parameters is required. While this might be explicit as with a Variational-Quantum-Algorithm (VQA), or implicit as with the Quantum-Singular-Value-Transform, the optimal choice of parameters depends not only on the desired algorithm, but also hardware characteristics such as the set of basis gates. As quantum circuits are typically only part of a larger problem setting, and it is desirable to optimize circuits in terms of runtimes, fidelities, or other desired quantities, it can be helpful to also consider the context of the larger problem as in the end we are often interested in the overall time-to-solution, and not just the time-to-readout of the quantum subroutine. 

This opportunity arises, for instance, in machine learning tasks as the outer level of the problem scope. For example, a quantum neural network (QNN) requires the optimization of weights, often represented by parameters such as rotation angles of quantum gates, or the training of Gaussian process (GP) emulators. Traditionally, GPs have mostly been used for classification and regression tasks. Their generalization into GP emulators aims at substituting computationally expensive models, e.g., simulation models, via a cheap-to-evaluate, uncertainty-informed alternative. In particular, their ability to quantify uncertainty makes them a powerful tool for high-throughput tasks [1,2,3], as it enables the separation of surrogate-induced uncertainty from other sources of input uncertainty. Training a GP emulator requires inverting a potentially dense matrix, which has O(N^3) computational complexity and therefore limits its applicability to a moderate number of dimensions in the design parameter space. 

While quantum algorithms have been proposed to tackle this computational bottleneck, any real-world speedups would be lost in an attempt to read the inverted matrix from the quantum computer due to the readout-problem. However, the main task in GP emulator training is formulated as a hyper-parameter tuning, where the hyper-parameters determine how to populate the covariance matrix to invert. It is therefore possible to not only optimize the quantum circuit in a black-box manner, but also with respect to this hyper-parameter tuning.

Submission ID :
54
Submission Topics
Methodology :

In this work, we develop a symbolic quantum circuit simulator that keeps the gate parameters as symbolic variables, instead of numbers, and propagates them through the circuit to obtain analytic expressions for the state and other observables of interest. These expressions enable the computation of symbolic gradients and sensitivity measures, allow for the inspection of the error landscape and retrieval of optimizer diagnostics without relying on repeated numerical probing. A key point for performance is a tensor-algebra-capable backend that operates directly on, e.g., Kronecker-product structures (A⊗B), so that circuit transformations can be performed by rearranging and contracting whole tensor objects rather than expanding every gate into scalar entries. Using identities, such as (A⊗B)(C⊗D)=(AC)⊗(BD), can potentially reduce the computational workload of simulations by orders of magnitude. We implement rewriting steps to fuse layers, reorder gates, and reduce intermediate expression growth before evaluating objectives such as observables.

Similar approaches are used by quantum circuit simulators such as Qiskit when transpiling circuits into the basis gates supported by a given quantum computer or when performing circuit optimizations. The benefit of our method is to stay in the symbolic framework all throughout the circuit optimization. Inputs to the circuit generation as well as their results are kept as symbolic variables. This allows gate parameters, e.g., to be expressed as functions of hyper-parameters used in GP emulator training, and the resulting training loss function can then be further processed or optimized. For final numerical evaluation and execution on actual quantum hardware, circuits can be imported & exported via OpenQASM, allowing for integration with standard ecosystems (e.g., Qiskit, PennyLane).

Practical demonstration :

We evaluate the correctness of the symbolic circuit simulator by comparing symbolic results (observables, loss functions, derivatives, etc.) against high-precision numerical simulations. As a demonstration, we present a GP emulator use case, where the hyper-parameter tuning is cast as an optimization of a scalar loss function, for instance, its log-likelihood expressed in terms of an expectation value obtained from a quantum circuit. We apply symbolic rewriting to reduce the depth of the circuit, and use analytic screening of the scalar objective including information from the resulting symbolic quantum circuit to prune candidate regions before running costly numerical/quantum evaluations. One of the most important quantities of interest is the time-to-solution, i.e. time to find the approximation to the optimal hyper-parameters. In this regard, we show the trade-off between the time spent in classical, symbolic preprocessing of the circuit and objective, and the time spent in numerical/quantum evaluations of the circuit.

Application potential :

For the execution of quantum circuits on actual quantum hardware, the minimization of the circuit depth and the number of multi-qubit gates is crucial, especially so for NISQ devices, as they remain sensitive to noise and decoherence even with the ongoing progress of error correction and mitigation [4]. However, even for fully error-corrected quantum computers, the reduction of circuit runtime remains desirable. As time invested into classical preprocessing also adds to the time-to-solution, efficiency is crucial.

For classical simulations of quantum circuits, computational cost is a limiting factor. If a circuit execution is part of a larger workflow, it is especially desirable to reduce the total number of circuit evaluations. Making each numerical evaluation as computationally affordable as possible is merely a by-product of optimizing the circuit for execution on quantum hardware.

For quantum(-assisted) algorithm development, the benefit is two-fold. Firstly, analytic insights into actual quantum circuits enable bridging the gap between classical algorithmic complexity theory and implementation for real-world applications, which are usually characterized by pure numerical probing. For example, optimization of QNNs differs significantly from their classical counterparts due to the different nature of the neurons' activation functions, i.e. strictly monotonic in the classical case vs. purely periodic in the quantum case. The latter lead to highly oscillatory loss landscapes which the classical optimizer needs to traverse, motivating the development of novel optimizers. Secondly, for hybrid quantum-classical workflows, e.g., encountered in quantum machine learning, an end-to-end symbolic representation of the whole workflow can enable new strategies for optimization by making it feasible to obtain, for example, the gradients and sensitivities of the observables w.r.t. the parameters in a real-world application.

Associated Sessions

Doctoral Candidate
,
MBD @ RWTH Aachen University
Research Associate
,
RWTH Aachen University
RWTH Aachen University
10 visits