Template Function Pennylane::LightningQubit::Gates::callControlledSparseMatrixOp¶
Defined in File OpToMemberFuncPtr.hpp
Function Documentation¶
-
template<class PrecisionT, class IndexT = std::size_t>
inline void Pennylane::LightningQubit::Gates::callControlledSparseMatrixOp(ControlledSparseMatrixFuncPtrT<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> &controlled_wires, const std::vector<bool> &controlled_values, const std::vector<std::size_t> &wires, bool adj = false)¶ Call a controlled 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.
controlled_wires – Wires controlling the gate.
controlled_values – Values of the control wires.
wires – Wires the gate applies to.
adj – If true, we apply the adjoint of the gate.
api/function_namespacePennylane_1_1LightningQubit_1_1Gates_1aa7ec49f1ef3170eee10b086dbce33e1b
Download Python script
Download Notebook
View on GitHub