Template Function Pennylane::NanoBindings::Utils::convertMatrices

Function Documentation

template<typename ComplexT, typename PrecisionT>
std::vector<std::vector<ComplexT>> Pennylane::NanoBindings::Utils::convertMatrices(const std::vector<nb::ndarray<std::complex<PrecisionT>, nb::c_contig>> &matrices)

Convert complex matrices from nanobind ndarray to std::vector.

Template Parameters
  • ComplexT – Complex type to convert to

  • PrecisionT – Precision type of the complex numbers

Parameters

matrices – Vector of ndarrays containing matrices

Returns

std::vector<std::vector<ComplexT>> Converted matrices