Template Function Pennylane::apply

Function Documentation

template<class PrecisionT = double>
void Pennylane::apply(pybind11::array_t<std::complex<PrecisionT>> &stateNumpyArray, const std::vector<std::string> &ops, const std::vector<std::vector<size_t>> &wires, const std::vector<bool> &inverse, const std::vector<std::vector<PrecisionT>> &params)

Apply given list of operations to Numpy data array using C++ StateVectorRawCPU class.

Template Parameters

PrecisionT – Precision data type

Parameters
  • stateNumpyArray – Complex numpy data array representing statevector.

  • ops – Operations to apply to the statevector using the C++ backend.

  • wires – Wires on which to apply each operation from ops.

  • inverse – Indicate whether a given operation is an inverse.

  • params – Parameters for each given operation in ops.