From 95f53754db114a9e8d8a2dc1fe55852063b0a899 Mon Sep 17 00:00:00 2001 From: Nagji Date: Wed, 24 Jul 2024 10:16:34 -0700 Subject: [PATCH 1/9] feat: Make MAX_NET_DETUNING optional for AHS validation. --- .../rydberg/validators/capabilities_constants.py | 4 ++-- .../rydberg/validators/program.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/braket/analog_hamiltonian_simulator/rydberg/validators/capabilities_constants.py b/src/braket/analog_hamiltonian_simulator/rydberg/validators/capabilities_constants.py index 451b800b..30f3064f 100644 --- a/src/braket/analog_hamiltonian_simulator/rydberg/validators/capabilities_constants.py +++ b/src/braket/analog_hamiltonian_simulator/rydberg/validators/capabilities_constants.py @@ -10,8 +10,8 @@ # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. - from decimal import Decimal +from typing import Optional from pydantic import PositiveInt from pydantic.v1.main import BaseModel @@ -33,4 +33,4 @@ class CapabilitiesConstants(BaseModel): MAGNITUDE_PATTERN_VALUE_MIN: Decimal MAGNITUDE_PATTERN_VALUE_MAX: Decimal - MAX_NET_DETUNING: Decimal + MAX_NET_DETUNING: Optional[Decimal] diff --git a/src/braket/analog_hamiltonian_simulator/rydberg/validators/program.py b/src/braket/analog_hamiltonian_simulator/rydberg/validators/program.py index e7afb004..aaca759e 100644 --- a/src/braket/analog_hamiltonian_simulator/rydberg/validators/program.py +++ b/src/braket/analog_hamiltonian_simulator/rydberg/validators/program.py @@ -61,7 +61,7 @@ def net_detuning_must_not_exceed_max_net_detuning(cls, values): # If no local detuning, we simply return the values # because there are separate validators to validate # the global driving fields in the program - if not len(local_detuning): + if not len(local_detuning) or not capabilities.MAX_NET_DETUNING: return values detuning_times = [ From eb400a3947437148d3df513c97db3a427bb52740 Mon Sep 17 00:00:00 2001 From: Nagji Date: Wed, 24 Jul 2024 10:44:01 -0700 Subject: [PATCH 2/9] feat: Add field validator helpers --- .../validators/field_validator_util.py | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/src/braket/analog_hamiltonian_simulator/rydberg/validators/field_validator_util.py b/src/braket/analog_hamiltonian_simulator/rydberg/validators/field_validator_util.py index e34fadea..aefb1ce5 100644 --- a/src/braket/analog_hamiltonian_simulator/rydberg/validators/field_validator_util.py +++ b/src/braket/analog_hamiltonian_simulator/rydberg/validators/field_validator_util.py @@ -104,3 +104,50 @@ def validate_net_detuning_with_warning( # Return immediately if there is an atom has net detuning # exceeding MAX_NET_DETUNING at a time point return program + + +# Two time points cannot be too close, assuming the time points are sorted ascendingly +def validate_time_separation(times: List[Decimal], min_time_separation: Decimal, name: str): + for i in range(len(times) - 1): + time_diff = times[i + 1] - times[i] + if time_diff < min_time_separation: + raise ValueError( + f"Time points of {name} time_series, {i} ({times[i]}) and " + f"{i + 1} ({times[i + 1]}), are too close; they are separated " + f"by {time_diff} seconds. It must be at least {min_time_separation} seconds" + ) + + +def validate_value_precision(values: List[Decimal], max_precision: Decimal, name: str): + # Raise ValueError if at any item in the values is beyond the max allowable precision + for idx, v in enumerate(values): + if v % max_precision != 0: + raise ValueError( + f"Value {idx} ({v}) in {name} time_series is defined with too many digits; " + f"it must be an integer multiple of {max_precision}" + ) + + +def validate_max_absolute_slope( + times: List[Decimal], values: List[Decimal], max_slope: Decimal, name: str +): + # Raise ValueError if at any time the time series (times, values) + # rises/falls faster than allowed + for idx in range(len(values) - 1): + slope = (values[idx + 1] - values[idx]) / (times[idx + 1] - times[idx]) + if abs(slope) > max_slope: + raise ValueError( + f"For the {name} field, rate of change of values " + f"(between the {idx}-th and the {idx + 1}-th times) " + f"is {abs(slope)}, more than {max_slope}" + ) + + +def validate_time_precision(times: List[Decimal], time_precision: Decimal, name: str): + for idx, t in enumerate(times): + if t % time_precision != 0: + raise ValueError( + f"time point {idx} ({t}) of {name} time_series is " + f"defined with too many digits; it must be an " + f"integer multiple of {time_precision}" + ) From b925289e6c037793c2cedb1a6939043f056c9224 Mon Sep 17 00:00:00 2001 From: Nagji Date: Fri, 26 Jul 2024 18:05:51 -0700 Subject: [PATCH 3/9] test: Add field validators unit tests --- .../validators/test_field_validator_utils.py | 144 ++++++++++++++++++ 1 file changed, 144 insertions(+) create mode 100644 test/unit_tests/braket/analog_hamiltonian_simulator/test_validator/validators/test_field_validator_utils.py diff --git a/test/unit_tests/braket/analog_hamiltonian_simulator/test_validator/validators/test_field_validator_utils.py b/test/unit_tests/braket/analog_hamiltonian_simulator/test_validator/validators/test_field_validator_utils.py new file mode 100644 index 00000000..5d710838 --- /dev/null +++ b/test/unit_tests/braket/analog_hamiltonian_simulator/test_validator/validators/test_field_validator_utils.py @@ -0,0 +1,144 @@ +from decimal import Decimal + +import pytest + +from braket.analog_hamiltonian_simulator.rydberg.validators.field_validator_util import ( + validate_max_absolute_slope, + validate_time_precision, + validate_time_separation, + validate_value_precision, +) + + +@pytest.mark.parametrize( + "times, min_time_separation, fail", + [ + ( + [Decimal("0.0"), Decimal("1e-5"), Decimal("2e-5"), Decimal("2.5"), Decimal("4")], + Decimal("1e-3"), + True, + ), + ( + [Decimal("0.0"), Decimal("1e-5"), Decimal("2e-5"), Decimal("2.5"), Decimal("4")], + Decimal("1e-6"), + False, + ), + ( + [Decimal("0.0"), Decimal("1"), Decimal("2"), Decimal("3"), Decimal("4")], + Decimal("1e-3"), + False, + ), + ], +) +def test_validate_time_separation(times, min_time_separation, fail): + if fail: + with pytest.raises(ValueError): + validate_time_separation(times, min_time_separation, "test") + else: + try: + validate_time_separation(times, min_time_separation, "test") + except ValueError as e: + pytest.fail(f"Failed valid validate_min_time_separation: {str(e)}") + + +@pytest.mark.parametrize( + "values, max_precision, fail", + [ + ( + [Decimal("0.0"), Decimal("1e-5"), Decimal("2e-5"), Decimal("2.5"), Decimal("4")], + Decimal("1e-3"), + True, + ), + ( + [Decimal("0.0"), Decimal("1e-9"), Decimal("2e-5"), Decimal("3e-4"), Decimal("5.0")], + Decimal("1e-6"), + True, + ), + ( + [ + Decimal("0.0"), + Decimal("0.00089"), + Decimal("2e-4"), + Decimal("0.003"), + Decimal("0.21"), + Decimal("1"), + ], + Decimal("1e-5"), + False, + ), + ], +) +def test_validate_value_precision(values, max_precision, fail): + if fail: + with pytest.raises(ValueError): + validate_value_precision(values, max_precision, "test") + else: + try: + validate_value_precision(values, max_precision, "test") + except ValueError as e: + pytest.fail(f"Failed valid validate_value_precision: {str(e)}") + + +@pytest.mark.parametrize( + "times, values, max_slope, fail", + [ + ( + [Decimal("0.0"), Decimal("1.0"), Decimal("2.0"), Decimal("3.0")], + [Decimal("0.0"), Decimal("2.1"), Decimal("3.2"), Decimal("3.9")], + Decimal("2.0"), + True, + ), + ( + [Decimal("0.0"), Decimal("1e-5"), Decimal("2e-5"), Decimal("3")], + [Decimal("0.0"), Decimal("1.2"), Decimal("2.34"), Decimal("2.39")], + Decimal("1.5e5"), + False, + ), + ( + [Decimal("0.0"), Decimal("1.0"), Decimal("2e-5"), Decimal("3")], + [Decimal("0.0"), Decimal("1.2"), Decimal("2.34"), Decimal("2.39")], + Decimal("1e4"), + False, + ), + ], +) +def test_validate_max_absolute_slope(times, values, max_slope, fail): + if fail: + with pytest.raises(ValueError): + validate_max_absolute_slope(times, values, max_slope, "test") + else: + try: + validate_max_absolute_slope(times, values, max_slope, "test") + except ValueError as e: + pytest.fail(f"Failed valid validate_max_absolute_slope: {str(e)}") + + +@pytest.mark.parametrize( + "times, max_precision, fail", + [ + ( + [Decimal("0.0"), Decimal("1e-5"), Decimal("2e-5"), Decimal("2.5"), Decimal("4")], + Decimal("1.3"), + True, + ), + ( + [Decimal("0.0"), Decimal("1e-9"), Decimal("2e-5"), Decimal("3e-4"), Decimal("5.0")], + Decimal("1e-6"), + True, + ), + ( + [Decimal("0"), Decimal("1e-07"), Decimal("3.9e-06"), Decimal("4e-06")], + Decimal("1e-09"), + False, + ), + ], +) +def test_validate_time_precision(times, max_precision, fail): + if fail: + with pytest.raises(ValueError): + validate_time_precision(times, max_precision, "test") + else: + try: + validate_time_precision(times, max_precision, "test") + except ValueError as e: + pytest.fail(f"Failed valid validate_min_time_precision: {str(e)}") From ef866105fafdbae63ad7f6fef714f702bc4a55de Mon Sep 17 00:00:00 2001 From: Nagji Date: Wed, 31 Jul 2024 14:57:12 -0700 Subject: [PATCH 4/9] change: Add additional documentation to field_validatior functions. --- .../validators/field_validator_util.py | 64 ++++++++++++++++--- 1 file changed, 55 insertions(+), 9 deletions(-) diff --git a/src/braket/analog_hamiltonian_simulator/rydberg/validators/field_validator_util.py b/src/braket/analog_hamiltonian_simulator/rydberg/validators/field_validator_util.py index aefb1ce5..83348c7f 100644 --- a/src/braket/analog_hamiltonian_simulator/rydberg/validators/field_validator_util.py +++ b/src/braket/analog_hamiltonian_simulator/rydberg/validators/field_validator_util.py @@ -106,8 +106,21 @@ def validate_net_detuning_with_warning( return program -# Two time points cannot be too close, assuming the time points are sorted ascendingly -def validate_time_separation(times: List[Decimal], min_time_separation: Decimal, name: str): +def validate_time_separation(times: List[Decimal], min_time_separation: Decimal, name: str) -> None: + """ + Used in Device Emulation; Validate that the time points in a time series are separated by at + least min_time_separation. + + Args: + times (List[Decimal]): A list of time points in a time series. + min_time_separation (Decimal): The minimal amount of time any two time points should be + separated by. + name (str): The name of the time series, used for logging. + + Raises: + ValueError: If any two subsequent time points (assuming the time points are sorted + in ascending order) are separated by less than min_time_separation. + """ for i in range(len(times) - 1): time_diff = times[i + 1] - times[i] if time_diff < min_time_separation: @@ -117,9 +130,19 @@ def validate_time_separation(times: List[Decimal], min_time_separation: Decimal, f"by {time_diff} seconds. It must be at least {min_time_separation} seconds" ) - -def validate_value_precision(values: List[Decimal], max_precision: Decimal, name: str): - # Raise ValueError if at any item in the values is beyond the max allowable precision +def validate_value_precision(values: List[Decimal], max_precision: Decimal, name: str) -> None: + """ + Used in Device Emulation; Validate that the precision of a set of values do not + exceed max_precision. + + Args: + times (List[Decimal]): A list of values from a time series to validate. + max_precision (Decimal): The maximum allowed precision. + name (str): The name of the time series, used for logging. + + Raises: + ValueError: If any of the given values is defined with precision exceeding max_precision. + """ for idx, v in enumerate(values): if v % max_precision != 0: raise ValueError( @@ -127,12 +150,23 @@ def validate_value_precision(values: List[Decimal], max_precision: Decimal, name f"it must be an integer multiple of {max_precision}" ) - def validate_max_absolute_slope( times: List[Decimal], values: List[Decimal], max_slope: Decimal, name: str ): - # Raise ValueError if at any time the time series (times, values) - # rises/falls faster than allowed + """ + Used in Device Emulation; Validate that the magnitude of the slope between any + two subsequent points in a time series (time points provided in ascending order) does not + exceed max_slope. + + Args: + times (List[Decimal]): A list of time points in a time series. + max_slope (Decimal): The maximum allowed rate of change between points in the time series. + name (str): The name of the time series, used for logging. + + Raises: + ValueError: if at any time the time series (times, values) + rises/falls faster than allowed. + """ for idx in range(len(values) - 1): slope = (values[idx + 1] - values[idx]) / (times[idx + 1] - times[idx]) if abs(slope) > max_slope: @@ -142,8 +176,20 @@ def validate_max_absolute_slope( f"is {abs(slope)}, more than {max_slope}" ) - def validate_time_precision(times: List[Decimal], time_precision: Decimal, name: str): + """ + Used in Device Emulation; Validate that the precision of a set of time points do not + exceed max_precision. + + Args: + times (List[Decimal]): A list of time points to validate. + max_precision (Decimal): The maximum allowed precision. + name (str): The name of the time series, used for logging. + + Raises: + ValueError: If any of the given time points is defined with + precision exceeding max_precision. + """ for idx, t in enumerate(times): if t % time_precision != 0: raise ValueError( From 20c1b54b0c956c661be712b4c4c226f3581d3796 Mon Sep 17 00:00:00 2001 From: Nagji Date: Wed, 31 Jul 2024 15:04:23 -0700 Subject: [PATCH 5/9] change: Add additional documentation to field_validatior functions & run linters. --- .../validators/field_validator_util.py | 49 ++++++++++--------- 1 file changed, 26 insertions(+), 23 deletions(-) diff --git a/src/braket/analog_hamiltonian_simulator/rydberg/validators/field_validator_util.py b/src/braket/analog_hamiltonian_simulator/rydberg/validators/field_validator_util.py index 83348c7f..4f657842 100644 --- a/src/braket/analog_hamiltonian_simulator/rydberg/validators/field_validator_util.py +++ b/src/braket/analog_hamiltonian_simulator/rydberg/validators/field_validator_util.py @@ -108,16 +108,16 @@ def validate_net_detuning_with_warning( def validate_time_separation(times: List[Decimal], min_time_separation: Decimal, name: str) -> None: """ - Used in Device Emulation; Validate that the time points in a time series are separated by at - least min_time_separation. - + Used in Device Emulation; Validate that the time points in a time series are separated by at + least min_time_separation. + Args: - times (List[Decimal]): A list of time points in a time series. - min_time_separation (Decimal): The minimal amount of time any two time points should be - separated by. + times (List[Decimal]): A list of time points in a time series. + min_time_separation (Decimal): The minimal amount of time any two time points should be + separated by. name (str): The name of the time series, used for logging. - - Raises: + + Raises: ValueError: If any two subsequent time points (assuming the time points are sorted in ascending order) are separated by less than min_time_separation. """ @@ -130,17 +130,18 @@ def validate_time_separation(times: List[Decimal], min_time_separation: Decimal, f"by {time_diff} seconds. It must be at least {min_time_separation} seconds" ) + def validate_value_precision(values: List[Decimal], max_precision: Decimal, name: str) -> None: """ Used in Device Emulation; Validate that the precision of a set of values do not exceed max_precision. - + Args: - times (List[Decimal]): A list of values from a time series to validate. - max_precision (Decimal): The maximum allowed precision. + times (List[Decimal]): A list of values from a time series to validate. + max_precision (Decimal): The maximum allowed precision. name (str): The name of the time series, used for logging. - - Raises: + + Raises: ValueError: If any of the given values is defined with precision exceeding max_precision. """ for idx, v in enumerate(values): @@ -150,20 +151,21 @@ def validate_value_precision(values: List[Decimal], max_precision: Decimal, name f"it must be an integer multiple of {max_precision}" ) + def validate_max_absolute_slope( times: List[Decimal], values: List[Decimal], max_slope: Decimal, name: str ): """ - Used in Device Emulation; Validate that the magnitude of the slope between any + Used in Device Emulation; Validate that the magnitude of the slope between any two subsequent points in a time series (time points provided in ascending order) does not exceed max_slope. - + Args: - times (List[Decimal]): A list of time points in a time series. + times (List[Decimal]): A list of time points in a time series. max_slope (Decimal): The maximum allowed rate of change between points in the time series. name (str): The name of the time series, used for logging. - - Raises: + + Raises: ValueError: if at any time the time series (times, values) rises/falls faster than allowed. """ @@ -176,17 +178,18 @@ def validate_max_absolute_slope( f"is {abs(slope)}, more than {max_slope}" ) + def validate_time_precision(times: List[Decimal], time_precision: Decimal, name: str): """ Used in Device Emulation; Validate that the precision of a set of time points do not exceed max_precision. - + Args: - times (List[Decimal]): A list of time points to validate. - max_precision (Decimal): The maximum allowed precision. + times (List[Decimal]): A list of time points to validate. + max_precision (Decimal): The maximum allowed precision. name (str): The name of the time series, used for logging. - - Raises: + + Raises: ValueError: If any of the given time points is defined with precision exceeding max_precision. """ From 3827b9505a1f275752ca1c2318564c69d48ccec6 Mon Sep 17 00:00:00 2001 From: Cody Wang Date: Wed, 15 Oct 2025 23:49:31 -0700 Subject: [PATCH 6/9] idiomatic typinh --- .../rydberg/validators/capabilities_constants.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/braket/analog_hamiltonian_simulator/rydberg/validators/capabilities_constants.py b/src/braket/analog_hamiltonian_simulator/rydberg/validators/capabilities_constants.py index 30f3064f..aebf7bb9 100644 --- a/src/braket/analog_hamiltonian_simulator/rydberg/validators/capabilities_constants.py +++ b/src/braket/analog_hamiltonian_simulator/rydberg/validators/capabilities_constants.py @@ -10,8 +10,8 @@ # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. + from decimal import Decimal -from typing import Optional from pydantic import PositiveInt from pydantic.v1.main import BaseModel @@ -33,4 +33,4 @@ class CapabilitiesConstants(BaseModel): MAGNITUDE_PATTERN_VALUE_MIN: Decimal MAGNITUDE_PATTERN_VALUE_MAX: Decimal - MAX_NET_DETUNING: Optional[Decimal] + MAX_NET_DETUNING: Decimal | None From 6dc475518b0eb52f0ad3648ee85f32a11a7de073 Mon Sep 17 00:00:00 2001 From: Cody Wang Date: Wed, 15 Oct 2025 23:50:40 -0700 Subject: [PATCH 7/9] Add copyright and license information to test file Added copyright notice and licensing information to the test file. --- .../validators/test_field_validator_utils.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/unit_tests/braket/analog_hamiltonian_simulator/test_validator/validators/test_field_validator_utils.py b/test/unit_tests/braket/analog_hamiltonian_simulator/test_validator/validators/test_field_validator_utils.py index 5d710838..1ecefdd8 100644 --- a/test/unit_tests/braket/analog_hamiltonian_simulator/test_validator/validators/test_field_validator_utils.py +++ b/test/unit_tests/braket/analog_hamiltonian_simulator/test_validator/validators/test_field_validator_utils.py @@ -1,3 +1,16 @@ +# Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + from decimal import Decimal import pytest From 62871b9136911d50c05c9f7a6bd3057c96cde7eb Mon Sep 17 00:00:00 2001 From: Cody Wang Date: Wed, 15 Oct 2025 23:53:23 -0700 Subject: [PATCH 8/9] Change List type hints to lowercase 'list' --- .../rydberg/validators/field_validator_util.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/braket/analog_hamiltonian_simulator/rydberg/validators/field_validator_util.py b/src/braket/analog_hamiltonian_simulator/rydberg/validators/field_validator_util.py index 53a53379..468dd7fa 100644 --- a/src/braket/analog_hamiltonian_simulator/rydberg/validators/field_validator_util.py +++ b/src/braket/analog_hamiltonian_simulator/rydberg/validators/field_validator_util.py @@ -60,7 +60,7 @@ def validate_net_detuning_with_warning( program (Program): The given program time_points (np.ndarray): The time points for both global and local detunings global_detuning_coefs (np.ndarray): The values of global detuning - local_detuning_patterns (List): The pattern of local detuning + local_detuning_patterns (list): The pattern of local detuning local_detuning_coefs (np.ndarray): The values of local detuning capabilities (CapabilitiesConstants): The capability constants @@ -104,13 +104,13 @@ def validate_net_detuning_with_warning( return program -def validate_time_separation(times: List[Decimal], min_time_separation: Decimal, name: str) -> None: +def validate_time_separation(times: list[Decimal], min_time_separation: Decimal, name: str) -> None: """ Used in Device Emulation; Validate that the time points in a time series are separated by at least min_time_separation. Args: - times (List[Decimal]): A list of time points in a time series. + times (list[Decimal]): A list of time points in a time series. min_time_separation (Decimal): The minimal amount of time any two time points should be separated by. name (str): The name of the time series, used for logging. @@ -129,13 +129,13 @@ def validate_time_separation(times: List[Decimal], min_time_separation: Decimal, ) -def validate_value_precision(values: List[Decimal], max_precision: Decimal, name: str) -> None: +def validate_value_precision(values: list[Decimal], max_precision: Decimal, name: str) -> None: """ Used in Device Emulation; Validate that the precision of a set of values do not exceed max_precision. Args: - times (List[Decimal]): A list of values from a time series to validate. + times (list[Decimal]): A list of values from a time series to validate. max_precision (Decimal): The maximum allowed precision. name (str): The name of the time series, used for logging. @@ -151,7 +151,7 @@ def validate_value_precision(values: List[Decimal], max_precision: Decimal, name def validate_max_absolute_slope( - times: List[Decimal], values: List[Decimal], max_slope: Decimal, name: str + times: list[Decimal], values: List[Decimal], max_slope: Decimal, name: str ): """ Used in Device Emulation; Validate that the magnitude of the slope between any @@ -159,7 +159,7 @@ def validate_max_absolute_slope( exceed max_slope. Args: - times (List[Decimal]): A list of time points in a time series. + times (list[Decimal]): A list of time points in a time series. max_slope (Decimal): The maximum allowed rate of change between points in the time series. name (str): The name of the time series, used for logging. @@ -177,13 +177,13 @@ def validate_max_absolute_slope( ) -def validate_time_precision(times: List[Decimal], time_precision: Decimal, name: str): +def validate_time_precision(times: list[Decimal], time_precision: Decimal, name: str): """ Used in Device Emulation; Validate that the precision of a set of time points do not exceed max_precision. Args: - times (List[Decimal]): A list of time points to validate. + times (list[Decimal]): A list of time points to validate. max_precision (Decimal): The maximum allowed precision. name (str): The name of the time series, used for logging. From 3731450b99ae95d32394f1f4df98a79f10a378e8 Mon Sep 17 00:00:00 2001 From: Cody Wang Date: Wed, 15 Oct 2025 23:54:12 -0700 Subject: [PATCH 9/9] Fix type hint for values parameter in validate_max_absolute_slope --- .../rydberg/validators/field_validator_util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/braket/analog_hamiltonian_simulator/rydberg/validators/field_validator_util.py b/src/braket/analog_hamiltonian_simulator/rydberg/validators/field_validator_util.py index 468dd7fa..76987086 100644 --- a/src/braket/analog_hamiltonian_simulator/rydberg/validators/field_validator_util.py +++ b/src/braket/analog_hamiltonian_simulator/rydberg/validators/field_validator_util.py @@ -151,7 +151,7 @@ def validate_value_precision(values: list[Decimal], max_precision: Decimal, name def validate_max_absolute_slope( - times: list[Decimal], values: List[Decimal], max_slope: Decimal, name: str + times: list[Decimal], values: list[Decimal], max_slope: Decimal, name: str ): """ Used in Device Emulation; Validate that the magnitude of the slope between any