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

Method hasTerminator

python/cudaq/kernel/ast_bridge.py:804–809  ·  view source on GitHub ↗

Return True if the given Block has a Terminator operation.

(self, block)

Source from the content-addressed store, hash-verified

802 return self.inIfStmtBlockStack > 0
803
804 def hasTerminator(self, block):
805 """Return True if the given Block has a Terminator operation."""
806 if len(block.operations) > 0:
807 return cudaq_runtime.isTerminator(
808 block.operations[len(block.operations) - 1])
809 return False
810
811 def isArithmeticType(self, type):
812 """Return True if the given type is an integer, float, or complex

Callers 3

createForLoopMethod · 0.95
visit_FunctionDefMethod · 0.95
visit_IfMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected