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

Function supportCommonCast

python/cudaq/kernel/kernel_builder.py:171–176  ·  view source on GitHub ↗
(mlirType, otherTy, arg, FromType, ToType, PyType)

Source from the content-addressed store, hash-verified

169
170
171def supportCommonCast(mlirType, otherTy, arg, FromType, ToType, PyType):
172 argEleTy = cc.StdvecType.getElementType(mlirType)
173 eleTy = cc.StdvecType.getElementType(otherTy)
174 if ToType.isinstance(eleTy) and FromType.isinstance(argEleTy):
175 return [PyType(i) for i in arg]
176 return None
177
178
179def __generalCustomOperation(self, opName, *args):

Callers 1

__call__Method · 0.85

Calls 1

getElementTypeMethod · 0.80

Tested by

no test coverage detected