In the quantum-control post, we asked how to steer a quantum system along a desired path. For sensing, the aim changes: make a small change in an unknown quantity leave a measurable trace. The control pulses become part of the measurement design.
Scientific machine learning offers a way to search for those pulses. A physics-informed neural network (PINN) represents time-dependent controls and adjusts them using the equations of the sensor and a measure of its sensitivity. We will start with a single spin to establish what a useful signal looks like, then follow the PINN from its inputs and outputs through training to the evaluation of a learned protocol.
A spin as a magnetic-field sensor
Consider a spin one-half in a static magnetic field . Prepare an equal superposition of its two energy states. During an interrogation time , their relative phase changes at a rate set by the field and the known gyromagnetic ratio .
A Ramsey readout converts that phase into a binary outcome. Choose its reference phase using an initial field estimate . With contrast , the probability of the positive outcome is
Here is the phase offset from that reference. One outcome cannot determine the field; repeated preparations and measurements estimate the probability. Near zero offset, nearby fields produce different probabilities. The estimate must already locate the relevant fringe, because the response is periodic.
How much information does the state carry?
Quantum Fisher information (QFI) measures the local distinguishability of states with nearby parameter values. It equals the largest classical Fisher information available over possible measurements. For independent repetitions, the quantum Cramér–Rao bound gives
The uncertainty is the standard deviation of a locally unbiased field estimator. Four times the QFI halves this lower bound at the same repetition count. Reaching it also requires a suitable measurement and estimator; a large QFI alone does not establish an achieved precision. Pang and Jordan explain this connection between information, controls and measurement.
What noise takes away
In this example, dephasing reduces the spin’s coherence and hence the contrast. At fixed interrogation time, assume that contrast is independent of the field. The resulting QFI is
At zero offset, the chosen readout attains the QFI locally. Reducing the contrast to 0.6 leaves 36% of the ideal information and makes the uncertainty bound about 67% larger. The flatter response carries less information despite having the same outcome noise at that point. Increasing interrogation time helps only while enough coherence survives.
From the example to a control problem
The Ramsey example has a known solution. It gives us a useful test for a control method: at fixed resources, does the protocol make nearby fields easier to distinguish? A pulse that preserves a desired state is useful only if that state also carries information about the quantity being measured.
With interacting spins and time-dependent driving, choosing a pulse becomes harder. Changing one part of the evolution affects the state that enters every later part. We must select the available control operators, their strengths over time and the timing of the drive. A PINN provides a smooth, trainable representation of these functions. Its weights specify a candidate protocol that can be evaluated at any time within the interrogation interval.
The network runs on a classical computer. In the construction discussed here, it designs the evolution before measurement; the field estimate is obtained later from measurement outcomes. This distinction defines the learning task: optimize a physical experiment using a model of its dynamics.
What the PINN learns
The adiabatic gauge potential specifies the operator used for a counterdiabatic correction. We can expand it in fixed Hermitian operators. For spins, these can be products of Pauli matrices acting on selected spins:
Here the operators define the allowed terms, and the real coefficients determine their strengths. Real coefficients make Hermitian by construction. Choosing a smaller operator set restricts what the network can express; this is also where one can exclude interactions that a device cannot implement.
For counterdiabatic control, the network can learn these coefficients together with the schedule . The added Hamiltonian is
The schedule sets how the drive progresses, and its time derivative scales the added control. Learning both parts allows the network to choose the operator and when to apply it strongly. Time , or its normalized form, is the input. The outputs are control functions, not labels for individual measurement outcomes.
Constraints can also enter through the output construction. A schedule can start and end at prescribed values, with a correction that vanishes at both endpoints. Such a construction satisfies those boundary conditions throughout training. Pulse amplitude, bandwidth and the available interactions need their own constraints when preparing a protocol for a particular device.
How physics guides training
In a supervised pulse-design task, one could train against a library of known good controls. Physics-informed training instead evaluates candidate controls through the physical model. The model supplies the evolution law; the loss measures how well the candidate satisfies the chosen physical conditions and sensing objective. No library of optimal pulses is required for this formulation, although the Hamiltonian and its calibrated parameters must be specified.
The sensing objective matters. Making an equation residual small and maximizing information are different requirements. A control may approximately satisfy an operator equation while sending the probe through a trajectory with poor parameter sensitivity. Conversely, an apparently high information score needs to be checked against the accuracy of the simulated dynamics.
Our QFI preprint combines an Euler–Lagrange residual with terminal QFI, relative-phase and population-balance objectives, plus a non-commutativity regularizer. The network learns operator coefficients and a schedule; the state is propagated numerically. The study covers up to six qubits, with a restricted operator basis for the largest system.
These ingredients answer different questions. The operator residual measures departure from the variational control condition. QFI evaluates sensitivity to the unknown parameter. Phase and population terms guide the probe toward the intended coherent superposition. A penalty on non-commutativity limits an aspect of the dynamics that complicates approximate propagation; it does not replace a convergence check or impose every hardware constraint.
The weights in a combined loss set a trade-off. They should be assessed through the separate physical and sensing metrics, because the same total loss can hide different errors. Some conditions, such as Hermiticity in the representation above, are exact by construction. Conditions imposed through finite penalties remain approximate and must be checked after training.
Inside the training loop
The computation can be followed as a sequence:
- Evaluate the PINN at sampled times to obtain the operator coefficients and the schedule. Construct the control Hamiltonian from those outputs.
- Propagate the specified probe state through the controlled dynamics. Time ordering matters when Hamiltonians at different times do not commute.
- Evaluate the physical residuals and the final sensing quantities. Parameter sensitivity compares nearby values of the unknown field under the same applied control.
- Differentiate the training loss with respect to the network weights and update them. Repeat until the selected convergence criteria are met.
Differentiation has two distinct roles here. Sensitivity to the field determines the QFI. Gradients with respect to the network weights determine how training changes the protocol. When estimating field sensitivity, we hold the trained pulse fixed: allowing it to change with the true unknown field would give the controller information that the experiment does not possess.
This structure also explains why simulation remains central. A network can exploit errors in an approximate propagator if those errors improve its loss. Repeating the propagation on a finer grid and with an independent solver tests whether the learned pulse retains its performance. The final deliverable is a control function together with that evaluation, rather than a training-loss curve alone.
What the numerical experiments show
The preprint reports gains over Euler–Lagrange-only references; learning the schedule helps in most studied cases. These are closed-system simulations. The dephased Ramsey example above illustrates a separate noise mechanism and is not a trained result from that study.
To interpret a learning experiment, we need to know which freedom produced the gain. A useful comparison fixes the operator set and tests a prescribed schedule against a learned one. A second comparison tests what changes when the sensing terms are added to the physical residual. Keeping the time budget and evaluation procedure fixed makes each comparison informative. Conventional pulse optimization with the same controls is also a relevant reference for assessing the value of the neural representation.
Using learned controls in a sensing experiment
After training, freeze the control functions and evaluate the intended measurement. For the introductory spin example, this means calculating the Ramsey probabilities and checking their response to nearby fields. For an interacting probe, it means specifying a feasible readout and computing its classical Fisher information. This tests how much of the state’s QFI the chosen apparatus can access.
Then generate or collect repeated measurement outcomes and estimate the field. Compare estimator bias and variance at the same interrogation time and repetition count, including preparation and readout costs. If the control depends on a preliminary field estimate, that calibration step is part of the protocol. Robustness over a range of plausible estimates must be tested explicitly; a network trained at one nominal setting is not automatically reliable elsewhere.
The contrast loss in our first example suggests a further design question: can the network learn useful controls when dephasing acts during the interrogation? That requires an appropriate open-system evolution model, a mixed-state information calculation and a noise-aware objective. It is a separate learning experiment, with its own baseline and validation. Deep learning methodologies provide a flexible representation for these control searches. The resulting precision must still be established from the measurements.
The PINN’s role is therefore concrete: represent a constrained family of control functions, use physics and sensing objectives to select a protocol, and provide functions that can be tested independently. That is the connection between scientific machine learning and the design of a quantum sensor.