Skip to content

Commit 22dc868

Browse files
committed
fixes ApplyLthBloq as it lacked the correct adjoint method
1 parent fc468b2 commit 22dc868

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

qualtran/bloqs/multiplexers/apply_lth_bloq.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,14 @@ def get_ctrl_system(self, ctrl_spec: 'CtrlSpec') -> Tuple['Bloq', 'AddControlled
127127
get_ctrl_bloq_and_ctrl_reg_name=lambda cv: (evolve(self, control_val=cv), 'control'),
128128
)
129129

130+
def adjoint(self) -> 'Bloq':
131+
from qualtran.bloqs.mcmt.specialized_ctrl import (
132+
AdjointWithSpecializedCtrl,
133+
SpecializeOnCtrlBit,
134+
)
135+
136+
return AdjointWithSpecializedCtrl(self, SpecializeOnCtrlBit.BOTH)
137+
130138

131139
@bloq_example
132140
def _apply_lth_bloq() -> ApplyLthBloq:

0 commit comments

Comments
 (0)