mpsprep.helpers.state_fidelity

mpsprep.helpers.state_fidelity(statevec_a, statevec_b)[source]

Given two statevectors, this function returns the fidelity between the two states.

Parameters
statevec_anp.ndarray

Statevector of the first state.

statevec_bnp.ndarray

Statevector of the second state.

Returns
fidelityfloat

State fidelity.