Template Function Pennylane::NanoBindings::alignedArray

Function Documentation

template<typename VectorT>
auto Pennylane::NanoBindings::alignedArray(CPUMemoryModel memory_model, std::size_t size, bool zeroInit) -> nb::ndarray<VectorT, nb::numpy, nb::c_contig>

Create an aligned array for a given type, memory model and array size.

Template Parameters

VectorT – Datatype of array to create

Parameters
  • memory_model – Memory model to use

  • size – Size of the array to create

  • zeroInit – Whether to initialize the array with zeros

Returns

nb::ndarray<VectorT, nb::numpy, nb::c_contig>