Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
purva-thakre committed Sep 13, 2024
1 parent 7708f50 commit 003d3a1
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions mitiq/lre/tests/test_lre.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,18 @@ def execute(circuit, noise_level=0.025):
noisy_val = execute(test_cirq)


def test_lre_exp_value():
@pytest.mark.parametrize(
"input_degree, input_fold_multiplier", [(2, 2), (2, 3), (3, 4)]
)
def test_lre_exp_value(input_degree, input_fold_multiplier):
"""Verify LRE executors work as expected."""
ideal_val = execute(test_cirq, noise_level=0)
assert abs(ideal_val - noisy_val) > 0
lre_exp_val = execute_with_lre(
test_cirq, execute, degree=2, fold_multiplier=2
test_cirq,
execute,
degree=input_degree,
fold_multiplier=input_fold_multiplier,
)
assert lre_exp_val > noisy_val

Expand Down

0 comments on commit 003d3a1

Please sign in to comment.