Difference between revisions of "Optimcon.m"
(→See also) |
|||
| Line 43: | Line 43: | ||
==See also== | ==See also== | ||
| − | [[ | + | [[Optimal control module]] |
''Version 2.4, authors: [[Ilya Kuprov]], [[David Goodwin]]'' | ''Version 2.4, authors: [[Ilya Kuprov]], [[David Goodwin]]'' | ||
Revision as of 13:50, 17 May 2025
Updates the spin_system object with optimal control information.
Syntax
spin_system=optimcon(spin_system,control)
Arguments
spin_system - primary Spinach data structure, created by create.m and updated by basis.m functions control - control data structure described in detail in the online manual
Outputs
spin_system - updated Spinach data structure
Examples
See the examples given in examples/optimal_control directory. A fairly typical control parameter structure appears below.
% Define control parameters
control.drifts={{H}}; % Drift
control.operators={LxH,LyH,LxC,LyC,LxF,LyF}; % Controls
control.rho_init={rho_init}; % Starting state
control.rho_targ={rho_targ}; % Destination state
control.pwr_levels=2*pi*1e3; % Pulse power
control.pulse_dur=10e-3; % Pulse duration
control.pulse_nsteps=50; % Time points
control.penalties={'SNS'}; % Penalty
control.p_weights=100; % Penalty weight
control.method='newton'; % Optimisation method
control.tol_g=1e-5; % Termination tolerance
control.freeze=zeros(6,50); % Freeze mask
% Plots during optimisation
control.plotting={'correlation_order','local_each_spin','xy_controls'};
Notes
The plotting should be switched off for large production calculations - optimal control diagnostic plots are computationally expensive.
See also
Version 2.4, authors: Ilya Kuprov, David Goodwin