File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
pennylane/compiler/python_compiler Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 6464 SameVariadicResultSize ,
6565 irdl_attr_definition ,
6666 irdl_op_definition ,
67+ lazy_traits_def ,
6768 operand_def ,
6869 opt_operand_def ,
6970 opt_prop_def ,
7576 var_operand_def ,
7677 var_result_def ,
7778)
78- from xdsl .traits import ( # SingleBlockImplicitTerminator,
79+ from xdsl .traits import (
7980 HasParent ,
8081 IsTerminator ,
8182 NoMemoryEffect ,
8283 Pure ,
84+ SingleBlockImplicitTerminator ,
8385)
8486from xdsl .utils .exceptions import VerifyException
8587
@@ -161,8 +163,7 @@ class AdjointOp(IRDLOperation):
161163
162164 region = region_def ("single_block" )
163165
164- # FIXME: Figure out what to do about YieldOp
165- # traits = traits_def(SingleBlockImplicitTerminator(YieldOp))
166+ traits = lazy_traits_def (lambda : SingleBlockImplicitTerminator (YieldOp ))
166167
167168 def __init__ (
168169 self ,
Original file line number Diff line number Diff line change @@ -156,6 +156,9 @@ def mapping_type_vars(
156156 # pylint: disable=unused-argument,missing-function-docstring
157157 return self
158158
159+ def get_bases (self ):
160+ return set ()
161+
159162
160163@dataclass (frozen = True , init = False )
161164class TensorConstraint (ContainerConstraint ):
You can’t perform that action at this time.
0 commit comments