Skip to content

Commit

Permalink
remove unnecessary check
Browse files Browse the repository at this point in the history
  • Loading branch information
yitchen-tim committed May 10, 2024
1 parent ea838f1 commit db3f71a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/braket/aws/aws_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def __init__(
self._aws_session = self._get_session_and_initialize(aws_session or AwsSession())
self._ports = None
self._frames = None
self.set_noise_model(noise_model)
self._noise_model = noise_model

def run(
self,
Expand Down
3 changes: 1 addition & 2 deletions src/braket/devices/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,7 @@ def set_noise_model(self, noise_model: NoiseModel) -> None:
execution. Noise model can only be added to the devices that support noise
simulation.
"""
if noise_model:
self._validate_device_noise_model_support(noise_model)
self._validate_device_noise_model_support(noise_model)
self._noise_model = noise_model

def _validate_device_noise_model_support(self, noise_model: NoiseModel) -> None:
Expand Down
2 changes: 1 addition & 1 deletion src/braket/devices/local_simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def __init__(
status="AVAILABLE",
)
self._delegate = delegate
self.set_noise_model(noise_model)
self._noise_model = noise_model

def run(
self,
Expand Down

0 comments on commit db3f71a

Please sign in to comment.