Template Function Pennylane::LightningQubit::Gates::callSparseMatrixOp¶
Defined in File OpToMemberFuncPtr.hpp
Function Documentation¶
-
template<class PrecisionT, class IndexT = std::size_t>
inline void Pennylane::LightningQubit::Gates::callSparseMatrixOp(SparseMatrixFuncPtrT<PrecisionT, IndexT> func, std::complex<PrecisionT> *data, std::size_t num_qubits, const IndexT *row_map_ptr, const IndexT *col_idx_ptr, const std::complex<PrecisionT> *values_ptr, const std::vector<std::size_t> &wires, bool adj = false)¶ Call a sparse matrix operation.
- Template Parameters
PrecisionT – Floating point type for the state-vector.
IndexT – Index type for the sparse matrix.
- Parameters
func – Function pointer for the gate operation.
data – Data pointer the gate is applied to
num_qubits – The number of qubits of the state-vector.
row_map_ptr – Pointer to the row map of the sparse matrix.
col_idx_ptr – Pointer to the column index of the sparse matrix.
values_ptr – Pointer to the values of the sparse matrix.
wires – Wires the gate applies to.
adj – If true, we apply the adjoint of the gate.
api/function_namespacePennylane_1_1LightningQubit_1_1Gates_1a5c3cd5d8110cc6198a130e532a03fa47
Download Python script
Download Notebook
View on GitHub