Skip to content

Functional Matrices

Hernán Indíbil de la Cruz Calvo edited this page May 22, 2022 · 3 revisions

The class Funmatrix encapsulates a C Data Type from Doki that represents a matrix. Functional Matrices can be accessed like a numpy array ([row,column] notation).

Operators

Both A and B are functional matrices, while s is a scalar.

  • A + B, matrix addition
  • A - B, matrix substraction
  • A * B, entity-wise product
  • A * s or s * A, scalar product
  • A / s, division by scalar
  • A @ B, matrix product
  • A ^ B, kronecker product

Attributes

  • shape: Read-only. Tuple (number of rows, number of columns)

Methods

  • Funmatrix transpose()
    • return -> A new functional matrix, the transpose of the original
  • Funmatrix dagger()
    • return -> A new functional matrix, the conjugate transpose (hermitian transpose) of the original
  • Complex trace()
    • return -> sum of the elements of the main diagonal of the matrix. Only works with square matrices
  • Funmatrix partial_trace(Integer elem)
    • return -> A new functional matrix, the partial trace of the original matrix after tracing out the element with id elem from the system it represents
Clone this wiki locally