paraqeet.measurement.state_transfer_fidelity.StateTransferFidelity#
- class paraqeet.measurement.state_transfer_fidelity.StateTransferFidelity(propagation, initial_state, target_state)[source]#
Bases:
NormalizableMeasurement,DifferentiableFidelity measure that compares overlap of the initial and final state.
- Parameters:
propagation (DifferentiablePropagation) – Abstract base class for any implementation that can solve the equation of motion.
initial_state (Array) – Initial state.
target_state (Array) – Target state.
times (Array) – One-dimensional vector of timestamps.
- __init__(propagation, initial_state, target_state)[source]#
- Parameters:
propagation (DifferentiablePropagation)
initial_state (Array)
target_state (Array)
Methods
__init__(propagation, initial_state, ...)calculate_normalized_scalar(times)Measure overlap between initial and target state.
get_value_and_gradient(times)Compute function value and corresponding gradient.
measure(times)Return measurement in the range [0, 1].
- calculate_normalized_scalar(times)[source]#
Measure overlap between initial and target state. To be used with an optimizer.
- Parameters:
times (Array) – One-dimensional vector of timestamps.
- Returns:
Overlap between initial and target state in a bare float.
- Return type:
float