Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Log inSign up
Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Blog
Job Board
Q3AS

© 2026 Aqora Quantum S.A.S.

TermsPrivacyLegal Notice

arXiv:2205.15044 · Quantum

Quantum Optimal Control via Semi-Automatic Differentiation

Michael H. Goerz, Sebastian Camilo Carrasco, Vladimir S. Malinovsky

Published Dec 7, 2022• 33 citations
arXivHTMLPDF

Abstract

We develop a framework of "semi-automatic differentiation" that combines existing gradient-based methods of quantum optimal control with automatic differentiation. The approach allows to optimize practically any computable functional and is implemented in two open source Julia packages, GRAPE.jl and Krotov.jl , part of the QuantumControl.jl framework. Our method is based on formally rewriting the optimization functional in terms of propagated states, overlaps with target states, or quantum gates. An analytical application of the chain rule then allows to separate the time propagation and the evaluation of the functional when calculating the gradient. The former can be evaluated with great efficiency via a modified GRAPE scheme. The latter is evaluated with automatic differentiation, but with a profoundly reduced complexity compared to the time propagation. Thus, our approach eliminates the prohibitive memory and runtime overhead normally associated with automatic differentiation and facilitates further advancement in quantum control by enabling the direct optimization of non-analytic functionals for quantum information and quantum metrology, especially in open quantum systems. We illustrate and benchmark the use of semi-automatic differentiation for the optimization of perfectly entangling quantum gates on superconducting qubits coupled via a shared transmission line. This includes the first direct optimization of the non-analytic gate concurrence.

DOI
10.22331/q-2022-12-07-871

Related papers

Optimal control of large quantum systems: assessing memory and runtime performance of GRAPE

Yunwei Lu, Sandeep Joshi, Vinh San Dinh +1 more

Abstract Gradient Ascent Pulse Engineering (GRAPE) is a popular technique in quantum optimal control, and can be combined with automatic differentiation (AD) to facilitate on-the-fly evaluation of cost-function gradients. We illustrate that the convenience of AD comes at a significant memory cost due to the cumulative storage of a large number of states and propagators. For quantum systems of increasing Hilbert space size, this imposes a significant bottleneck. We revisit the strategy of hard-coding gradients in a scheme that fully avoids propagator storage and significantly reduces memory requirements. Separately, we present improvements to numerical state propagation to enhance runtime performance. We benchmark runtime and memory usage and compare this approach to AD-based implementations, with a focus on pushing towards larger Hilbert space sizes. The results confirm that the AD-free approach facilitates the application of optimal control for large quantum systems which would otherwise be difficult to tackle.

arXiv:2304.06200•Journal of Physics Communications•Jan 26, 2024•5 citations

Exploiting automatic differentiation for quantum optimal control of driven dissipative two-level systems

Hamza Jirari, HERSCHEL A. RABITZ

Abstract In principle one can use Pontryagin's minimum principle to treat an optimal control problem and derive the gradient for the cost functional. However, for the driven spin-boson model studied here, the response of the system to the variation of the control is determined by the master equation and the equation of motion for the propagator of the coherent system dynamics. As a result, the application of Pontryagin's minimum principle is less straightforward. An alternative to this approach is the technique of automatic differentiation which in principle amounts to doing calculus on the fully discretized form of the optimal control problem. Automatic differentiation tools can be viewed as black boxes taking as input a program computing the cost functional and giving as output another program computing its gradient. First we derive for the polaron transformed Hamiltonian a Born-Markov master equation using the Bloch-Redfield formalism. By combining the latter with automatic differentiation we are able to implement Z -gate and coherent destruction of tunnelling with high fidelity. Optimization of a dissipative quantum gate poses a more complex numerical problem, since it should occur independent of the input state. To overcome this difficulty, we apply optimal control to the concept of resolvent of the master equation which is the generalisation of quantum unitary evolution operator in the case of dissipative dynamics.

Europhysics Letters (EPL)•Aug 28, 2024•0 citations

GRAPE.jl: Gradient Ascent Pulse Engineering in Julia

Michael H. Goerz, Sebastián C. Carrasco, Alastair Marshall +1 more

