Skip to main content

matrix_element

Method of ComplexMPS.

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

Compute the matrix element ⟨bra∣O^∣ket⟩\langle \text{bra} | \hat{O} | \text{ket} \rangle of a quantum operator between two Matrix Product State (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.