Quantum Gate Decomposer  v1.3
Powerful decomposition of almost any unitary into U3 and CNOT gates
List of all members | Public Member Functions | Protected Attributes
functor_extract_submatrices Class Reference

Function operator class to extract the submatrices from a unitary. More...

#include <Sub_Matrix_Decomposition_Cost_Function.h>

Public Member Functions

 functor_extract_submatrices (Matrix &matrix_in, std::vector< Matrix, tbb::cache_aligned_allocator< Matrix >> *submatrices_in)
 Constructor of the class. More...
 
void operator() (tbb::blocked_range< size_t > r) const
 Operator to extract the sumbatrix indexed by submtx_idx. More...
 

Protected Attributes

Matrix matrix
 The matrix from which submatrices would be extracted. More...
 
std::vector< Matrix, tbb::cache_aligned_allocator< Matrix > > * submatrices
 preallocated container storing the submatrices More...
 

Detailed Description

Function operator class to extract the submatrices from a unitary.

Definition at line 45 of file Sub_Matrix_Decomposition_Cost_Function.h.

Constructor & Destructor Documentation

◆ functor_extract_submatrices()

functor_extract_submatrices::functor_extract_submatrices ( Matrix matrix_in,
std::vector< Matrix, tbb::cache_aligned_allocator< Matrix >> *  submatrices_in 
)

Constructor of the class.

Parameters
matrix_inThe square shaped complex matrix from which the cost function is calculated during the submatrix decomposition process.
submatrices_inPreallocated arrays for the submatrices
Returns
Returns with the instance of the class.
Parameters
matrix_inThe square shaped complex matrix from which the cost function is calculated during the submatrix decomposition process.
matrix_size_inThe number rows in the matrix matrix_in
submatrices_inPreallocated arrays for the submatrices
Returns
Returns with the instance of the class.

Definition at line 85 of file Sub_Matrix_Decomposition_Cost_Function.cpp.

Member Function Documentation

◆ operator()()

void functor_extract_submatrices::operator() ( tbb::blocked_range< size_t r) const

Operator to extract the sumbatrix indexed by submtx_idx.

Operator to extract the submatrix indexed by submtx_idx.

Parameters
rA range of indices labeling the given submatrix to be extracted

Definition at line 97 of file Sub_Matrix_Decomposition_Cost_Function.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ matrix

Matrix functor_extract_submatrices::matrix
protected

The matrix from which submatrices would be extracted.

Definition at line 50 of file Sub_Matrix_Decomposition_Cost_Function.h.

◆ submatrices

std::vector<Matrix, tbb::cache_aligned_allocator<Matrix> >* functor_extract_submatrices::submatrices
protected

preallocated container storing the submatrices

Definition at line 52 of file Sub_Matrix_Decomposition_Cost_Function.h.


The documentation for this class was generated from the following files: