Skip to content

Commit d2eacc9

Browse files
committed
more elaborate docstring in AddK
1 parent 183b830 commit d2eacc9

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

qualtran/bloqs/arithmetic/addition.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,9 @@ def build_composite_bloq(self, bb: 'BloqBuilder', x: Soquet) -> Dict[str, 'Soque
455455
k = bb.allocate(dtype=self.dtype)
456456
k = bb.add(self._load_k_bloq, x=k)
457457

458-
# quantum-quantum addition, always
458+
# perform the quantum-quantum addition
459+
# we always perform this addition (even when controlled), so we wrap in `Always`
460+
# controlling the data loading is sufficient to control this bloq.
459461
k, x = bb.add(Always(Add(self.dtype, self.dtype)), a=k, b=x)
460462

461463
# unload `k`

0 commit comments

Comments
 (0)