Template Function Pennylane::Util::write_CSR_vectors¶
Defined in File TestHelpers.hpp
Function Documentation¶
-
template<class ComplexT, class IndexT>
void Pennylane::Util::write_CSR_vectors(std::vector<IndexT> &row_map, std::vector<IndexT> &entries, std::vector<ComplexT> &values, IndexT numRows)¶ Fills the empty vectors with the CSR (Compressed Sparse Row) sparse matrix representation for a tri-diagonal + periodic boundary conditions Hamiltonian.
- Template Parameters
PrecisionT – data float point precision.
IndexT – integer type used as indices of the sparse matrix.
- Parameters
row_map – the j element encodes the total number of non-zeros above row j.
entries – column indices.
values – matrix non-zero elements.
numRows – matrix number of rows.
api/function_TestHelpers_8hpp_1a670d626728db201b560063d6317bfa9b
Download Python script
Download Notebook
View on GitHub