Skip to content

Commit

Permalink
fixed gradient test
Browse files Browse the repository at this point in the history
Signed-off-by: Melvin Strobl <[email protected]>
  • Loading branch information
Melvin Strobl committed Aug 26, 2024
1 parent 393b293 commit 34b7606
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/test_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ def test_parameters() -> None:
force_mean=test_case["force_mean"],
)

assert result.requires_grad == True, "No gradients available in output."
if test_case["shots"] < 0:
assert result.requires_grad == True, "No gradients available in output."

if isinstance(test_case["output_qubit"], list):
if test_case["force_mean"]:
Expand Down

0 comments on commit 34b7606

Please sign in to comment.