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

Method get_state_ref

python/cudaq/kernel/kernel_builder.py:760–767  ·  view source on GitHub ↗
(self, stateWrapper)

Source from the content-addressed store, hash-verified

758 return ini
759
760 def get_state_ref(self, stateWrapper):
761 with self.ctx, self.insertPoint, self.loc:
762 stateTy = cc.PointerType.get(cc.StateType.get())
763 refVal = stateWrapper.get_state_refval()
764 i64Ty = self.getIntegerType()
765 intAttr = IntegerAttr.get(i64Ty, refVal)
766 valRef = arith.ConstantOp(i64Ty, intAttr).result
767 return cc.CastOp(stateTy, valRef)
768
769 def qalloc(self, initializer=None):
770 """

Callers 1

qallocMethod · 0.95

Calls 2

getIntegerTypeMethod · 0.95
getMethod · 0.45

Tested by

no test coverage detected