qgrad_qutip.expect¶
-
qgrad_qutip.expect(oper, state)¶ Calculates the expectation value of an operator with respect to an input state.
Note
Input state, represented by the argumuent
statecan only be a density matrix or a ket.- Parameters
oper (
jnp.ndarray) – JAX numpy array representing an operatorstate (
jnp.ndarray) – JAX numpy array representing a density matrix or a ket
- Returns
Expectation value.
realif theoperis Hermitian,complexotherwise- Return type
float