Template Function Pennylane::NanoBindings::applyMatrix

Function Documentation

template<class StateT>
void Pennylane::NanoBindings::applyMatrix(StateT &st, const nb::ndarray<const std::complex<typename StateT::PrecisionT>, nb::c_contig> &matrix, const std::vector<std::size_t> &wires, bool inverse = false)

Register applyMatrix Register the applyMatrix 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.

  • wires – The wires to apply the matrix to.

  • inverse – Whether to apply the matrix in the inverse direction.