Difference between revisions of "Ensemble.m"
(Update function See also links and function index membership) |
(sync with Spinach main f053e432: parallel pool case distribution note added; duplicate Parameters section merged) |
||
| Line 7: | Line 7: | ||
[traj_data,fidelity,gradient,hessian]=ensemble(waveform,spin_system) | [traj_data,fidelity,gradient,hessian]=ensemble(waveform,spin_system) | ||
| − | |||
| − | |||
| − | |||
| − | |||
==Parameters== | ==Parameters== | ||
| Line 36: | Line 32: | ||
==Notes== | ==Notes== | ||
This is a low level function that is not designed to be called directly. Use [[grape_xy.m]] and [[grape_phase.m]] instead. | This is a low level function that is not designed to be called directly. Use [[grape_xy.m]] and [[grape_phase.m]] instead. | ||
| + | |||
| + | The ensemble cases enumerated in spin_system.control.catalog are distributed over the parallel pool workers. Each case fetches the frozen problem data from the pool constant published by [[optimcon.m]] and grafts the live client-side control structure on top of it, so only the waveform and the live control fields travel at each objective evaluation. | ||
==See also== | ==See also== | ||
Revision as of 06:42, 30 August 2026
A parallel wrapper around GRAPE that enables ensemble optimal control optimisations. This function handles systems with multiple control power levels, multiple resonance offsets, multistate transfers, and ensembles of drift Liouvillians.
Syntax
[traj_data,fidelity,gradient,hessian]=ensemble(waveform,spin_system)
Parameters
waveform - control coefficients for each control operator, rad/s
Outputs
traj_data - trajectory data for subsequent diagnostic plotting
fidelity - figure of merit for the overlap of the current state of the
system and the desired state(s). When penalty methods are
specified, fidelity is returned as an array separating the
penalties from the simulation fidelity
gradient - gradient of the fidelity with respect to the control sequence.
When penalty methods are specified, gradient is returned as an
array separating penalty gradients from the fidelity gradient
hessian - Hessian of the fidelity with respect to the control sequence.
When penalty methods are specified, hessian is returned as an
array separating penalty Hessians from the fidelity Hessian
Notes
This is a low level function that is not designed to be called directly. Use grape_xy.m and grape_phase.m instead.
The ensemble cases enumerated in spin_system.control.catalog are distributed over the parallel pool workers. Each case fetches the frozen problem data from the pool constant published by optimcon.m and grafts the live client-side control structure on top of it, so only the waveform and the live control fields travel at each objective evaluation.
See also
grape_xy.m, grape_phase.m, alpha_conds.m, aux_mat.m, bfgs.m, cubic_interp.m, dirdiff.m, drifts.m, hess_reorder.m, objeval.m, optimcon.m, trapdiff.m, Optimal control module
Version 2.0, authors: Ilya Kuprov, David Goodwin