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

Method getConstantFloat

python/cudaq/kernel/kernel_builder.py:364–370  ·  view source on GitHub ↗

Create a constant float operation and return its MLIR result Value. Takes as input the concrete float value.

(self, value, width=64)

Source from the content-addressed store, hash-verified

362 return FloatAttr.get(type, value)
363
364 def getConstantFloat(self, value, width=64):
365 """
366 Create a constant float operation and return its MLIR result Value.
367 Takes as input the concrete float value.
368 """
369 ty = self.getFloatType(width=width)
370 return self.getConstantFloatWithType(value, ty)
371
372 def getConstantFloatWithType(self, value, ty):
373 """

Callers 3

bodyMethod · 0.95
process_channel_paramMethod · 0.95

Calls 2

getFloatTypeMethod · 0.95

Tested by

no test coverage detected