Skip to content

Commit

Permalink
Fixing various typing issues
Browse files Browse the repository at this point in the history
  • Loading branch information
max-radin committed Jan 20, 2024
1 parent 4af3cdc commit abefda2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/orquestra/quantum/circuits/_gates.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,8 @@ def bind(self, symbols_map) -> "MatrixFactoryGate":
def replace_params(self, new_params: Tuple[Parameter, ...]) -> "MatrixFactoryGate":
return replace(self, params=new_params)

def controlled(self, num_controlled_qubits: int) -> Gate:
return ControlledGate(self, num_controlled_qubits)
def controlled(self, num_control_qubits: int) -> Gate:
return ControlledGate(self, num_control_qubits)

@property
def dagger(self) -> Union["MatrixFactoryGate", Gate]:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def production(self, operation: GateOperation) -> Iterable[GateOperation]:
def preprocess_gate(gate):
return (
gate.controlled(operation.gate.num_control_qubits)
if operation.gate.name == "Control"
if isinstance(operation.gate, ControlledGate)
else gate
)

Expand Down

0 comments on commit abefda2

Please sign in to comment.