Skip to content

Commit

Permalink
Merge pull request #248 from unitaryfund/use-global-error-rates
Browse files Browse the repository at this point in the history
Change QV error rates back to global variables
  • Loading branch information
Misty-W authored Feb 21, 2025
2 parents d7250ce + 6f0da36 commit ed9149d
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions benchmarks/scripts/expval_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,17 +185,16 @@ def estimate_heavy_output_prob(
heavy_bitstrings = get_heavy_bitstrings(circuit)

if noisy:
qv_1q_err = 0.002
qv_2q_err = 0.02
simulator = AerSimulator(
method="statevector",
noise_model=create_depolarizing_noise_model(
circuit, SINGLE_QUBIT_ERROR_RATE, TWO_QUBIT_ERROR_RATE
),
)
else:
qv_1q_err = 0.0
qv_2q_err = 0.0
simulator = AerSimulator(
method="statevector",
noise_model=create_depolarizing_noise_model(
circuit, qv_1q_err, qv_2q_err
),
)
simulator = AerSimulator(
method="statevector",
)
result = simulator.run(circuit).result()

heavy_counts = sum(
Expand Down

0 comments on commit ed9149d

Please sign in to comment.