The GRAPE$.$jl package (https://github.com/JuliaQuantumControl/GRAPE.jl) implements Gradient Ascent Pulse Engineering, a widely used method of quantum optimal control. Its purpose is to find controls that steer a quantum system in a particular way. This is a prerequisite for next-generation quantum technology, such as quantum computing or quantum sensing. GRAPE$.$jl exploits the unique strengths of the Julia programming language to achieve both flexibility and numerical performance. It builds on the QuantumControl$.$jl framework.

quant-pharXiv:2511.01217•The Journal of Open Source Software•Nov 4, 2025•0 citations

Gradient-based optimal control of open quantum systems using quantum trajectories and automatic differentiation

Mohamed R. Abdelhafez, David Schuster, Jens Koch

We present a gradient-based optimal-control technique for open quantum systems that utilizes quantum trajectories to simulate the quantum dynamics during optimization. Using trajectories allows for optimizing open systems with less computational cost than the regular density matrix approaches in most realistic optimization problems. We introduce an improved-sampling algorithm which minimizes the number of trajectories needed per optimization iteration. Together with employing stochastic gradient descent techniques, this reduces the complexity of optimizing many realistic open quantum systems to the complexity encountered with closed systems. Our optimizer harnesses automatic differentiation to provide flexibility in optimization and to suit the different constraints and diverse parameter regimes of real-life experiments. We utilize the optimizer in a variety of applications to demonstrate how the use of quantum trajectories significantly reduces the computation complexity while achieving a multitude of simultaneous optimization targets. Demonstrated targets include high state-transfer fidelities despite dissipation, faster gate times, and maximization of qubit-readout fidelity while maintaining the quantum nondemolition nature of the measurement and allowing for subsequent fast resonator reset.

arXiv:1901.05541•Physical Review A•May 20, 2019•86 citations

Analytic Filter-Function Derivatives for Quantum Optimal Control

Isabel Nha Minh Le, Julian D. Teske, Tobias Hangleiter +2 more

Autocorrelated noise appears in many solid-state qubit systems and hence needs to be taken into account when developing gate operations for quantum information processing. However, explicitly simulating this kind of noise is often less efficient than approximate methods. Here, we focus on the filter function formalism, which allows the computation of gate fidelities in the presence of autocorrelated classical noise. Hence, this formalism can be combined with optimal control algorithms to design control pulses, which optimally implement quantum gates. To enable the use of gradient-based algorithms with fast convergence, we present analytically derived filter function gradients with respect to control pulse amplitudes, and analyze the computational complexity of our results. When comparing pulse optimization using our derivatives to a gradient-free approach, we find that the gradient-based method is roughly 2 orders of magnitude faster for our test cases. We also provide a modular computational implementation compatible with quantum optimal control packages.

arXiv:2103.09126•Physical Review Applied•Feb 2, 2022•15 citations

Coherent control for quantum information processing

Gaurav Bhole

An exquisite control over the dynamics of a quantum system is essential for realizing any quantum technology. This thesis presents some practical and efficient strategies for coherent quantum control: a paradigm for controlling quantum dynamics using electromagnetic fields. Coherent control is a common framework for describing the physical implementation of quantum logic gates in several quantum information processing platforms including superconducting qubits and trapped ions. For the purpose of demonstration, however, liquid-state Nuclear Magnetic Resonance (NMR) is used in this thesis as it is an ideal test-bed for developing, testing and benchmarking coherent control tools and techniques. Coherent control was revitalised in 2005 by the development of Gradient Ascent Pulse Engineering (GRAPE), a powerful optimal control technique that is widely used for designing shaped pulses for a variety of tasks. GRAPE, like any other closed-loop optimal control algorithm, requires multiple evaluations of the computationally expensive matrix exponential and the full time-evolution propagator. To this end, I present strategies to sidestep the explicit evaluation of matrix exponentials, thereby offering substantial speed-ups over conventional implementations of the GRAPE algorithm. The results are demonstrated experimentally in NMR, but also in simulations of ultracold molecules and superconducting qubits. Beyond GRAPE, this thesis also considers methods for designing spin-echo sequences for implementing any arbitrary network of controlled-Z gates in a system of qubits with zz-couplings. First, a method based on linear-programming provides near time-optimal sequences in fully-coupled systems having up to a few hundred qubits. Further, an analytic method based on graph colouring finds near time-optimal spin echo sequences in engineered systems with any number of qubits having only nearest and next-nearest neighbour-couplings.

•Jan 1, 2020•0 citations
We develop a framework of "semi-automatic differentiation" that combines existing gradient-based methods of quantum optimal control with automatic differentiation. The approach allows to optimize practically any computable functional and is implemented in two open source Julia packages, GRAPE.jl and Krotov.jl , part of the QuantumControl.jl framework. Our method is based on formally rewriting the optimization functional in terms of propagated states, overlaps with target states, or quantum gates. An analytical application of the chain rule then allows to separate the time propagation and the evaluation of the functional when calculating the gradient. The former can be evaluated with great efficiency via a modified GRAPE scheme. The latter is evaluated with automatic differentiation, but with a profoundly reduced complexity compared to the time propagation. Thus, our approach eliminates the prohibitive memory and runtime overhead normally associated with automatic differentiation and facilitates further advancement in quantum control by enabling the direct optimization of non-analytic functionals for quantum information and quantum metrology, especially in open quantum systems. We illustrate and benchmark the use of semi-automatic differentiation for the optimization of perfectly entangling quantum gates on superconducting qubits coupled via a shared transmission line. This includes the first direct optimization of the non-analytic gate concurrence.
Abstract Gradient Ascent Pulse Engineering (GRAPE) is a popular technique in quantum optimal control, and can be combined with automatic differentiation (AD) to facilitate on-the-fly evaluation of cost-function gradients. We illustrate that the convenience of AD comes at a significant memory cost due to the cumulative storage of a large number of states and propagators. For quantum systems of increasing Hilbert space size, this imposes a significant bottleneck. We revisit the strategy of hard-coding gradients in a scheme that fully avoids propagator storage and significantly reduces memory requirements. Separately, we present improvements to numerical state propagation to enhance runtime performance. We benchmark runtime and memory usage and compare this approach to AD-based implementations, with a focus on pushing towards larger Hilbert space sizes. The results confirm that the AD-free approach facilitates the application of optimal control for large quantum systems which would otherwise be difficult to tackle.
Abstract In principle one can use Pontryagin's minimum principle to treat an optimal control problem and derive the gradient for the cost functional. However, for the driven spin-boson model studied here, the response of the system to the variation of the control is determined by the master equation and the equation of motion for the propagator of the coherent system dynamics. As a result, the application of Pontryagin's minimum principle is less straightforward. An alternative to this approach is the technique of automatic differentiation which in principle amounts to doing calculus on the fully discretized form of the optimal control problem. Automatic differentiation tools can be viewed as black boxes taking as input a program computing the cost functional and giving as output another program computing its gradient. First we derive for the polaron transformed Hamiltonian a Born-Markov master equation using the Bloch-Redfield formalism. By combining the latter with automatic differentiation we are able to implement Z -gate and coherent destruction of tunnelling with high fidelity. Optimization of a dissipative quantum gate poses a more complex numerical problem, since it should occur independent of the input state. To overcome this difficulty, we apply optimal control to the concept of resolvent of the master equation which is the generalisation of quantum unitary evolution operator in the case of dissipative dynamics.
The GRAPE...jl package (https://github.com/JuliaQuantumControl/GRAPE.jl) implements Gradient Ascent Pulse Engineering, a widely used method of quantum optimal control. Its purpose is to find controls that steer a quantum system in a particular way. This is a prerequisite for next-generation quantum technology, such as quantum computing or quantum sensing. GRAPE...jl exploits the unique strengths of the Julia programming language to achieve both flexibility and numerical performance. It builds on the QuantumControl...jl framework.
We present a gradient-based optimal-control technique for open quantum systems that utilizes quantum trajectories to simulate the quantum dynamics during optimization. Using trajectories allows for optimizing open systems with less computational cost than the regular density matrix approaches in most realistic optimization problems. We introduce an improved-sampling algorithm which minimizes the number of trajectories needed per optimization iteration. Together with employing stochastic gradient descent techniques, this reduces the complexity of optimizing many realistic open quantum systems to the complexity encountered with closed systems. Our optimizer harnesses automatic differentiation to provide flexibility in optimization and to suit the different constraints and diverse parameter regimes of real-life experiments. We utilize the optimizer in a variety of applications to demonstrate how the use of quantum trajectories significantly reduces the computation complexity while achieving a multitude of simultaneous optimization targets. Demonstrated targets include high state-transfer fidelities despite dissipation, faster gate times, and maximization of qubit-readout fidelity while maintaining the quantum nondemolition nature of the measurement and allowing for subsequent fast resonator reset.
Autocorrelated noise appears in many solid-state qubit systems and hence needs to be taken into account when developing gate operations for quantum information processing. However, explicitly simulating this kind of noise is often less efficient than approximate methods. Here, we focus on the filter function formalism, which allows the computation of gate fidelities in the presence of autocorrelated classical noise. Hence, this formalism can be combined with optimal control algorithms to design control pulses, which optimally implement quantum gates. To enable the use of gradient-based algorithms with fast convergence, we present analytically derived filter function gradients with respect to control pulse amplitudes, and analyze the computational complexity of our results. When comparing pulse optimization using our derivatives to a gradient-free approach, we find that the gradient-based method is roughly 2 orders of magnitude faster for our test cases. We also provide a modular computational implementation compatible with quantum optimal control packages.
An exquisite control over the dynamics of a quantum system is essential for realizing any quantum technology. This thesis presents some practical and efficient strategies for coherent quantum control: a paradigm for controlling quantum dynamics using electromagnetic fields. Coherent control is a common framework for describing the physical implementation of quantum logic gates in several quantum information processing platforms including superconducting qubits and trapped ions. For the purpose of demonstration, however, liquid-state Nuclear Magnetic Resonance (NMR) is used in this thesis as it is an ideal test-bed for developing, testing and benchmarking coherent control tools and techniques. Coherent control was revitalised in 2005 by the development of Gradient Ascent Pulse Engineering (GRAPE), a powerful optimal control technique that is widely used for designing shaped pulses for a variety of tasks. GRAPE, like any other closed-loop optimal control algorithm, requires multiple evaluations of the computationally expensive matrix exponential and the full time-evolution propagator. To this end, I present strategies to sidestep the explicit evaluation of matrix exponentials, thereby offering substantial speed-ups over conventional implementations of the GRAPE algorithm. The results are demonstrated experimentally in NMR, but also in simulations of ultracold molecules and superconducting qubits. Beyond GRAPE, this thesis also considers methods for designing spin-echo sequences for implementing any arbitrary network of controlled-Z gates in a system of qubits with zz-couplings. First, a method based on linear-programming provides near time-optimal sequences in fully-coupled systems having up to a few hundred qubits. Further, an analytic method based on graph colouring finds near time-optimal spin echo sequences in engineered systems with any number of qubits having only nearest and next-nearest neighbour-couplings.