qiskit-documentation/docs/api/qiskit/0.41/qiskit_aer.utils.approximat...

39 lines
2.1 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: approximate_noise_model
description: API reference for qiskit_aer.utils.approximate_noise_model
in_page_toc_min_heading_level: 1
python_api_type: function
python_api_name: qiskit_aer.utils.approximate_noise_model
---
# qiskit\_aer.utils.approximate\_noise\_model
<Function id="qiskit_aer.utils.approximate_noise_model" isDedicatedPage={true} github="https://github.com/qiskit/qiskit-aer/tree/stable/0.11/qiskit_aer/utils/noise_transformation.py" signature="approximate_noise_model(model, *, operator_string=None, operator_dict=None, operator_list=None)">
Replace all noises in a noise model with ones approximated by a mixture of operators (channels).
**Parameters**
* **model** ([*NoiseModel*](qiskit_aer.noise.NoiseModel "qiskit_aer.noise.NoiseModel")) the noise model to be approximated. All noises in the model must be 1- or 2-qubit noises.
* **operator\_string** (*string*) a name for a pre-made set of building blocks for the output channel (Default: None). Possible values are `'pauli'`, `'reset'`, `'clifford'`.
* **operator\_dict** (*dict*) a dictionary whose values are the building blocks for the output channel (Default: None). E.g. \{“x”: XGate(), “y”: YGate()}, keys “x” and “y” are not used in transformation.
* **operator\_list** (*list*) list of building block operators for the output channel (Default: None). E.g. \[XGate(), YGate()]
**Returns**
the approximate noise model.
**Return type**
[NoiseModel](qiskit_aer.noise.NoiseModel "qiskit_aer.noise.NoiseModel")
**Raises**
* **NoiseError** if any invalid argument is specified or approximation failed.
* **MissingOptionalLibraryError** if cvxpy is not installed.
<Admonition title="Note" type="note">
The operator input precedence is: `list` \< `dict` \< `string`. If a `string` is given, `dict` is overwritten; if a `dict` is given, `list` is overwritten. The `string` supports only 1- or 2-qubit errors and its possible values are `'pauli'`, `'reset'`, `'clifford'`. The `'clifford'` does not support 2-qubit errors.
</Admonition>
</Function>