Skip to content

Commit b82dabb

Browse files
committed
update caution
1 parent d2eacc9 commit b82dabb

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

qualtran/bloqs/bookkeeping/always.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,10 @@ class Always(Bloq):
4949
This simplifies the decompositions by avoiding the need to explicitly define the decomposition
5050
for the controlled version of bloq.
5151
52-
**Caution:** This wrapper should be used with care, _only_ when ignoring the controls does not
53-
affect the overall action of the bloq.
52+
**Caution:** This wrapper should be used with care. It is up to the bloq author to ensure that
53+
the controlled version of a decomposition containing `Always` bloqs still respects the
54+
controlled protocol. That is, ignoring controls on these subbloqs wrapped in `Always` should not
55+
change the action of the overall bloq with respect to the reference controlled implementation.
5456
5557
Args:
5658
subbloq: The bloq to always apply, irrespective of any controls.

qualtran/bloqs/bookkeeping/bookkeeping.ipynb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1022,8 +1022,10 @@
10221022
"This simplifies the decompositions by avoiding the need to explicitly define the decomposition\n",
10231023
"for the controlled version of bloq.\n",
10241024
"\n",
1025-
"**Caution:** This wrapper should be used with care, _only_ when ignoring the controls does not\n",
1026-
"affect the overall action of the bloq.\n",
1025+
"**Caution:** This wrapper should be used with care. It is up to the bloq author to ensure that\n",
1026+
"the controlled version of a decomposition containing `Always` bloqs still respects the\n",
1027+
"controlled protocol. That is, ignoring controls on these subbloqs wrapped in `Always` should not\n",
1028+
"change the action of the overall bloq with respect to the reference controlled implementation.\n",
10271029
"\n",
10281030
"#### Parameters\n",
10291031
" - `subbloq`: The bloq to always apply, irrespective of any controls.\n"

0 commit comments

Comments
 (0)