Skip to main content

matrix_element

Method of ComplexMPS.

matrix_element(const ComplexMPO operator, const ComplexMPS ket) -> complex

Compute the matrix element braO^ket\langle \text{bra} | \hat{O} | \text{ket} \rangle of a quantum operator between two MPS states with Complex values.

Parameters

  • operator: The matrix product operator (MPO) representing the quantum operator.
  • ket: The right (ket) MPS state.

Returns

The matrix element as a scalar value.