CMat Methods

Liquid Quantum Simulator

CMat Methods

The CMat type exposes the following members.

Methods
  Name Description
Public method Add
Adds another matrix to this matrix. The two matrices must have the same number of rows and columns.
Public method Adj
Computes the adjoint (complex conjugate transpose) of this matrix.
Public method Clear
Clears this matrix, setting it to a 0x0 matrix.
Public method Copy
Makes a new copy, independent copy of this matrix.
Public method Static member CreMat
Creates an array that can be filled in and passed to the array-based CMat constructor.
Public method Static member CreZer
Creates an array filled with zeros that can be filled in and passed to the array-based CMat constructor.
Public method Div
Scales this matrix by a constant divisor. This matrix is updated in place, rather than a new matrix being created.
Public method Dump
Dumps this matrix. Note that there is no limit on the size of the result; every row and column entry is included.
Public method DumpML
Dumps this matrix in Matlab format for debugging.
Public method DumpNarrow
Dumps this matrix. This method will produce a relatively compact representation of the matrix.
Public method Equals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public method FixUnitary
Makes this matrix closer to being unitary by applying an iterative correction.
Public method GetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public method GetType
Gets the Type of the current instance.
(Inherited from Object.)
Public method Kron(CMat)
Computes the Kronecker Product of this matrix with another matrix.
Public method Kron(Int32, FSharpOptionBoolean)
Computes the Kronecker Product of this matrix with an identity matrix
Public method Mul(Double)
Scales this matrix by a constant multiplier. This matrix is updated in place, rather than a new matrix being created.
Public method Mul(CMat)
Computes the product of this matrix with another matrix. This matrix is on the left-hand side of the product, and the argument matrix is on the right-hand side. This matrix must have the same number of columns as the other matrix has rows.
Public method Mul(CVec)
Calculates the product of this matrix and a vector. The vector's length must match the numder of columns in this matrix.
Public method Power
Computes an integer power of this matrix. NOTE: This destroys the contents of the current matrix.
Public method Static member Read
Reads a matrix from a stream.
Public method ToString
Gets a string representation of this matrix. Note that there is no limit on the size of the result; every row and column entry is included.
(Overrides ObjectToString.)
Public method UnitaryError
Performs a rough check to see if this matrix is actually unitary. It calculates the biggest deviation from 1 of the diagonal elements of (this adj)*this. In other words, it calculates the largest deviation of the length of a row, viewed as a complex vector, from 1. The orthogonality of different rows is not checked.
Public method Write
Writes this matrix to a stream for serialization.
Top
See Also