Difference between revisions of "Ensemble.m"

From Spinach Documentation Wiki
Jump to: navigation, search
m (Update function page arguments and outputs from current Spinach source)
m (Add missing leading spaces to function header blocks)
Line 10: Line 10:
 
==Arguments==
 
==Arguments==
  
−
waveform - control coefficients for each control operator, rad/s
+
waveform - control coefficients for each control operator, rad/s
  
 
==Parameters==
 
==Parameters==
Line 19: Line 19:
  
  
−
traj_data - trajectory data for subsequent diagnostic plotting
+
traj_data - trajectory data for subsequent diagnostic plotting
  
−
fidelity  - figure of merit for the overlap of the current state of the
+
fidelity  - figure of merit for the overlap of the current state of the
 
             system and the desired state(s). When penalty methods are
 
             system and the desired state(s). When penalty methods are
 
             specified, fidelity is returned as an array separating the
 
             specified, fidelity is returned as an array separating the
 
             penalties from the simulation fidelity
 
             penalties from the simulation fidelity
  
−
gradient  - gradient of the fidelity with respect to the control sequence.
+
gradient  - gradient of the fidelity with respect to the control sequence.
 
             When penalty methods are specified, gradient is returned as an
 
             When penalty methods are specified, gradient is returned as an
 
             array separating penalty gradients from the fidelity gradient
 
             array separating penalty gradients from the fidelity gradient
  
−
hessian  - Hessian of the fidelity with respect to the control sequence.
+
hessian  - Hessian of the fidelity with respect to the control sequence.
 
             When penalty methods are specified, hessian is returned as an
 
             When penalty methods are specified, hessian is returned as an
 
             array separating penalty Hessians from the fidelity Hessian
 
             array separating penalty Hessians from the fidelity Hessian

Revision as of 16:47, 5 June 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)


Arguments

waveform - control coefficients for each control operator, rad/s

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.

See also

Optimal control module

Version 2.0, authors: Ilya Kuprov, David Goodwin