Template Function Pennylane::NanoBindings::applyControlledMatrix¶
Defined in File Bindings.hpp
Function Documentation¶
-
template<class StateT>
void Pennylane::NanoBindings::applyControlledMatrix(StateT &st, const nb::ndarray<const std::complex<typename StateT::PrecisionT>, nb::c_contig> &matrix, const std::vector<std::size_t> &controlled_wires, const std::vector<bool> &controlled_values, const std::vector<std::size_t> &wires, bool inverse = false)¶ Register controlled matrix kernel. Register the applyControlledMatrix function to the given state.
- Template Parameters
StateT – The type of the state.
- Parameters
st – The state to apply the matrix to.
matrix – The matrix to apply.
controlled_wires – The wires to apply the matrix to.
controlled_values – The values to apply the matrix to.
api/function_Bindings_8hpp_1ad3838e7d152ae6a908cadd1a0e15ca50
Download Python script
Download Notebook
View on GitHub