Hybrid quantum algorithms combine the strengths of quantum and classical computing. Many such algorithms, including the variational quantum eigensolver (VQE), embed parameterized quantum circuits as subroutines inside a classical host program. In current toolchains these circuits are executed in full, even when only a subset of measurement outcomes actually contributes to subsequent classical computations.In this manuscript, we propose a circuit optimization technique that uses information from the host program to identify and remove dead gates, i.e. quantum operations whose effects propagate only into measurement outcomes that are never semantically consumed. We formalize equivalence of circuits relative to the valid measurement outcomes, characterize dead gates, and give a polynomial-time elimination algorithm. We prove that removing dead gates does not change the probability distribution of the contributory measurement outcomes and therefore preserves the semantics of the overall hybrid program. We also discuss the challenges in host-side analysis.We implement our optimization and evaluate it on instances of VQE, quantum phase estimation (QPE), a QAOA-based MaxCut solver, and a Trotterised Hamiltonian-simulation algorithm, as well as on randomly generated hybrid programs. Across all benchmarks, our method removes a non-trivial fraction of gates even on circuits that have already been pre-optimized by state-of-the-art transpilers; in some cases it can eliminate entire quantum blocks when all measurement outcomes are dead. This article is an extended journal version of our conference paper~\cite{10.1007/978-3-031-97632-2_10}.
Hybrid quantum algorithms combine the strengths of quantum and classical computing. Many such algorithms, including the variational quantum eigensolver (VQE), embed parameterized quantum circuits as subroutines inside a classical host program. In current toolchains these circuits are executed in full, even when only a subset of measurement outcomes actually contributes to subsequent classical computations.In this manuscript, we propose a circuit optimization technique that uses information from the host program to identify and remove dead gates, i.e. quantum operations whose effects propagate only into measurement outcomes that are never semantically consumed. We formalize equivalence of circuits relative to the valid measurement outcomes, characterize dead gates, and give a polynomial-time elimination algorithm. We prove that removing dead gates does not change the probability distribution of the contributory measurement outcomes and therefore preserves the semantics of the overall hybrid program. We also discuss the challenges in host-side analysis.We implement our optimization and evaluate it on instances of VQE, quantum phase estimation (QPE), a QAOA-based MaxCut solver, and a Trotterised Hamiltonian-simulation algorithm, as well as on randomly generated hybrid programs. Across all benchmarks, our method removes a non-trivial fraction of gates even on circuits that have already been pre-optimized by state-of-the-art transpilers; in some cases it can eliminate entire quantum blocks when all measurement outcomes are dead. This article is an extended journal version of our conference paper~\cite{10.1007/978-3-031-97632-2_10}.
Hybrid programs combine a quantum circuit with a classical host program that consumes measurement outcomes. In such programs, an outcome may be syntactically read by the host but semantically non-contributory: changing the outcome cannot change the returned value. Such outcomes obscure gates that are dead only relative to the host semantics, and are therefore invisible to circuit-local optimizers.
We present a semantics-aware host-side static analysis that identifies non-contributory measurement outcomes by abstract interpretation, and prove its soundness. We implement the analysis and evaluate it on 24 application-faithful hybrid workloads across quantum chemistry, optimization, quantum machine learning, and quantum finance. Compared with a syntactic liveness baseline, our analysis identifies more than 4× as many non-contributory measurements, and it standalone enables the removal of 37.98% of total gates on average. Even after the state-of-the-art optimizers like Qiskit, t|ket⟩, and PyZX have already optimized the circuits, our analysis still enables removal of more than 30% of the post-optimized gates, showing that the host-semantic opportunities exposed by our analysis are not subsumed by circuit-local optimization. To scale our analysis, we further lower host programs to an SSA-style levelized intermediate representation that exposes level-wise parallelism for GPU execution, and implement a CUDA backend. We prove that this lowering preserves the analysis result, and the evaluation shows speedups of up to 6.53× over a sequential baseline as structural parallelism increases.
While quantum computers are a very promising tool for the far future, in their current state of the art they remain limited both in size and quality. This has given rise to hybrid quantum-classical algorithms, where the quantum device performs only a small but vital part of the overall computation. Among these, variational quantum algorithms (VQAs), which combine a classical optimization procedure with quantum evaluation of a cost function, have emerged as particularly promising. However, barren plateaus and ill-conditioned optimization landscapes remain among the primary obstacles faced by VQAs, often leading to unstable convergence and high sensitivity to initialization. Motivated by this challenge, we investigate whether a purely classical remedy, standard L2 squared-norm regularization, can systematically stabilize hybrid quantum-classical optimization. Specifically, we augment the Variational Quantum Eigensolver (VQE) objective with a quadratic penalty proportional to the squared norm of the parameters, without modifying the quantum circuit or measurement process. Across all tested Hamiltonians, H2, LiH, and the Random Field Ising Model (RFIM), we observe improved performance over a broad window of the regularization strength. Our large-scale numerical results demonstrate that classical regularization provides a robust, system-independent mechanism for mitigating VQE instability, enhancing the reliability and reproducibility of variational quantum optimization without altering the underlying quantum circuit.
The use of mid-circuit measurement and qubit reset within quantum programs has been introduced recently and several applications demonstrated that perform conditional branching based on these measurements. In this work, we go a step further and describe a next-generation implementation of classical computation embedded within quantum programs that enables the real-time calculation and adjustment of program variables based on the mid-circuit state of measured qubits. A full-featured Quantum Intermediate Representation (QIR) model is used to describe the quantum circuit including its embedded classical computation. This integrated approach eliminates the need to evaluate and store a potentially prohibitive volume of classical data within the quantum program in order to explore multiple solution paths. It enables a new type of quantum algorithm that requires fewer round-trips between an external classical driver program and the execution of the quantum program, significantly reducing computational latency, as much of the classical computation can be performed during the coherence time of quantum program execution. We review practical challenges to implementing this approach along with developments underway to address these challenges. An implementation of this novel and powerful quantum programming pattern, a random walk phase estimation algorithm, is demonstrated on a physical quantum computer with an analysis of its benefits and feasibility as compared to existing quantum computing methods.
The variational quantum eigensolver (VQE) is currently the flagship algorithm for solving electronic structure problems on near-term quantum computers. This hybrid quantum/classical algorithm involves implementing a sequence of parameterized gates on quantum hardware to generate a target quantum state, and then measuring the expectation value of the molecular Hamiltonian. Due to finite coherence times and frequent gate errors, the number of gates that can be implemented remains limited on current quantum devices, preventing accurate applications to systems with significant entanglement, such as strongly correlated molecules. In this work, we propose an alternative algorithm (which we refer to as ctrl-VQE) where the quantum circuit used for state preparation is removed entirely and replaced by a quantum control routine which variationally shapes a pulse to drive the initial Hartree-Fock state to the full CI target state. As with VQE, the objective function optimized is the expectation value of the qubit-mapped molecular Hamiltonian. However, by removing the quantum circuit, the coherence times required for state preparation can be drastically reduced by directly optimizing the pulses. We demonstrate the potential of this method numerically by directly optimizing pulse shapes which accurately model the dissociation curves of the hydrogen molecule (covalent bond) and helium hydride ion (ionic bond), and we compute the single point energy for LiH with four transmons.
Within the context of hybrid quantum-classical optimization, gradient descent based optimizers typically require the evaluation of expectation values with respect to the outcome of parameterized quantum circuits. In this work, we explore the consequences of the prior observation that estimation of these quantities on quantum hardware results in a form of s t o c h a s t i c gradient descent optimization. We formalize this notion, which allows us to show that in many relevant cases, including VQE, QAOA and certain quantum classifiers, estimating expectation values with k measurement outcomes results in optimization algorithms whose convergence properties can be rigorously well understood, for any value of k . In fact, even using single measurement outcomes for the estimation of expectation values is sufficient. Moreover, in many settings the required gradients can be expressed as linear combinations of expectation values -- originating, e.g., from a sum over local terms of a Hamiltonian, a parameter shift rule, or a sum over data-set instances -- and we show that in these cases k -shot expectation value estimation can be combined with sampling over terms of the linear combination, to obtain ``doubly stochastic'' gradient descent optimizers. For all algorithms we prove convergence guarantees, providing a framework for the derivation of rigorous optimization results in the context of near-term quantum devices. Additionally, we explore numerically these methods on benchmark VQE, QAOA and quantum-enhanced machine learning tasks and show that treating the stochastic settings as hyper-parameters allows for state-of-the-art results with significantly fewer circuit executions and measurements.
Abstract While quantum computers are a very promising tool for the far future, in their current state of the art they remain limited both in size and quality. This has given rise to hybrid quantum--classical algorithms, where the quantum device performs only a small but vital part of the overall computation. Among these, variational quantum algorithms (VQAs), which combine a classical optimization procedure with quantum evaluation of a cost function, have emerged as particularly promising. However, barren plateaus and ill-conditioned optimization landscapes remain among the primary obstacles faced by VQAs, often leading to unstable convergence and high sensitivity to initialization. Motivated by this challenge, we investigate whether a purely classical remedy---standard L2 squared-norm regularization---can systematically stabilize hybrid quantum--classical optimization. Specifically, we augment the Variational Quantum Eigensolver (VQE) objective with a quadratic penalty (R(θ)=λ∥θ∥2), without modifying the quantum circuit or measurement process. Across all tested Hamiltonians---H(2), LiH, and the Random Field Ising Model (RFIM)---we observe improved performance over a broad window of the regularization strength (λ). Our large-scale numerical results demonstrate that classical regularization provides a robust, system-independent mechanism for mitigating VQE instability, enhancing the reliability and reproducibility of variational quantum optimization without altering the underlying quantum circuit.