Skip to main content

matrix

Overloads

NameDescription
matrix(const Operator operator) -> ComplexMatrixConverts the operator to its matrix representation.
matrix(const Operator operator, as_complex | as_sparsematrix type_tag) -> ComplexSparseMatrixConverts the operator to its sparse matrix representation.
matrix(const Operator operator, as_real | as_sparsematrix type_tag) -> RealSparseMatrixConverts the operator to its sparse matrix representation.
matrix(const Operator operator, as_sparsematrix type_tag) -> ComplexSparseMatrixConverts the operator to its sparse matrix representation.
matrix(const Operator operator, as_complex | as_matrix type_tag) -> ComplexMatrixConverts the operator to its matrix representation.
matrix(const Operator operator, as_real type_tag) -> RealMatrixConverts the operator to its matrix representation.
matrix(const Operator matrix, as_real options) -> ObjectConstructs the matrix representation of the provided operator according to the specified options. If a specialized matrix construction method is found, returns the corresponding matrix, otherwise returns the result of calling to_matrix on the provided operator.
matrix(const Operator operator, as_complex type_tag) -> ComplexMatrixConverts the operator to its matrix representation.
matrix(const Operator matrix, as_complex options) -> ObjectConstructs the matrix representation of the provided operator according to the specified options. If a specialized matrix construction method is found, returns the corresponding matrix, otherwise returns the result of calling to_matrix on the provided operator.
matrix(const Operator operator, as_matrix type_tag) -> ComplexMatrixConverts the operator to its matrix representation.
matrix(const Operator operator, as_real | as_matrix type_tag) -> RealMatrixConverts the operator to its matrix representation.
matrix(const Operator operator, integer num_sites) -> ComplexMatrixConverts the operator to its matrix representation.
matrix(const Operator matrix, const StateInfo options) -> ObjectConstructs the matrix representation of the provided operator according to the specified options. If a specialized matrix construction method is found, returns the corresponding matrix, otherwise returns the result of calling to_matrix on the provided operator.
matrix(const Operator operator, integer num_sites, as_real type_tag) -> RealMatrixConverts the operator to its matrix representation.
matrix(const Operator operator, integer num_sites, as_complex type_tag) -> ComplexMatrixConverts the operator to its matrix representation.

matrix(const Operator operator) -> ComplexMatrix

Converts the operator to its matrix representation.

Parameters

  • operator: The operator to convert.

matrix(const Operator operator, as_complex | as_sparsematrix type_tag) -> ComplexSparseMatrix

Converts the operator to its sparse matrix representation.

Parameters

  • operator: The operator to convert.
  • type_tag: A global constant tagging the object type.

matrix(const Operator operator, as_real | as_sparsematrix type_tag) -> RealSparseMatrix

Converts the operator to its sparse matrix representation.

Parameters

  • operator: The operator to convert.
  • type_tag: A global constant tagging the object type.

matrix(const Operator operator, as_sparsematrix type_tag) -> ComplexSparseMatrix

Converts the operator to its sparse matrix representation.

Parameters

  • operator: The operator to convert.
  • type_tag: A global constant tagging the object type.

matrix(const Operator operator, as_complex | as_matrix type_tag) -> ComplexMatrix

Converts the operator to its matrix representation.

Parameters

  • operator: The operator to convert.
  • type_tag: A global constant tagging the object type.

matrix(const Operator operator, as_real type_tag) -> RealMatrix

Converts the operator to its matrix representation.

Parameters

  • operator: The operator to convert.
  • type_tag: A global constant tagging the object type.

matrix(const Operator matrix, as_real options) -> Object

Constructs the matrix representation of the provided operator according to the specified options. If a specialized matrix construction method is found, returns the corresponding matrix, otherwise returns the result of calling to_matrix on the provided operator.

Parameters

  • matrix: The input operator from which the matrix is built.
  • options: A set of options used to deduce the output matrix type.

matrix(const Operator operator, as_complex type_tag) -> ComplexMatrix

Converts the operator to its matrix representation.

Parameters

  • operator: The operator to convert.
  • type_tag: A global constant tagging the object type.

matrix(const Operator matrix, as_complex options) -> Object

Constructs the matrix representation of the provided operator according to the specified options. If a specialized matrix construction method is found, returns the corresponding matrix, otherwise returns the result of calling to_matrix on the provided operator.

Parameters

  • matrix: The input operator from which the matrix is built.
  • options: A set of options used to deduce the output matrix type.

matrix(const Operator operator, as_matrix type_tag) -> ComplexMatrix

Converts the operator to its matrix representation.

Parameters

  • operator: The operator to convert.
  • type_tag: A global constant tagging the object type.

matrix(const Operator operator, as_real | as_matrix type_tag) -> RealMatrix

Converts the operator to its matrix representation.

Parameters

  • operator: The operator to convert.
  • type_tag: A global constant tagging the object type.

matrix(const Operator operator, integer num_sites) -> ComplexMatrix

Converts the operator to its matrix representation.

Parameters

  • operator: The operator to convert.
  • num_sites: The number of sites.

matrix(const Operator matrix, const StateInfo options) -> Object

Constructs the matrix representation of the provided operator according to the specified options. If a specialized matrix construction method is found, returns the corresponding matrix, otherwise returns the result of calling to_matrix on the provided operator.

Parameters

  • matrix: The input operator from which the matrix is built.
  • options: A set of options used to deduce the output matrix type.

matrix(const Operator operator, integer num_sites, as_real type_tag) -> RealMatrix

Converts the operator to its matrix representation.

Parameters

  • operator: The operator to convert.
  • num_sites: The number of sites.
  • type_tag: A global constant tagging the object type.

matrix(const Operator operator, integer num_sites, as_complex type_tag) -> ComplexMatrix

Converts the operator to its matrix representation.

Parameters

  • operator: The operator to convert.
  • num_sites: The number of sites.
  • type_tag: A global constant tagging the object type.