Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Coull committed Apr 8, 2024
1 parent 1d17706 commit e56f921
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions test/unit_tests/braket/ahs/test_analog_hamiltonian_simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,18 +177,18 @@ def test_discretize(register, driving_field, shifting_field):
"values": ["-125664000.0", "-125664000.0", "125664000.0", "125664000.0"],
},
}
assert (
local_detuning = (
discretized_json["hamiltonian"]["shiftingFields"][0]["magnitude"]
if discretized_json["hamiltonian"] in discretized_json["hamiltonian"].keys()
if "shiftingFields" in discretized_json["hamiltonian"].keys()
else discretized_json["hamiltonian"]["localDetuning"][0]["magnitude"]
== {
"pattern": ["0.50", "1.00", "0.50", "0.50", "0.50", "0.50"],
"time_series": {
"times": ["0E-9", "0.000003000"],
"values": ["-125664000.0", "125664000.0"],
},
}
)
assert local_detuning == {
"pattern": ["0.50", "1.00", "0.50", "0.50", "0.50", "0.50"],
"time_series": {
"times": ["0E-9", "0.000003000"],
"values": ["-125664000.0", "125664000.0"],
},
}


def test_converting_numpy_array_sites_to_ir(driving_field):
Expand Down

0 comments on commit e56f921

Please sign in to comment.