Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Coull committed Sep 6, 2024
1 parent f35947e commit a888b09
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/braket/devices/local_simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def run(
| AnalogHamiltonianSimulation
| SerializableProgram,
shots: int = 0,
inputs: dict[str, float] | None = None,
inputs: Optional[dict[str, float]] = None, # noqa: UP007
*args: Any,
**kwargs: Any,
) -> LocalQuantumTask:
Expand Down Expand Up @@ -259,7 +259,7 @@ def _construct_payload(
raise NotImplementedError(f"Unsupported task type {type(task_specification)}")

@_construct_payload.register
def _(self, circuit: Circuit, inputs: dict[str, float] | None, shots: int | None):
def _(self, circuit: Circuit, inputs: Optional[dict[str, float], None], shots: Optional[int]): # noqa: UP007
simulator = self._delegate
if DeviceActionType.OPENQASM in simulator.properties.action:
validate_circuit_and_shots(circuit, shots)
Expand All @@ -272,7 +272,7 @@ def _(self, circuit: Circuit, inputs: dict[str, float] | None, shots: int | None
raise NotImplementedError(f"{type(simulator)} does not support qubit gate-based programs")

@_construct_payload.register
def _(self, program: OpenQASMProgram, inputs: dict[str, float] | None, _shots: int):
def _(self, program: OpenQASMProgram, inputs: Optional[dict[str, float]], _shots: int): # noqa: UP007
simulator = self._delegate
if DeviceActionType.OPENQASM not in simulator.properties.action:
raise NotImplementedError(f"{type(simulator)} does not support OpenQASM programs")
Expand Down

0 comments on commit a888b09

Please sign in to comment.