MCPcopy Create free account
hub / github.com/NVIDIA/cuda-quantum / isCupyArray

Function isCupyArray

python/runtime/cudaq/algorithms/py_state.cpp:258–260  ·  view source on GitHub ↗

Helper to check if object is a CuPy array (has __cuda_array_interface__)

Source from the content-addressed store, hash-verified

256
257// Helper to check if object is a CuPy array (has __cuda_array_interface__)
258static bool isCupyArray(nanobind::object obj) {
259 return nanobind::hasattr(obj, "__cuda_array_interface__");
260}
261
262/// @brief Helper to get BufferInfo from a numpy array via Python buffer
263/// protocol.

Callers 1

bindPyStateMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected