Sequential Quantum Gate Decomposer
v1.9.3
Powerful decomposition of general unitarias into one- and two-qubit gates gates
|
Class to store data of complex arrays and its properties. More...
#include <matrix_real.h>
Public Member Functions | |
void | conjugate () |
Call to conjugate (or un-conjugate) the matrix for CBLAS functions. More... | |
Matrix_real | copy () const |
Call to create a copy of the matrix. More... | |
void | ensure_aligned () |
double * | get_data () const |
Call to get the pointer to the stored data. More... | |
bool | is_conjugated () |
Call to get whether the matrix should be conjugated in CBLAS functions or not. More... | |
bool | is_transposed () |
Call to get whether the matrix should be conjugated in CBLAS functions or not. More... | |
bool | isnan () |
Call to check the array for NaN entries. More... | |
Matrix_real () | |
Default constructor of the class. More... | |
Matrix_real (double *data_in, int rows_in, int cols_in) | |
Constructor of the class. More... | |
Matrix_real (double *data_in, int rows_in, int cols_in, int stride_in) | |
Constructor of the class. More... | |
Matrix_real (int rows_in, int cols_in) | |
Constructor of the class. More... | |
Matrix_real (int rows_in, int cols_in, int stride_in) | |
Constructor of the class. More... | |
Matrix_real (const Matrix_real &in) | |
Copy constructor of the class. More... | |
double & | operator[] (int idx) const |
Operator [] to access elements in array style (does not check the boundaries of the stored array) More... | |
void | print_matrix () const |
Call to prints the stored matrix on the standard output. More... | |
void | release_data () |
Call to release the data stored by the matrix. More... | |
void | replace_data (double *data_in, bool owner_in) |
Call to replace the stored data by an another data array. More... | |
void | set_owner (bool owner_in) |
Call to set the current class instance to be (or not to be) the owner of the stored data array. More... | |
int | size () const |
Call to get the number of the allocated elements. More... | |
void | transpose () |
Call to transpose (or un-transpose) the matrix for CBLAS functions. More... | |
Public Attributes | |
int | cols |
The number of columns. More... | |
double * | data |
pointer to the stored data More... | |
int | rows |
The number of rows. More... | |
int | stride |
The column stride of the array. (The array elements in one row are a_0, a_1, ... a_{cols-1}, 0, 0, 0, 0. The number of zeros is stride-cols) More... | |
Protected Attributes | |
bool | conjugated |
logical variable indicating whether the matrix needs to be conjugated in CBLAS operations More... | |
bool | owner |
logical value indicating whether the class instance is the owner of the stored data or not. (If true, the data array is released in the destructor) More... | |
tbb::spin_mutex * | reference_mutex |
mutual exclusion to count the references for class instances referring to the same data. More... | |
int64_t * | references |
the number of the current references of the present object More... | |
bool | transposed |
logical variable indicating whether the matrix needs to be transposed in CBLAS operations More... | |
Private Attributes | |
char | padding [CACHELINE-48] |
padding class object to cache line borders More... | |
Class to store data of complex arrays and its properties.
Compatible with the Picasso numpy interface.
Definition at line 39 of file matrix_real.h.
Matrix_real::Matrix_real | ( | ) |
Default constructor of the class.
Definition at line 35 of file matrix_real.cpp.
Constructor of the class.
By default the created class instance would not be owner of the stored data.
data_in | The pointer pointing to the data |
rows_in | The number of rows in the stored matrix |
cols_in | The number of columns in the stored matrix |
Definition at line 46 of file matrix_real.cpp.
Constructor of the class.
By default the created class instance would not be owner of the stored data.
data_in | The pointer pointing to the data |
rows_in | The number of rows in the stored matrix |
cols_in | The number of columns in the stored matrix |
stride_in | The column stride of the matrix array (The array elements in one row are a_0, a_1, ... a_{cols-1}, 0, 0, 0, 0. The number of zeros is stride-cols) |
Definition at line 59 of file matrix_real.cpp.
Constructor of the class.
Allocates data for matrix rows_in times cols_in. By default the created instance would be the owner of the stored data.
rows_in | The number of rows in the stored matrix |
cols_in | The number of columns in the stored matrix |
Definition at line 70 of file matrix_real.cpp.
Constructor of the class.
Allocates data for matrix rows_in times cols_in. By default the created instance would be the owner of the stored data.
rows_in | The number of rows in the stored matrix |
cols_in | The number of columns in the stored matrix |
stride_in | The column stride of the matrix array (The array elements in one row are a_0, a_1, ... a_{cols-1}, 0, 0, 0, 0. The number of zeros is stride-cols) |
Definition at line 83 of file matrix_real.cpp.
Matrix_real::Matrix_real | ( | const Matrix_real & | in | ) |
Copy constructor of the class.
The new instance shares the stored memory with the input matrix. (Needed for TBB calls)
An | instance of class matrix to be copied. |
Definition at line 93 of file matrix_real.cpp.
|
inlineinherited |
Call to conjugate (or un-conjugate) the matrix for CBLAS functions.
Definition at line 271 of file matrix_base.hpp.
Matrix_real Matrix_real::copy | ( | ) | const |
Call to create a copy of the matrix.
Definition at line 104 of file matrix_real.cpp.
|
inlineinherited |
Definition at line 457 of file matrix_base.hpp.
|
inlineinherited |
Call to get the pointer to the stored data.
Definition at line 304 of file matrix_base.hpp.
|
inlineinherited |
Call to get whether the matrix should be conjugated in CBLAS functions or not.
Definition at line 264 of file matrix_base.hpp.
|
inlineinherited |
Call to get whether the matrix should be conjugated in CBLAS functions or not.
Definition at line 282 of file matrix_base.hpp.
bool Matrix_real::isnan | ( | ) |
Call to check the array for NaN entries.
Definition at line 127 of file matrix_real.cpp.
|
inlineinherited |
Operator [] to access elements in array style (does not check the boundaries of the stored array)
idx | the index of the element |
Definition at line 423 of file matrix_base.hpp.
|
inlineinherited |
Call to prints the stored matrix on the standard output.
Definition at line 480 of file matrix_base.hpp.
|
inlineinherited |
Call to release the data stored by the matrix.
(If the class instance was not the owner of the data, then the data pointer is simply set to NULL pointer.)
Definition at line 333 of file matrix_base.hpp.
|
inlineinherited |
Call to replace the stored data by an another data array.
If the class was the owner of the original data array, then it is released.
data_in | The data array to be set as a new storage. |
owner_in | Set true to set the current class instance to be the owner of the data array, or false otherwise. |
Definition at line 316 of file matrix_base.hpp.
|
inlineinherited |
Call to set the current class instance to be (or not to be) the owner of the stored data array.
owner_in | Set true to set the current class instance to be the owner of the data array, or false otherwise. |
Definition at line 376 of file matrix_base.hpp.
|
inlineinherited |
Call to get the number of the allocated elements.
Definition at line 470 of file matrix_base.hpp.
|
inlineinherited |
Call to transpose (or un-transpose) the matrix for CBLAS functions.
Definition at line 292 of file matrix_base.hpp.
|
inherited |
The number of columns.
Definition at line 44 of file matrix_base.hpp.
|
protectedinherited |
logical variable indicating whether the matrix needs to be conjugated in CBLAS operations
Definition at line 53 of file matrix_base.hpp.
|
inherited |
pointer to the stored data
Definition at line 48 of file matrix_base.hpp.
|
protectedinherited |
logical value indicating whether the class instance is the owner of the stored data or not. (If true, the data array is released in the destructor)
Definition at line 57 of file matrix_base.hpp.
|
private |
padding class object to cache line borders
Definition at line 42 of file matrix_real.h.
|
protectedinherited |
mutual exclusion to count the references for class instances referring to the same data.
Definition at line 59 of file matrix_base.hpp.
|
protectedinherited |
the number of the current references of the present object
Definition at line 61 of file matrix_base.hpp.
|
inherited |
The number of rows.
Definition at line 42 of file matrix_base.hpp.
|
inherited |
The column stride of the array. (The array elements in one row are a_0, a_1, ... a_{cols-1}, 0, 0, 0, 0. The number of zeros is stride-cols)
Definition at line 46 of file matrix_base.hpp.
|
protectedinherited |
logical variable indicating whether the matrix needs to be transposed in CBLAS operations
Definition at line 55 of file matrix_base.hpp.