Skip to content

Commit

Permalink
yapf
Browse files Browse the repository at this point in the history
Signed-off-by: Eric Schweitz <[email protected]>
  • Loading branch information
schweitzpgi committed Nov 22, 2024
1 parent 2edf57b commit d97233b
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions python/cudaq/kernel/ast_bridge.py
Original file line number Diff line number Diff line change
Expand Up @@ -2397,8 +2397,11 @@ def bodyBuilder(iterVal):
startOff = arith.SubIOp(qrSize, self.popValue())
dyna = IntegerAttr.get(self.getIntegerType(), -1)
self.pushValue(
quake.SubVeqOp(self.getVeqType(), var, dyna,
dyna, lower=startOff,
quake.SubVeqOp(self.getVeqType(),
var,
dyna,
dyna,
lower=startOff,
upper=endOff).result)
else:
# extract the qubit...
Expand All @@ -2417,8 +2420,11 @@ def bodyBuilder(iterVal):
offset = arith.SubIOp(qrSize, one)
dyna = IntegerAttr.get(self.getIntegerType(), -1)
self.pushValue(
quake.SubVeqOp(self.getVeqType(), var, dyna,
dyna, lower=zero,
quake.SubVeqOp(self.getVeqType(),
var,
dyna,
dyna,
lower=zero,
upper=offset).result)
else:
# extract the qubit...
Expand Down Expand Up @@ -2996,8 +3002,12 @@ def visit_Subscript(self, node):
upperVal = arith.SubIOp(upperVal, self.getConstantInt(1)).result
dyna = IntegerAttr.get(self.getIntegerType(), -1)
self.pushValue(
quake.SubVeqOp(self.getVeqType(), var, dyna, dyna,
lower=lowerVal, upper=upperVal).result)
quake.SubVeqOp(self.getVeqType(),
var,
dyna,
dyna,
lower=lowerVal,
upper=upperVal).result)
elif cc.StdvecType.isinstance(var.type):
eleTy = cc.StdvecType.getElementType(var.type)
ptrTy = cc.PointerType.get(self.ctx, eleTy)
Expand Down

0 comments on commit d97233b

Please sign in to comment.