Skip to main content

OperatorDiagonal<complex>

Class representing a spin-1/2 diagonal operator. The operator is parametrized with the diagonal elements and the site indices. The number of diagonal elements must be equal to 2n2^{n}, where nn is the number of sites the operator acts on.

Factories

operator_diagonal(const ComplexMatrix diagonal, const List<integer> sites) -> OperatorDiagonal<complex>

Returns a spin-1/2 diagonal operator with specified diagonal elements.

Parameters

  • diagonal: Vector containing the operator diagonal elements.
  • sites: Vector of site indices where the operator acts.

operator_diagonal(const List<complex> diagonal, const List<integer> sites) -> OperatorDiagonal<complex>

Returns a spin-1/2 diagonal operator with specified diagonal elements.

Parameters

  • diagonal: Vector containing the operator diagonal elements.
  • sites: Vector of site indices where the operator acts.

Symbols

NameDescription
=Assignment operator for the spin-1/2 OperatorDiagonal.