|
Quantum 3xplorer (Q3)
An AI-native quantum simulation engine
|
#include <dense_matrix.hpp>
Public Member Functions | |
| DenseMatrix ()=default | |
| DenseMatrix (int rows, int columns, const T &initial_value=T{}) | |
| DenseMatrix (int rows, int columns, std::vector< T > column_major_data) | |
| Adopts a column-major buffer; refuses one whose size is not rows * columns. | |
| template<typename Factor > | |
| DenseMatrix & | add_scaled (const Factor &factor, const DenseMatrix &other) |
| this += factor * other, element by element; the two shapes must agree. | |
| DenseMatrix | adjoint () const |
| The conjugate transpose, columns x rows. | |
| int | columns () const |
| T * | data () |
| The column-major buffer: with rows() it is the (pointer, leading dimension) BLAS takes. | |
| const T * | data () const |
| bool | empty () const |
| Real | frobenius_norm_squared () const |
| The sum of every element's squared modulus. | |
| std::size_t | number_of_elements () const |
| bool | operator!= (const DenseMatrix &other) const |
| T & | operator() (int row, int column) |
| const T & | operator() (int row, int column) const |
| bool | operator== (const DenseMatrix &other) const |
| const std::vector< T > & | raw () const |
| Read-only: a caller that could resize the buffer could break rows() x columns(). | |
| Real | real_inner_product (const DenseMatrix &other) const |
| int | rows () const |
| template<typename Factor > | |
| DenseMatrix | scaled (const Factor &factor) const |
| factor * this, element by element. | |
| template<typename Factor > | |
| DenseMatrix | scaled_columns (const std::vector< Factor > &factors) const |
| this * diag(factors): column j scaled by factors[j], which needs one factor per column. | |
| template<typename Factor > | |
| DenseMatrix | scaled_rows (const std::vector< Factor > &factors) const |
| diag(factors) * this: row i scaled by factors[i], which needs one factor per row. | |
| DenseMatrix | submatrix (const std::vector< int > &row_indices, const std::vector< int > &column_indices) const |
| The rows and columns named, in the order named; an index outside the matrix is refused. | |
Static Public Member Functions | |
| static DenseMatrix | identity (int dimension) |
Definition at line 42 of file dense_matrix.hpp.
|
default |
|
inline |
Definition at line 46 of file dense_matrix.hpp.
|
inline |
Adopts a column-major buffer; refuses one whose size is not rows * columns.
Definition at line 54 of file dense_matrix.hpp.
|
inline |
this += factor * other, element by element; the two shapes must agree.
Definition at line 137 of file dense_matrix.hpp.
|
inline |
The conjugate transpose, columns x rows.
Definition at line 107 of file dense_matrix.hpp.
|
inline |
Definition at line 77 of file dense_matrix.hpp.
Referenced by q3::ProjectionGauge::compute(), q3::SingularValueDecomposition::compute(), q3::internal::dense_matrix_product::describe(), q3::multiply_add(), q3::internal::dense_matrix_product::shape_of(), and q3::HermitianEigensolver::solve().
|
inline |
The column-major buffer: with rows() it is the (pointer, leading dimension) BLAS takes.
Definition at line 95 of file dense_matrix.hpp.
Referenced by q3::SingularValueDecomposition::compute(), q3::multiply_add(), and q3::HermitianEigensolver::solve().
|
inline |
Definition at line 98 of file dense_matrix.hpp.
|
inline |
Definition at line 83 of file dense_matrix.hpp.
Referenced by q3::SubspaceDisentangler::run().
|
inline |
The sum of every element's squared modulus.
Definition at line 118 of file dense_matrix.hpp.
Referenced by q3::SpreadFunctional::evaluate().
|
inlinestatic |
Definition at line 66 of file dense_matrix.hpp.
|
inline |
Definition at line 80 of file dense_matrix.hpp.
|
inline |
Definition at line 204 of file dense_matrix.hpp.
|
inline |
Definition at line 87 of file dense_matrix.hpp.
|
inline |
Definition at line 90 of file dense_matrix.hpp.
|
inline |
Definition at line 201 of file dense_matrix.hpp.
|
inline |
Read-only: a caller that could resize the buffer could break rows() x columns().
Definition at line 102 of file dense_matrix.hpp.
|
inline |
Re tr(this^dagger other), the sum of Re(conj(a) b) over matching elements: the inner product under which the matrices of one shape are a real vector space, which is what a gradient and a search direction are compared in.
Definition at line 151 of file dense_matrix.hpp.
|
inline |
Definition at line 74 of file dense_matrix.hpp.
Referenced by q3::ProjectionGauge::compute(), q3::SingularValueDecomposition::compute(), q3::internal::dense_matrix_product::describe(), q3::multiply_add(), q3::internal::dense_matrix_product::shape_of(), and q3::HermitianEigensolver::solve().
|
inline |
factor * this, element by element.
Definition at line 127 of file dense_matrix.hpp.
Referenced by q3::exponential_of_anti_hermitian().
|
inline |
this * diag(factors): column j scaled by factors[j], which needs one factor per column.
Definition at line 190 of file dense_matrix.hpp.
Referenced by q3::exponential_of_anti_hermitian().
|
inline |
diag(factors) * this: row i scaled by factors[i], which needs one factor per row.
Definition at line 177 of file dense_matrix.hpp.
|
inline |
The rows and columns named, in the order named; an index outside the matrix is refused.
Definition at line 162 of file dense_matrix.hpp.
Referenced by q3::BlochOverlaps::restricted_to().