paraqeet.propagation.scipy_expm_grape.ScipyExpmGRAPE#
- class paraqeet.propagation.scipy_expm_grape.ScipyExpmGRAPE(model, resolution)#
Bases:
ScipyExpm,DifferentiablePropagationSolve EOMs by piecewise exponentiation via Scipy using GRAPE.
Compute the gradients of a closed quantum system for PWC pulses by using GRAPE. Here, we use forward propagation of the initial state and backward propagation of the target state to compute the gradients.
The state propagations are done by the ScipyExpm method.
- _res: float
Simulation resolution.
- _initial_state: Array = None
Initial state for forward propagation.
- _target_state: Array = None
Target state for backward propagation.
- _schirmer_derivative: bool = False
If true, compute the gradient by Schirmer Derivative/Method of auxiliary matrix exponential. If false, use frechet derivative.
- Parameters:
model (EquationOfMotion)
resolution (float)
- __init__(model, resolution)#
- Parameters:
model (EquationOfMotion)
resolution (float)
Methods
__init__(model, resolution)Per default, propagation methods have no parameters to optimize.
get_value_and_gradient(times)Compute gradients using GRAPE.
propagate(time)Loop over all desired times in time at set resolution.
set_initial_state(state)Set initial state.
set_target_state(target_state)Set target state for backward propagation.
Attributes
Return if the propagation is for open or closed system.
Return the propagation resolution.
Returns whether the Schirmer method is used to compute the derivative of the unitary operator.
- get_parameters()#
Per default, propagation methods have no parameters to optimize.
- get_value_and_gradient(times)#
Compute gradients using GRAPE.
Compute the forward propagation of the initial state and the backward propagation of the target state.
Psis represent the forward propagation and lamdas represent the backward propagation states.
This propagation method assumes a PWC pulse as input.
- Parameters:
times (Array)
- Return type:
tuple[Array, Array]
- property is_open: bool#
Return if the propagation is for open or closed system.
- propagate(time)#
Loop over all desired times in time at set resolution.
- Parameters:
time (Array)
- Return type:
Array
- property resolution: float#
Return the propagation resolution.
- set_initial_state(state)#
Set initial state.
- set_target_state(target_state)#
Set target state for backward propagation.
- Parameters:
target_state (Array) – Target state.
- Return type:
None
- property use_schirmer_derivative: bool#
Returns whether the Schirmer method is used to compute the derivative of the unitary operator.