@@ -92,8 +92,8 @@ def __init__(
9292
9393 Args:
9494 arn (str): The ARN of the device
95- aws_session (Optional[ AwsSession] ): An AWS session object. Default is `None`.
96- noise_model (Optional[ NoiseModel] ): The Braket noise model to apply to the circuit
95+ aws_session (AwsSession | None ): An AWS session object. Default is `None`.
96+ noise_model (NoiseModel | None ): The Braket noise model to apply to the circuit
9797 before execution. Noise model can only be added to the devices that support
9898 noise simulation.
9999
@@ -142,20 +142,20 @@ def run(
142142 task_specification (TaskSpecification):
143143 Specification of quantum task (circuit, OpenQASM program, program set,
144144 pulse sequence or AHS program) to run on the device.
145- s3_destination_folder (Optional[ S3DestinationFolder] ): The S3 location to
145+ s3_destination_folder (S3DestinationFolder | None ): The S3 location to
146146 save the quantum task's results to. Default is `<default_bucket>/tasks` if evoked outside a
147147 Braket Hybrid Job, `<Job Bucket>/jobs/<job name>/tasks` if evoked inside a Braket Hybrid Job.
148- shots (Optional[ int] ): The number of times to run the circuit or annealing problem.
148+ shots (int | None ): The number of times to run the circuit or annealing problem.
149149 Default is 1000 for QPUs and 0 for simulators.
150150 poll_timeout_seconds (float): The polling timeout for `AwsQuantumTask.result()`,
151151 in seconds. Default: 5 days.
152- poll_interval_seconds (Optional[ float] ): The polling interval for `AwsQuantumTask.result()`,
152+ poll_interval_seconds (float | None ): The polling interval for `AwsQuantumTask.result()`,
153153 in seconds. Defaults to the ``getTaskPollIntervalMillis`` value specified in
154154 ``self.properties.service`` (divided by 1000) if provided, otherwise 1 second.
155- inputs (Optional[ dict[str, float]] ): Inputs to be passed along with the
155+ inputs (dict[str, float] | None ): Inputs to be passed along with the
156156 IR. If the IR supports inputs, the inputs will be updated with this value.
157157 Default: {}.
158- gate_definitions (Optional[ dict[tuple[Gate, QubitSet], PulseSequence]] ): A
158+ gate_definitions (dict[tuple[Gate, QubitSet], PulseSequence] | None ): A
159159 `dict[tuple[Gate, QubitSet], PulseSequence]]` for a user defined gate calibration.
160160 The calibration is defined for a particular `Gate` on a particular `QubitSet`
161161 and is represented by a `PulseSequence`.
@@ -244,12 +244,12 @@ def run_batch(
244244 task_specifications (TaskSpecification | list[TaskSpecification]):
245245 Single instance or list of task specifications (circuits, OpenQASM programs,
246246 pulse sequences or AHS programs) to run on the device.
247- s3_destination_folder (Optional[ S3DestinationFolder] ): The S3 location to
247+ s3_destination_folder (S3DestinationFolder | None ): The S3 location to
248248 save the quantum tasks' results to. Default is `<default_bucket>/tasks` if evoked outside a
249249 Braket Job, `<Job Bucket>/jobs/<job name>/tasks` if evoked inside a Braket Job.
250- shots (Optional[ int] ): The number of times to run the circuit or annealing problem.
250+ shots (int | None ): The number of times to run the circuit or annealing problem.
251251 Default is 1000 for QPUs and 0 for simulators.
252- max_parallel (Optional[ int] ): The maximum number of quantum tasks to run on AWS in parallel.
252+ max_parallel (int | None ): The maximum number of quantum tasks to run on AWS in parallel.
253253 Batch creation will fail if this value is greater than the maximum allowed
254254 concurrent quantum tasks on the device. Default: 10
255255 max_connections (int): The maximum number of connections in the Boto3 connection pool.
@@ -259,14 +259,14 @@ def run_batch(
259259 poll_interval_seconds (float): The polling interval for `AwsQuantumTask.result()`,
260260 in seconds. Defaults to the ``getTaskPollIntervalMillis`` value specified in
261261 ``self.properties.service`` (divided by 1000) if provided, otherwise 1 second.
262- inputs (Optional[ dict[str, float] | list[dict[str, float]]] ): Inputs to be
262+ inputs (dict[str, float] | list[dict[str, float]] | None ): Inputs to be
263263 passed along with the IR. If the IR supports inputs, the inputs will be updated
264264 with this value. Default: {}.
265- gate_definitions (Optional[ dict[tuple[Gate, QubitSet], PulseSequence]] ): A
265+ gate_definitions (dict[tuple[Gate, QubitSet], PulseSequence] | None ): A
266266 `dict[tuple[Gate, QubitSet], PulseSequence]]` for a user defined gate calibration.
267267 The calibration is defined for a particular `Gate` on a particular `QubitSet`
268268 and is represented by a `PulseSequence`. Default: None.
269- reservation_arn (Optional[ str] ): The reservation ARN provided by Braket Direct
269+ reservation_arn (str | None ): The reservation ARN provided by Braket Direct
270270 to reserve exclusive usage for the device to run the quantum task on.
271271 Note: If you are creating tasks in a job that itself was created reservation ARN,
272272 those tasks do not need to be created with the reservation ARN.
@@ -409,7 +409,7 @@ def gate_calibrations(self) -> GateCalibrations | None:
409409 If a QPU does not expose these calibrations, None is returned.
410410
411411 Returns:
412- Optional[ GateCalibrations] : The calibration object. Returns `None` if the data
412+ GateCalibrations | None : The calibration object. Returns `None` if the data
413413 is not present.
414414 """
415415 if not self ._gate_calibrations :
@@ -610,18 +610,18 @@ def get_devices(
610610 >>> AwsDevice.get_devices(types=["SIMULATOR"])
611611
612612 Args:
613- arns (Optional[ list[str]] ): device ARN filter, default is `None`
614- names (Optional[ list[str]] ): device name filter, default is `None`
615- types (Optional[ list[AwsDeviceType]] ): device type filter, default is `None`
613+ arns (list[str] | None ): device ARN filter, default is `None`
614+ names (list[str] | None ): device name filter, default is `None`
615+ types (list[AwsDeviceType] | None ): device type filter, default is `None`
616616 QPUs will be searched for all regions and simulators will only be
617617 searched for the region of the current session.
618- statuses (Optional[ list[str]] ): device status filter, default is `None`. When `None`
618+ statuses (list[str] | None ): device status filter, default is `None`. When `None`
619619 is used, RETIRED devices will not be returned. To include RETIRED devices in
620620 the results, use a filter that includes "RETIRED" for this parameter.
621- provider_names (Optional[ list[str]] ): provider name filter, default is `None`
621+ provider_names (list[str] | None ): provider name filter, default is `None`
622622 order_by (str): field to order result by, default is `name`.
623623 Accepted values are ['arn', 'name', 'type', 'provider_name', 'status']
624- aws_session (Optional[ AwsSession] ): An AWS session object.
624+ aws_session (AwsSession | None ): An AWS session object.
625625 Default is `None`.
626626
627627 Raises:
@@ -782,7 +782,7 @@ def refresh_gate_calibrations(self) -> GateCalibrations | None:
782782 URLError: If the URL provided returns a non 2xx response.
783783
784784 Returns:
785- Optional[ GateCalibrations] : the calibration data for the device. None
785+ GateCalibrations | None : the calibration data for the device. None
786786 is returned if the device does not have a gate calibrations URL associated.
787787 """
788788 if (
0 commit comments