QGeo: A Python package for calculating geodesic control functions for quantum computing

Sean T. Crowe, Joshua J. Leiter, John P. T. Stenger, Zachary L. Barvian, Joseph A. Diaz, Shoshana Krishel, Joanna N. Ptasinski, Daniel Gunlycke · 2025

Read QGeo: A Python package for calculating geodesic control functions for quantum computing by Sean T. Crowe, Joshua J. Leiter, John P. T. Stenger, Zachary L. Barvian, Joseph A. Diaz, Shoshana Krishel, Joanna N. Ptasinski, Daniel Gunlycke (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2504-16157.txt.

Introduction

Sean Crowe and seven co-authors release a Python package that scores how hard a quantum task is to set up, in a paper from 2025. The score rests on geometric quantum complexity, which treats the best path to a target change as a shortest route problem.

Their package, QGeo, works out the control functions for that best route by number methods. Test cases span a small Fourier transform circuit, a deep random circuit, and a chain of fermion sites. The authors walk through the method and the code, which is free to download from a public page.

Catalog record

CREATORSean T. Crowe, Joshua J. Leiter, John P. T. Stenger, Zachary L. Barvian, Joseph A. Diaz, Shoshana Krishel, Joanna N. Ptasinski, Daniel Gunlycke
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE42 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2504-16157

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

QGeo: A Python package for calculating geodesic control functions for quantum computing Sean T. Crowe, Joshua J. Leiter, John P. T. Stenger, Zachary L. Barvian, Joseph A. Diaz, Shoshana Krishel, Joanna N. Ptasinski, Daniel Gunlycke Abstract We present a new Python package that uses the established notion of geometric quantum complexity to numerically compute the difficulty associated with preparing a given unitary transformation on a quantum computer. The numerical procedure we implement is presented and discussed. Analyzed quantum circuits include: the quantum fourier transform for up to four qubits, a random circuit with depth 100, and a circuit for analyzing the evolution of a fermionic chain with several lattice sites. This package can be found for download at https://github.com/JAGDiaz/quantum-geodesics . I Introduction Quantum computers implement unitary transformations on quantum states. In practice, this is done by decomposing a target unitary transformation into a product of elementary unitary transformations called quantum gates such that the target unitary transformation can be expressed as U_{\rm T}=g_{N}...g_{1}. (1) Here the g_{i} ’s are elementary quantum gates. The specific set of elementary gates which are available will depend on the specific quantum computer being used. At the hardware level, the implementation of these gates is specialized 1 1 1 For example implementations of elementary gates on superconducting qubits see Krantz et al. 2019 , and most mainstream platforms for quantum computation usually have a relatively small set of elementary gates available. For example, the IBM quantum computer Torino can only implement tensor products of: the identity matrix, an X gate, an SX gate, an Rz gate, and a controlled-Z gate ibm . The number of gates required to implement a target unitary is called the gate complexity Brown and Susskind 2019 . Given an elementary gate set, a quantum processor, and a target unitary transformation, the problem of finding an implementation of the target unitary that minimizes the complexity is called the quantum circuit mapping problem, which is known to be difficult Wille and Burgholzer 2023 . An alternative measure of complexity of a unitary operator is the geodesic quantum complexity Nielsen et al. 2006 . In this approach, the difficulty is associated with preparing a given unitary matrix specified by a metric on the unitary group and then looking for curves of minimal length that connect the identity operator to the target unitary matrix. These minimal length curves are called geodesics and the length of the minimal geodesic is then a measure of complexity. Concretely, the evolution of the quantum state is generated by a Hamiltonian \hat{H}(t) . This implies a unitary evolution that is given by \hat{U}(t)=\mathcal{T}\mathrm{e}^{-i\int_{0}^{t}dt^{\prime}\hat{H}(t^{\prime})}, (2) \mathcal{T} is the time-ordering operator, which orders operators in descending time order such that operators evaluated at the latest times are on the left. In ( 53 ) it is shown that this is a solution to the Schrödinger equation. Onto ( 2 ) we impose the boundary conditions: \hat{U}(0)=\mathbb{1} and \hat{U}(T)=U_{\mathrm{T}} . This evolution defines a path, \gamma , in the unitary group, and the length of that path is specified by a phenomenologically motivated real-valued, symmetric, inner product defined by \langle\hat{H},\hat{J}\rangle=\frac{1}{2^{n}}\mathrm{tr}\left(\hat{H}\mathcal{G}\left(\hat{J}\right)\right), (3) where n is the number of qubits and the map \mathcal{G} is a super-operator defined in equation ( 6 ) that penalizes operations that have weight greater than two. This is meant to mimic actual lab conditions where the implementation of three or more qubit gates is difficult. The length of the path is given by ( 4 ). The length of the path that minimizes ( 4 ) is interpreted as the complexity of the target unitary. C[\gamma]=\int_{0}^{T}\langle\hat{H}(t),\hat{H}(t)\rangle^{1/2}dt (4) Paths on which this complexity is stationary are called geodesics. While geodesic paths may not be global minima of the complexity, the global minimum will correspond to a geodesic path. Since its inception, the notion of geodesic complexity has been applied in broad spectrum of areas which span quantum information to quantum gravity Brown and Susskind 2019 ; Chowdhury et al. 2024 ; Hackl and Myers 2018 ; Camargo et al. 2021 ; Chandra et al. 2021 ; Flory and Miekley 2019 ; Flory and Heller 2020a ; Flory and Heller 2020b . Part of the original motivation for formulating the notion of geodesic quantum complexity was to put lower bounds on the exact gate complexity, and an upper bound on the approximate gate complexity associated with preparing U . To our knowledge, however, it has not been applied to its original purpose of bounding gate complexities of operationally relevant unitary matrices. The purpose of this article it to apply the notion of geometric complexity to several examples, including the quantum Fourier transform. In Sec. II , the problem is defined more concretely and strategy for solving it is discussed. In Sec. III , analytic approximations to the problem are discussed. The numerical implementation of the strategy and specific calculations of geodesic complexities are then presented in Sec. IV . II Approach In this section, we discuss a numerical approach for calculating the quantum complexity of a given unitary operator. Essentially, our problem consists of calculating solutions of the Schrödinger-geodesic equation, which is a coupled set of ordinary differential equations which are discussed below. Our solutions are subject to the boundary conditions U(0)=\mathbb{1} , and U(T)=U_{\mathrm{T}} . This is a boundary value problem. A standard tool for numerically solving this kind of problem is shooting Press et al. 2007 . However, because the dimensionality of our problem is very high, shooting is no longer effective and other approaches must be used. We approach this problem as in Nielsen et al. 2006 . To keep this report self-contained we reproduce details of this method here. The Schrödinger-geodesic equation is derived by Dowling and Nielsen Nielsen et al. 2006 and is given by: \displaystyle\begin{split}\dot{U}\left(t\right)+\frac{i}{\hbar}H\left(t\right)U\left(t\right)&=0\\ \dot{H}+i\mathcal{F}\left(\left[H,\mathcal{G}\left(H\right)\right]\right)&=0,\\ \end{split} (5) Again, subject to the boundary conditions: U(0)=\mathbb{1} , and U(T)=U_{\mathrm{T}} . The solutions of this system of equations will be curves on SU\left(2^{n}\right) . Moreover, solving this system will give us the tangent vectors/Hamiltonian H that can then be used in ( 4 ) to calculate the complexity of this path. The super-operator \mathcal{G} , and its inverse super-operator \mathcal{F} are given in equation 6 . \displaystyle\mathcal{G}=\mathcal{P}+q\mathcal{Q} (6) \displaystyle\mathcal{F}=\mathcal{P}+q^{-1}\mathcal{Q} \mathcal{P} is the identity map on generators of one and two qubit operations and the zero map on generators of three and higher qubit operations. The map \mathcal{Q} is the zero map on one and two qubits, and the identity map on three and higher qubits. The parameter q is a factor which penalizes operations corresponding to more than two qubits. This is to mimic lab conditions. q=4^{n} is a regime of computational interest Nielsen et al. 2006 . We set the initial condition in equation 5 to be H_{0}=V_{0}^{i}\sigma_{i} , where V_{0}^{i} are real constants, and i\sigma_{i} is a basis for \mathfrak{su}\left(2^{n}\right) . The \sigma_{i} are constructed from taking n-1 Kronecker products of the Pauli matrices in \mathfrak{su}\left(2\right) . II.1 Solution Strategy Having stated the problem, we discuss the strategy for constructing a solution to the boundary value problem specified at ( 5 ). Given a solution to the problem for a given penalty factor, q , it is possible to construct the solution for, q+\Delta

Read the complete text