Skip to main content

OperatorSparse<real>

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

Factories

operator_sparse(const RealSparseMatrix matrix, integer site) -> OperatorSparse<real>

Returns a spin-1/2 OperatorSparse parametrized by the given matrix.

Parameters

  • matrix: The matrix parametrizing the operator.
  • site: The site index where the operator acts.

operator_sparse(const RealSparseMatrix matrix, const List<integer> sites) -> OperatorSparse<real>

Returns a spin-1/2 OperatorSparse parametrized by the given matrix.

Parameters

  • matrix: The matrix parametrizing the operator.
  • sites: Vector of site indices where the operator acts.

Symbols

NameDescription
=Assignment operator for spin-1/2 OperatorSparse.