Skip to content

Commit

Permalink
Merge 38ab857 into 58722ee
Browse files Browse the repository at this point in the history
  • Loading branch information
ihincks committed May 14, 2024
2 parents 58722ee + 38ab857 commit ed37c21
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
15 changes: 15 additions & 0 deletions qiskit_ibm_runtime/options/zne_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,18 @@ class ZneOptions:
"""Zero noise extrapolation mitigation options.
Args:
amplifier: Which technique to use for amplifying noise. One of:
* `"gate_folding"` (default) uses 2-qubit gate folding to amplify noise. If the noise
factor requires amplifying only a subset of the gates, then these gates are chosen
randomly.
* `"gate_folding_front"` uses 2-qubit gate folding to amplify noise. If the noise
factor requires amplifying only a subset of the gates, then these gates are selected
from the front of the topologically ordered DAG circuit.
* `"gate_folding_back"` uses 2-qubit gate folding to amplify noise. If the noise
factor requires amplifying only a subset of the gates, then these gates are selected
from the back of the topologically ordered DAG circuit.
noise_factors: Noise factors to use for noise amplification. Default: (1, 3, 5).
extrapolator: Extrapolator(s) to try (in order) for extrapolating to zero noise.
Expand All @@ -50,6 +62,9 @@ class ZneOptions:
Default: ("exponential", "linear").
"""

amplifier: Union[
UnsetType, Literal["gate_folding", "gate_folding_front", "gate_folding_back"]
] = Unset
noise_factors: Union[UnsetType, Sequence[float]] = Unset
extrapolator: Union[UnsetType, ExtrapolatorType, Sequence[ExtrapolatorType]] = Unset

Expand Down
11 changes: 11 additions & 0 deletions release-notes/unreleased/1679.feat.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
The `ZneOptions.amplifier` option was added, which can be one of these strings:

* `"gate_folding"` (default) uses 2-qubit gate folding to amplify noise. If the noise
factor requires amplifying only a subset of the gates, then these gates are chosen
randomly.
* `"gate_folding_front"` uses 2-qubit gate folding to amplify noise. If the noise
factor requires amplifying only a subset of the gates, then these gates are selected
from the front of the topologically ordered DAG circuit.
* `"gate_folding_back"` uses 2-qubit gate folding to amplify noise. If the noise
factor requires amplifying only a subset of the gates, then these gates are selected
from the back of the topologically ordered DAG circuit.
1 change: 1 addition & 0 deletions test/integration/test_estimator_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ def test_estimator_v2_options(self, service):
estimator.options.seed_estimator = 42
estimator.options.resilience.measure_mitigation = True
estimator.options.resilience.zne_mitigation = True
estimator.options.resilienc.zne.amplifier = "gate_folding_back"
estimator.options.resilience.zne.noise_factors = [3, 5]
estimator.options.resilience.zne.extrapolator = "linear"
estimator.options.resilience.pec_mitigation = False
Expand Down

0 comments on commit ed37c21

Please sign in to comment.