Skip to content

Commit

Permalink
try chunking to 2
Browse files Browse the repository at this point in the history
  • Loading branch information
purva-thakre committed Sep 13, 2024
1 parent c970474 commit 9146116
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions mitiq/lre/tests/test_lre.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

def execute(circuit, noise_level=0.025):
"""Default executor for all unit tests."""
# Replace with code based on your frontend and backend.
noisy_circuit = circuit.with_noise(depolarize(p=noise_level))
rho = DensityMatrixSimulator().simulate(noisy_circuit).final_density_matrix
return rho[0, 0].real
Expand Down Expand Up @@ -92,7 +91,7 @@ def test_lre_executor_with_chunking():
ideal_val = execute(test_cirq * 200, noise_level=0)
assert abs(ideal_val - noisy_val) > 0
lre_exp_val = execute_with_lre(
test_cirq, execute, degree=2, fold_multiplier=2, num_chunks=5
test_cirq, execute, degree=2, fold_multiplier=2, num_chunks=2
)
assert lre_exp_val > noisy_val

Expand Down

0 comments on commit 9146116

Please sign in to comment.