paraqeet.measurement.state_transfer_fidelity.StateTransferFidelity#

class paraqeet.measurement.state_transfer_fidelity.StateTransferFidelity(propagation, initial_state, target_state)#

Bases: NormalizableMeasurement, Differentiable

Fidelity 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)#
Parameters:

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)#

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

get_value_and_gradient(times)#

Compute function value and corresponding gradient.

Returns:

Tuple of function value and gradient of shape (n_parameters,).

Return type:

Tuple[Array, Array]

Parameters:

times (Array)

measure(times)#

Return measurement in the range [0, 1].

Parameters:

times (Array)

Return type:

Array | float