Object
The root type of the language. All values are instances of Object.
Factories
cholesky(const RealMatrix A) -> Object
Computes the Cholesky decomposition of a RealMatrix A.. By default, the standard algorithm is used; to use the robust algorithm instead, provide the option 'algorithm' with value 'robust'.
Parameters
- A: The RealMatrix.
cholesky(const ComplexMatrix A) -> Object
Computes the Cholesky decomposition of a ComplexMatrix A.. By default, the standard algorithm is used; to use the robust algorithm instead, provide the option 'algorithm' with value 'robust'.
Parameters
- A: The ComplexMatrix.
cholesky(const RealMatrix A, const Map options) -> Object
Computes the Cholesky decomposition of a RealMatrix A.
Parameters
- A: The RealMatrix.
- options: Map of Cholesky options
- algorithm (string): The Cholesky algorithm to use. Possible values are 'standard' (default) and 'robust' (Robust Cholesky).
cholesky(const ComplexMatrix A, const Map options) -> Object
Computes the Cholesky decomposition of a ComplexMatrix A.
Parameters
- A: The ComplexMatrix.
- options: Map of Cholesky options
- algorithm (string): The Cholesky algorithm to use. Possible values are 'standard' (default) and 'robust' (Robust Cholesky).
eigensolver(const ComplexMatrix mat) -> Object
Computes the eigenvalues and eigenvectors of a matrix.
Computes the eigenvalues and eigenvectors of the given matrix. If the matrix is known to be self-adjoint,
setting the is_hermitian option to true can improve performance.
Parameters
- mat: The ComplexMatrix to compute the eigendecomposition of.
eigensolver(const RealMatrix mat) -> Object
Computes the eigenvalues and eigenvectors of a matrix.
Computes the eigenvalues and eigenvectors of the given matrix. If the matrix is known to be self-adjoint,
setting the is_hermitian option to true can improve performance.
Parameters
- mat: The RealMatrix to compute the eigendecomposition of.
eigensolver(const RealMatrix mat, const Map options) -> Object
Computes the eigenvalues and eigenvectors of a matrix.
Computes the eigenvalues and eigenvectors of the given matrix. If the matrix is known to be self-adjoint,
setting the is_hermitian option to true can improve performance.
Parameters
- mat: The RealMatrix to compute the eigendecomposition of.
- options: A map of options for the eigensolver.
- is_hermitian (bool): Whether the operator is Hermitian (default: false). If true, Hermitian-specific algorithms are used, which can improve performance.
eigensolver(const RealMatrix A, const RealMatrix B) -> Object
Computes the eigenvalues and eigenvectors of a matrix.
Computes the eigenvalues and eigenvectors of the given matrix pencil (AX - BXD). If the matrix is known to be self-adjoint,
setting the is_hermitian option to true can improve performance.
Parameters
- A: The RealMatrix A of the matrix pencil (AX - BXD).
- B: The RealMatrix B of the matrix pencil (AX - BXD).
eigensolver(const ComplexMatrix mat, const Map options) -> Object
Computes the eigenvalues and eigenvectors of a matrix.
Computes the eigenvalues and eigenvectors of the given matrix. If the matrix is known to be self-adjoint,
setting the is_hermitian option to true can improve performance.
Parameters
- mat: The ComplexMatrix to compute the eigendecomposition of.
- options: A map of options for the eigensolver.
- is_hermitian (bool): Whether the operator is Hermitian (default: false). If true, Hermitian-specific algorithms are used, which can improve performance.
eigensolver(const ComplexMatrix A, const ComplexMatrix B) -> Object
Computes the eigenvalues and eigenvectors of a matrix.
Computes the eigenvalues and eigenvectors of the given matrix pencil (AX - BXD). If the matrix is known to be self-adjoint,
setting the is_hermitian option to true can improve performance.
Parameters
- A: The ComplexMatrix A of the matrix pencil (AX - BXD).
- B: The ComplexMatrix B of the matrix pencil (AX - BXD).
eigensolver(const RealMatrix A, const RealMatrix B, const Map options) -> Object
Computes the eigenvalues and eigenvectors of a matrix.
Computes the eigenvalues and eigenvectors of the given matrix pencil (AX - BXD). If the matrix is known to be self-adjoint,
setting the is_hermitian option to true can improve performance.
Parameters
- A: The RealMatrix A of the matrix pencil (AX - BXD).
- B: The RealMatrix B of the matrix pencil (AX - BXD).
- options: A map of options for the eigensolver.
- is_hermitian (bool): Whether the operator is Hermitian (default: false). If true, Hermitian-specific algorithms are used, which can improve performance.
eigensolver(const ComplexMatrix A, const ComplexMatrix B, const Map options) -> Object
Computes the eigenvalues and eigenvectors of a matrix.
Computes the eigenvalues and eigenvectors of the given matrix pencil (AX - BXD). If the matrix is known to be self-adjoint,
setting the is_hermitian option to true can improve performance.
Parameters
- A: The ComplexMatrix A of the matrix pencil (AX - BXD).
- B: The ComplexMatrix B of the matrix pencil (AX - BXD).
- options: A map of options for the eigensolver.
- is_hermitian (bool): Whether the operator is Hermitian (default: false). If true, Hermitian-specific algorithms are used, which can improve performance.
lu(const ComplexMatrix A) -> Object
Computes the LU decomposition of a ComplexMatrix A.. By default, partial pivoting is used and the resulting factorization is PA = LU, where P is a permutation matrix, L is lower triangular with unit diagonal elements, and U is upper triangular. To use full pivoting instead, provide the option 'pivoting' with value 'full'. The resulting factorization is PAQ = LU, where P and Q are permutation matrices.
Parameters
- A: The ComplexMatrix.
lu(const RealMatrix A) -> Object
Computes the LU decomposition of a RealMatrix A.. By default, partial pivoting is used and the resulting factorization is PA = LU, where P is a permutation matrix, L is lower triangular with unit diagonal elements, and U is upper triangular. To use full pivoting instead, provide the option 'pivoting' with value 'full'. The resulting factorization is PAQ = LU, where P and Q are permutation matrices.
Parameters
- A: The RealMatrix.
lu(const ComplexMatrix A, const Map options) -> Object
Computes the LU decomposition of a ComplexMatrix A.
Parameters
- A: The ComplexMatrix.
- options: Map of LU options
- pivoting (string): The LU pivoting to use. Possible values are 'partial' (default) and 'full'.
lu(const RealMatrix A, const Map options) -> Object
Computes the LU decomposition of a RealMatrix A.
Parameters
- A: The RealMatrix.
- options: Map of LU options
- pivoting (string): The LU pivoting to use. Possible values are 'partial' (default) and 'full'.
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 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 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.
operator_function(const ComplexMatrix matrix, const ComplexFunctionWithDeriv fun) -> Object
Approximates a matrix function using the Krylov subspace method.
This function is accepts non-Hermitian matrices. The scalar function signature should be (complex, integer) -> complex. Options are provided as a map of option names to their values.
Parameters
- matrix: The matrix to wrap.
- fun: A scalar function corresponding to the matrix function.
operator_function(const ComplexMatrix matrix, const Function<complex(complex)> fun) -> Object
Approximates a matrix function using the Krylov subspace method.
This function accepts Hermitian matrices. Options are provided as a map of option names to their values.
Parameters
- matrix: The matrix to wrap.
- fun: A scalar function corresponding to the matrix function.
operator_function(const RealMatrix matrix, const Function<real(real)> fun) -> Object
Approximates a matrix function using the Krylov subspace method.
This function accepts Hermitian matrices. Options are provided as a map of option names to their values.
Parameters
- matrix: The matrix to wrap.
- fun: A scalar function corresponding to the matrix function.
operator_function(const ComplexMatrix matrix, const Function<complex(complex)> fun, const Map opts) -> Object
Approximates a matrix function using the Krylov subspace method.
This function accepts Hermitian matrices. Options are provided as a map of option names to their values.
Parameters
- matrix: The matrix to wrap.
- fun: A scalar function corresponding to the matrix function.
- opts: Options for the operator function.
- is_real (boolean): Indicates whether the function is real-valued. This option is required to correctly handle real-valued functions.
- krylov_dimension (integer): The dimension of the Krylov subspace (default: 2 * nev + 2). This parameter must be larger than nev. If convergence issues are encountered, increasing this value may help.
operator_function(const RealMatrix matrix, const Function<real(real)> fun, const Map opts) -> Object
Approximates a matrix function using the Krylov subspace method.
This function accepts Hermitian matrices. Options are provided as a map of option names to their values.
Parameters
- matrix: The matrix to wrap.
- fun: A scalar function corresponding to the matrix function.
- opts: Options for the operator function.
- is_real (boolean): Indicates whether the function is real-valued. This option is required to correctly handle real-valued functions.
- krylov_dimension (integer): The dimension of the Krylov subspace (default: 2 * nev + 2). This parameter must be larger than nev. If convergence issues are encountered, increasing this value may help.
operator_function(const ComplexMatrix matrix, const ComplexFunctionWithDeriv fun, const Map opts) -> Object
Approximates a matrix function using the Krylov subspace method.
This function is accepts non-Hermitian matrices. The scalar function signature should be (complex, integer) -> complex. Options are provided as a map of option names to their values.
Parameters
- matrix: The matrix to wrap.
- fun: A scalar function corresponding to the matrix function.
- opts: Options for the operator function.
- is_real (boolean): Indicates whether the function is real-valued. This option is required to correctly handle real-valued functions.
- krylov_dimension (integer): The dimension of the Krylov subspace (default: 2 * nev + 2). This parameter must be larger than nev. If convergence issues are encountered, increasing this value may help.
qr(const RealMatrix A) -> Object
Computes the QR decomposition of a RealMatrix A.. By default, no pivoting is used and the resulting factorization is A = QR, where Q is a unitary matrix and R is upper triangular. To use partial (column) pivoting, provide the option 'pivoting' with value 'partial'. The resulting factorization is AP = QR, where P is a permutation matrix. To use full pivoting, provide the option 'pivoting' with value 'full'.
Parameters
- A: The RealMatrix.
qr(const ComplexMatrix A) -> Object
Computes the QR decomposition of a ComplexMatrix A.. By default, no pivoting is used and the resulting factorization is A = QR, where Q is a unitary matrix and R is upper triangular. To use partial (column) pivoting, provide the option 'pivoting' with value 'partial'. The resulting factorization is AP = QR, where P is a permutation matrix. To use full pivoting, provide the option 'pivoting' with value 'full'.
Parameters
- A: The ComplexMatrix.
qr(const ComplexMatrix A, const Map options) -> Object
Computes the QR decomposition of a ComplexMatrix A.
Parameters
- A: The ComplexMatrix.
- options: Map of QR options
- pivoting (string): The QR pivoting to use. Possible values are 'none' (default), 'partial' and 'full'.
qr(const RealMatrix A, const Map options) -> Object
Computes the QR decomposition of a RealMatrix A.
Parameters
- A: The RealMatrix.
- options: Map of QR options
- pivoting (string): The QR pivoting to use. Possible values are 'none' (default), 'partial' and 'full'.
state_range(const StateInfo options, integer arguments) -> Object
Creates an iterator for a range of state objects matching the provided option.
The state_range factory provides a way of constructing an iterator of states. The provided options will dispatch the appropriate range method of the state type matching the options.
Parameters
- options: A StateInfo option that specifies the state type produced by the state_range method.
- arguments: Appropriate arguments to build the state range.
Example
state_range(as_basisstate | as_spinhalf,2) //Returns [(1 + 0i)|00>, (1 + 0i)|10>, (1 + 0i)|01>, (1 + 0i)|11>]
svd(const RealMatrix A) -> Object
Computes the singular value decomposition (SVD) of an n-by-p RealMatrix A as a product A=USV^T where U is a n-by-m unitary, V is a p-by-m unitary, , and S is an m-by-m real positive diagonal matrix; the diagonal entries of S are known as the singular values of A and the columns of U and V are known as the left and right singular vectors of A respectively. Singular values are always sorted in decreasing order.. By default, the Jacobi algorithm is used; to use the block divide and conquer (BDC) algorithm instead, provide the option 'algorithm' with value 'bdc'.
Parameters
- A: The RealMatrix.
svd(const ComplexMatrix A) -> Object
Computes the singular value decomposition (SVD) of an n-by-p ComplexMatrix A as a product A=USV^T where U is a n-by-m unitary, V is a p-by-m unitary, , and S is an m-by-m real positive diagonal matrix; the diagonal entries of S are known as the singular values of A and the columns of U and V are known as the left and right singular vectors of A respectively. Singular values are always sorted in decreasing order.. By default, the Jacobi algorithm is used; to use the block divide and conquer (BDC) algorithm instead, provide the option 'algorithm' with value 'bdc'.
Parameters
- A: The ComplexMatrix.
svd(const ComplexMatrix A, const Map options) -> Object
Computes the singular value decomposition (SVD) of an n-by-p ComplexMatrix A as a product A=USV^T where U is a n-by-m unitary, V is a p-by-m unitary, , and S is an m-by-m real positive diagonal matrix; the diagonal entries of S are known as the singular values of A and the columns of U and V are known as the left and right singular vectors of A respectively. Singular values are always sorted in decreasing order.
Parameters
- A: The ComplexMatrix.
- options: Map of SVD options
- algorithm (string): The SVD algorithm to use. Possible values are 'jacobi' (default) and 'bdc' (Bidiagonal Divide and Conquer).
svd(const RealMatrix A, const Map options) -> Object
Computes the singular value decomposition (SVD) of an n-by-p RealMatrix A as a product A=USV^T where U is a n-by-m unitary, V is a p-by-m unitary, , and S is an m-by-m real positive diagonal matrix; the diagonal entries of S are known as the singular values of A and the columns of U and V are known as the left and right singular vectors of A respectively. Singular values are always sorted in decreasing order.
Parameters
- A: The RealMatrix.
- options: Map of SVD options
- algorithm (string): The SVD algorithm to use. Possible values are 'jacobi' (default) and 'bdc' (Bidiagonal Divide and Conquer).
Symbols
| Name | Description |
|---|---|
= | Assigns a value to an undefined variable. |
Members
| Name | Description |
|---|---|
| clone | Creates a deep copy of an object, including its attributes. |
| get_type_info | Returns the type information of the variable. |
| is_type | Checks if the variable represents a type. |
| is_var_const | Checks if the variable is constant. |
| is_var_null | Checks if the variable is null. |
| is_var_pointer | Checks if the variable is a pointer. |
| is_var_reference | Checks if the variable is a reference. |
| is_var_return_value | Checks if the variable is a return value. |
| is_var_undef | Checks if the variable is undefined. |
| type_match | Checks if the variable's type matches the specified type. |
| type_name | Returns the type name of an object. |