Analytical exact gradients for single spin pulse sequence optimizations
Stella Slad, Burkhard Luy · 2025
Read Analytical exact gradients for single spin pulse sequence optimizations by Stella Slad, Burkhard Luy (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-2507-13557.txt.
Introduction
Designing magnetic resonance pulses on a computer needs exact gradients. A 2025 paper by Stella Slad and Burkhard Luy derives them in closed form for the single-spin case. Optimizers adjust a cost score and follow its slope with respect to each control, and rough slope estimates slow that search.
Most pulse design today uses a single spin one-half. That spin can be written with simple rotation matrices or quaternion numbers. The authors use that structure to give exact slope formulas for two design types. One type moves a spin from one set state to another. The other rotates any state by a set amount. The formulas cover standard side pulses and controls along the field axis as well.
Catalog record
| CREATOR | Stella Slad, Burkhard Luy |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 66 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2507-13557
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
Analytical exact gradients for single spin pulse sequence optimizations Stella Slad, Burkhard Luy Abstract The efficient computer optimization of magnetic resonance pulses and pulse sequences involves the calculation of a problem-adapted cost function as well as its gradients with respect to all controls applied. The gradients generally can be calculated as a finite difference approximation, as a GRAPE approximation, or as an exact function, e.g. by the use of the augmented matrix exponentiation, where the exact gradient should lead to best optimization convergence. However, calculation of exact gradients is computationally expensive and analytical exact solutions to the problem would be highly desirable. As the majority of todays pulse optimizations involve a single spin 1/2, which can be represented by simple rotation matrices in the Bloch space or by their corresponding Cayley-Klein/quaternion parameters, the derivations of analytical exact gradient functions appear to be feasible. Taking two optimization types, the optimization of point-to-point pulses using 3D-rotations and the optimization of universal rotation pulses using quaternions, analytical solutions for gradients with respect to controls have been derived. Controls in this case can be conventional x x and y y pulses, but also z z -controls, as well as gradients with respect to amplitude and phase of a pulse shape. In addition, analytical solutions with respect to pseudo controls, involving holonomic constraints to maximum rf-amplitudes, maximum rf-power, or maximum rf-energy, are introduced. Using the hyperbolic tangent function, maximum values are imposed in a fully continuous and differentiable way. The obtained analytical gradients allow the calculation two orders of magnitude faster than the augmented matrix exponential approach. The exact gradients for different controls are finally compared in a number of optimizations involving broadband pulses for 15 N, 13 C, and 19 F applications. Institute for Biological Interfaces 4 – Magnetic Resonance, Karlsruhe Institute of Technology (KIT), Hermann-von-Helmholtz-Platz 1, 76344 Eggenstein-Leopoldshafen, Germany; Institute of Organic Chemistry, Karlsruhe Institute of Technology (KIT), Fritz-Haber-Weg 6, 76131 Karlsruhe, Germany 1 Introduction Computer optimization of pulses and pulse sequence building blocks has a long standing history in the NMR community. Starting out with composite pulses [ 1 , 2 , 3 , 4 ] , shaped pulses [ 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 ] , heteronuclear decoupling [ 14 , 15 ] and Hartmann-Hahn-transfer building blocks [ 16 , 17 ] , the success of todays liquid state NMR spectroscopy is largely built on these elements. With the advent of optimal control based algorithms [ 18 , 19 , 20 ] and in particular with the GRAPE algorithm [ 21 , 22 , 23 ] , possibilities in pulse design increased dramatically in the past two decades and examples in pulse shape design [ 24 , 25 , 26 , 27 , 28 , 29 , 30 , 31 , 32 , 33 , 34 , 35 , 36 , 36 , 37 , 38 , 39 , 40 , 41 , 42 ] show utmost performance close to the physical limits [ 43 , 44 , 45 , 46 ] . However, even larger bandwidths and/or lower rf-energies will have to be explored as well as extremely complex optimizations like whole heternuclear decoupling periods [ 47 , 48 ] , that easily lead to very long optimization times lasting weeks to months on highly parallelized supercomputers. It is therefore worth looking into the basic mathematics to look for analytical solutions of spin system treatment wherever possible to significantly speed up corresponding calculations. The majority of current pulse and pulse sequence optimizations are performed using a single spin in Liouville superoperator [ 49 ] or Bloch space [ 50 , 51 ] . This description is perfectly suited for optimizing the transfer from an intial to a final state, as e.g. the case for so-called point-to-point pulses [ 43 , 23 , 44 ] . Other optimizations, like having a defined propagator in universal rotation pulses [ 22 , 45 ] as a target, are better described using either Cayley-Klein parameters [ 52 ] or the related quaternion formalism [ 53 , 54 ] . In each type of optimization, a Hamiltonian needs to be diagonalized, which can be done by numerical exponentiation using for example the Padé algorithm, or by analytical formulae, which are particularly straightforward in the case of a single spin in Bloch space, where this is resembled by well-studied three dimensional Cartesian rotation matrices. In addition, partial derivatives to all controls need to be calculated in gradient and hessian based optimization algorithms. This can be achieved by a linear approximation as in the original GRAPE formalism [ 22 , 23 ] , but exact gradients are more efficient for the convergence of optimizations [ 21 , 55 ] . Such exact gradients can be calculated using a general approach described by Ernst [ 56 , 57 ] , or by a recent development in algebra based on the matrix exponentiation of co-propagators [ 58 , 59 ] . For a single spin, however, analytical solutions with respect to conventional controls were recently introduced with the ESCALADE approach [ 60 ] and it was shown that very fast optimizations are possible based on a mixture of exact analytical gradients and numerical hessian calculations [ 61 ] . The goal of computational optimization in NMR spectroscopy must be to be able to address more and more complex problems. In this publication we focus on the improvement of extremely complex optimizations that can be performed with single spin calculations. One goal is, for example, to achieve broadband pulses that can cover bandwidths 20 to 100 times the applied maximum rf-amplitude to address the full chemical shift bandwidths of e.g. 15 N, 19 F, 31 P, 119 Sn, or 195 Pt. In such cases, computational demands rise non-linearly and while short pulse shapes can be optimized in a matter of seconds to minutes on a conventional PC, the desired demanding pulses may take months on high level supercomputers or are not at all feasible with current technology due to limitations in memory. This memory issue is particularly pressing in the case of hessian-based optimization algorithms. If, for example, a 10 ms pulse with 0.1 \mu s digitization is considered, 100.000 digits result in 200.000 controls (x and y component), which in turn lead to a 200.000 \times 200.000 hessian matrix with double precision numbers, which corresponds to 320 GB memory for the calculation of a single condition hessian in an optimization. As our aim is at this type of optimization complexity, we do not consider second derivative hessian matrices in the following and reduce our view to exact gradients only, which can be calculated much more memory efficient and are readily combined with e.g. the LBFGS optimization algorithm. In this context, we here derive analytical derivatives in the Bloch picture based on rotational matrices, as well as for four-dimensional quaternions for propagator-based optimizations in a tabular form. It is thereby closely related to the ESCALADE approach, for which a very nice abstract way of gradient and hessian calculations based on the Rodrigues expansion has been developed [ 60 ] . In the present approach, however, we use a