Difference between revisions of "Ensemble.m"

From Spinach Documentation Wiki
Jump to: navigation, search
(Sync syntax/arguments/outputs with current Spinach source)
(Restore pre-bulk-edit wiki content)
Line 1: Line 1:
 
{{DISPLAYTITLE:ensemble.m}} __NOTOC__
 
{{DISPLAYTITLE:ensemble.m}} __NOTOC__
−
 
 
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.
 
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==
 
==Syntax==
  
−
[traj_data,fidelity,gradient,hessian]=ensemble(waveform,spin_system)
+
    [fidelity,gradient,hessian]=ensemble(waveform,spin_system)
  
−
==Outputs==
+
==Parameters==
  
−
traj_data   - trajectory data for subsequent diagnostic plotting
+
   waveform  - control coefficients for each control operator, rad/s
  
−
  fidelity    - figure of merit for the overlap of the current state
+
==Outputs==
−
                  of the system and the desired state(s). When penalty
 
−
                  methods are specified, fidelity is returned as an ar-
 
−
                  ray separating the penalties from the simulation
 
−
                  fidelity.
 
  
−
   gradient     - gradient of the fidelity with respect to the control
+
  fidelity      - figure of merit for the overlap of the current state
−
                  sequence. When penalty methods are specified, gradi-
+
                  of the system and the desired state(s). When penalty
−
                  ent is returned as an array separating penalty gra-
+
                  methods are specified, fidelity is returned as an ar-
−
                  dients from the fidelity gradient.
+
                  ray separating the penalties from the simulation
−
 
+
                  fidelity.
−
   hessian     - Hessian of the fidelity with respect to the control
+
−
                  sequence. When penalty methods are specified, gradi-
+
   gradient     - gradient of the fidelity with respect to the control  
−
                  ent is returned as an array separating penalty Hes-
+
                  sequence. When penalty methods are specified, gradi-
−
                  sians from the fidelity Hessian.
+
                  ent is returned as an array separating penalty gra-
−
 
+
                  dients from the fidelity gradient.
−
david.goodwin@inano.au.dk
+
−
ilya.kuprov@weizmann.ac.il
+
   hessian       - Hessian of the fidelity with respect to the control  
−
m.keitel@soton.ac.uk
+
                  sequence. When penalty methods are specified, gradi-
 +
                  ent is returned as an array separating penalty Hes-
 +
                  sians from the fidelity Hessian.
  
 
==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.
 
  
 
==See also==
 
==See also==
−
 
 
[[Optimal control module]]
 
[[Optimal control module]]
  
  
 
''Version 2.0, authors: [[Ilya Kuprov]], [[David Goodwin]]''
 
''Version 2.0, authors: [[Ilya Kuprov]], [[David Goodwin]]''
−
 
−
==Parameters==
 
−
 
−
waveform  - control coefficients for each control operator, rad/s
 

Revision as of 15:48, 5 April 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

    [fidelity,gradient,hessian]=ensemble(waveform,spin_system)

Parameters

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

Outputs

  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 ar-
                  ray separating the penalties from the simulation
                  fidelity.

  gradient      - gradient of the fidelity with respect to the control 
                  sequence. When penalty methods are specified, gradi-
                  ent is returned as an array separating penalty gra-
                  dients from the fidelity gradient.

  hessian       - Hessian of the fidelity with respect to the control 
                  sequence. When penalty methods are specified, gradi-
                  ent is returned as an array separating penalty Hes-
                  sians 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