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

Method __str__

python/cudaq/kernel/kernel_builder.py:732–744  ·  view source on GitHub ↗

Return a string representation of this kernels MLIR Module.

(self, canonicalize=True)

Source from the content-addressed store, hash-verified

730 func.CallOp(otherFuncCloned, mlirValues)
731
732 def __str__(self, canonicalize=True):
733 """
734 Return a string representation of this kernels MLIR Module.
735 """
736 if canonicalize:
737 pm = PassManager.parse(
738 "builtin.module(func.func(unwind-lowering,canonicalize,"
739 "cse,quake-add-metadata),quake-propagate-metadata)",
740 context=self.ctx)
741 cloned = cudaq_runtime.cloneModule(self.module)
742 cudaq_runtime.runPassManager(pm, cloned)
743 return str(cloned)
744 return str(self.module)
745
746 def init_qalloc(self, statePtr, wasCreated):
747 """

Callers

nothing calls this directly

Calls 2

parseMethod · 0.45
runPassManagerMethod · 0.45

Tested by

no test coverage detected