paraqeet.propagation.vern7_grape.Vern7GRAPE#
- class paraqeet.propagation.vern7_grape.Vern7GRAPE(model, resolution)[source]#
Bases:
Vern7,DifferentiablePropagationSolve EOMs by 7th order ODE method to compute gradients using GRAPE.
Compute the gradients of a 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 Vern7 ODE method.
- _resolution: float
Simulation resolution.
- _initial_state: Array = None
Initial state for forward propagation.
- _target_state: Array = None
Target state for backward propagation.
- Parameters:
model (EquationOfMotion)
resolution (float)
- __init__(model, resolution)[source]#
- Parameters:
model (Model) – Model
res (float) – Resolution at which to sample the EOM
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)Return the solution of the equation of motion for open/closed system using vern7 ODE solver.
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.
- get_value_and_gradient(times)[source]#
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.
Note: This method only computes the first order gradients right now.
- Parameters:
times (Array)
- Return type:
tuple[Array, Array]
- property is_open: bool#
Return if the propagation is for open or closed system.
- propagate(time)[source]#
Return the solution of the equation of motion for open/closed system using vern7 ODE solver.
Loop over all desired times in time at set resolution.
- Parameters:
time (Array) – Any one-dimensional vector of timestamps.
- Returns:
Returns the solution of the equations of motion.
- Return type:
Array
- Raises:
ConfigurationException – If the initial state is not set.
- property resolution: float#
Return the propagation resolution.