Template Function Pennylane::toNumpyArray

Function Documentation

template<class PrecisionT = double>
auto Pennylane::toNumpyArray(const StateVectorManagedCPU<PrecisionT> &sv) -> pybind11::array_t<std::complex<PrecisionT>>

Create numpy array view for the underlying data of StateVectorManagedCPU object.

Template Parameters

PrecisionT – Floating point data type

Parameters

svStateVectorManagedCPU object

Returns

A numpy array