Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2274 Benchmark User Guide #2566

Open
wants to merge 33 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
eedd305
adding benchmark user guide
Shivansh20128 Nov 11, 2024
215ecf6
adding benchmark circuit names
Shivansh20128 Nov 12, 2024
e7c3a3b
adding content for ghz
Shivansh20128 Nov 12, 2024
99b6848
updated changes
Shivansh20128 Nov 12, 2024
3648c29
updating example
Shivansh20128 Nov 12, 2024
63da003
adding examples to doc
Shivansh20128 Nov 13, 2024
f6876c2
adding documentation for benchmark circuits
Shivansh20128 Nov 13, 2024
d8b9232
Update docs/source/guide/benchmarks.md
Shivansh20128 Nov 13, 2024
f6a1ed8
Update docs/source/guide/benchmarks.md
Shivansh20128 Nov 13, 2024
07e298b
Update docs/source/guide/benchmarks.md
Shivansh20128 Nov 13, 2024
f1b36bb
Update docs/source/guide/benchmarks.md
Shivansh20128 Nov 13, 2024
ccb5586
Update docs/source/guide/benchmarks.md
Shivansh20128 Nov 13, 2024
e94ae2e
Update docs/source/guide/benchmarks.md
Shivansh20128 Nov 13, 2024
0a90ac5
Update docs/source/guide/benchmarks.md
Shivansh20128 Nov 13, 2024
e5e6746
Update docs/source/guide/benchmarks.md
Shivansh20128 Nov 13, 2024
0a17fb6
Update docs/source/guide/benchmarks.md
Shivansh20128 Nov 13, 2024
f9bca24
suggestions added
Shivansh20128 Nov 13, 2024
030a819
Merge branch 'unitaryfund:main' into 2274-benchmark-user-guide
Shivansh20128 Nov 13, 2024
8e07d13
changing circuit size in examples
Shivansh20128 Nov 14, 2024
d3dcfab
Merge branch '2274-benchmark-user-guide' of https://github.com/Shivan…
Shivansh20128 Nov 14, 2024
e03961a
adding ideal state of circuits
Shivansh20128 Nov 15, 2024
302eea0
adding mirror circuits example
Shivansh20128 Nov 15, 2024
e06c969
Update docs/source/guide/benchmarks.md
Shivansh20128 Nov 19, 2024
f82f54d
Update docs/source/guide/benchmarks.md
Shivansh20128 Nov 19, 2024
48c94a1
modifying acc to suggestions
Shivansh20128 Nov 19, 2024
5217250
Update docs/source/guide/benchmarks.md
Shivansh20128 Nov 22, 2024
9492572
changing to benchmarking-circuits
Shivansh20128 Nov 22, 2024
c0df4e0
Merge branch '2274-benchmark-user-guide' of https://github.com/Shivan…
Shivansh20128 Nov 22, 2024
ce2f673
reordering benchmark circuits
Shivansh20128 Nov 22, 2024
afb5b46
addition in w_state circuits suggested by Purva
Shivansh20128 Nov 23, 2024
36eb87d
Update docs/source/guide/benchmarking-circuits.md
Shivansh20128 Nov 26, 2024
3e48c5e
adding example and references
Shivansh20128 Nov 26, 2024
0ca08d1
adding print circuit statement
Shivansh20128 Nov 27, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions docs/source/guide/benchmarks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
---
jupytext:
text_representation:
extension: .md
format_name: myst
format_version: 0.13
jupytext_version: 1.11.4
kernelspec:
display_name: Python 3
language: python
name: python3
---

# Benchmarks
Shivansh20128 marked this conversation as resolved.
Show resolved Hide resolved

Mitiq benchmarks error mitigation techniques by running quantum circuits with and without mitigation, measuring improvements in accuracy, fidelity, and error rates. The process involves executing various circuit types—like GHZ, Mirror, Quantum Volume, and Randomized Benchmarking circuits—and comparing mitigated results against ideal outcomes. Analysis of these benchmarking results produces performance metrics, comparing mitigated and unmitigated outputs to quantify error reduction. This helps assess Mitiq’s effectiveness across diverse circuits, highlighting strengths and limitations in noise reduction.
Shivansh20128 marked this conversation as resolved.
Show resolved Hide resolved

## GHZ Circuits

The GHZ (Greenberger–Horne–Zeilinger) circuits create the GHZ states at are highly sensitive to noise. Thus, they make it easy to test error rates in entanglement creation and preservation, which is central for many quantum algorithms.
purva-thakre marked this conversation as resolved.
Show resolved Hide resolved

```{code-cell} ipython3
purva-thakre marked this conversation as resolved.
Show resolved Hide resolved
import cirq
from mitiq import benchmarks, zne

def execute(circuit, noise_level=0.005):
"""Returns Tr[ρ |0⟩⟨0|] where ρ is the state prepared by the circuit
with depolarizing noise."""
noisy_circuit = circuit.with_noise(cirq.depolarize(p=noise_level))
return (
cirq.DensityMatrixSimulator()
.simulate(noisy_circuit)
.final_density_matrix[0, 0]
.real
)

circuits = benchmarks.generate_ghz_circuit(n_qubits=10)
purva-thakre marked this conversation as resolved.
Show resolved Hide resolved

true_value = execute(circuits, noise_level=0.0) # Ideal quantum computer
noisy_value = execute(circuits) # Noisy quantum computer
zne_value = zne.execute_with_zne(circuits, execute) # Noisy quantum computer + Mitiq

print(f"Error w/o Mitiq: {abs((true_value - noisy_value) / true_value):.3f}")
print(f"Error w Mitiq: {abs((true_value - zne_value) / true_value):.3f}")
```

## Mirror Circuits

## Mirror Quantum Volume Circuits

## Quantum Phase Estimation Circuits

## Quantum Volume Circuits
Shivansh20128 marked this conversation as resolved.
Show resolved Hide resolved

## Randomized Benchmarking Circuits

## Rotated Randomized Benchmarking Circuits

## Randomized Clifford+T Circuits

## W State Circuits

1 change: 1 addition & 0 deletions docs/source/guide/core-concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ frontends-backends.md
executors.md
observables.md
calibrators.md
benchmarks.md
```
Loading