Skip to content

Commit d8433de

Browse files
committed
make _get_ctrl_spec a class method
1 parent 15b78c5 commit d8433de

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

qualtran/_infra/gate_with_registers.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,8 +371,9 @@ def __pow__(self, power: int) -> 'GateWithRegisters':
371371
return Power(bloq, abs(power))
372372
raise NotImplementedError(f"{self} does not implemented __pow__ for {power=}.")
373373

374+
@classmethod
374375
def _get_ctrl_spec(
375-
self,
376+
cls,
376377
num_controls: Union[Optional[int], 'CtrlSpec'] = None,
377378
control_values=None,
378379
control_qid_shape: Optional[Tuple[int, ...]] = None,

0 commit comments

Comments
 (0)