qutip_qoc.result module

This module contains the Result class for storing and reporting the results of a full pulse control optimization run.

class qutip_qoc.result.Result(objectives=None, time_interval=None, start_local_time=None, end_local_time=None, total_seconds=None, n_iters=None, iter_seconds=None, message=None, guess_controls=None, optimized_controls=None, optimized_H=None, final_states=None, guess_params=None, new_params=None, optimized_params=None, infidelity=inf, var_time=False, qtrl_optimizers=None)[source]

Bases: object

Class for storing the results of a pulse control optimization run.

Attributes:
objectiveslist of qutip_qoc.Objective

List of objectives to be optimized.

time_intervalqutip_qoc._TimeInterval

Time interval for the optimization.

start_local_timestruct_time

Time when the optimization started.

end_local_timestruct_time

Time when the optimization ended.

total_secondsfloat

Total time in seconds the optimization took.

itersint

Number of iterations until convergence. Equal to the length of iter_seconds.

iter_secondslist of float

Seconds between each iteration.

messagestr

Reason for termination.

optimized_paramslist of ndarray

Parameter values after optimization.

guess_controlslist of ndarray

Control pulses before the optimization.

optimized_controlslist of ndarray

Control pulses after optimization.

optimized_Hlist of qutip.QobjEvo

Optimized Hamiltonians with optimized controls.

final_stateslist of qutip.Qobj

Evolved system states after optimization.

infidelityfloat

Final infidelity error after the optimization.

var_timebool

Whether the optimization was performed with variable time. If True, the last parameter in optimized_params is the evolution time.

_update(infidelity, parameters)[source]

Used to update the result during optimization.

dump(filename)[source]

Save the result to a file.

property evo_full_final

Deprecated, use final_states[0] instead.

property fid_err

Deprecated, use infidelity instead.

property final_states

Evolved system states after optimization.

property grad_norm_final

Deprecated, not supported.

property guess_controls

Control pulses before the optimization.

classmethod load(filename, objectives=None)[source]

Load a objective from a file.

property num_iter

Deprecated, use n_iters instead.

property optimized_H

Optimized Hamiltonians with optimized controls.

property optimized_controls

Control pulses after optimization.

property optimized_params

Parameter values after optimization.

property termination_reason

Deprecated, use message instead.

property total_seconds

Total time in seconds the optimization took.

property wall_time

Deprecated, use total_seconds instead.