diff --git a/docs/api/qiskit-addon-utils/0.3/_package.json b/docs/api/qiskit-addon-utils/0.3/_package.json
new file mode 100644
index 000000000000..648d449cc7c8
--- /dev/null
+++ b/docs/api/qiskit-addon-utils/0.3/_package.json
@@ -0,0 +1,4 @@
+{
+ "name": "qiskit-addon-utils",
+ "version": "0.3.1"
+}
diff --git a/docs/api/qiskit-addon-utils/0.3/_toc.json b/docs/api/qiskit-addon-utils/0.3/_toc.json
new file mode 100644
index 000000000000..13f705088d86
--- /dev/null
+++ b/docs/api/qiskit-addon-utils/0.3/_toc.json
@@ -0,0 +1,93 @@
+{
+ "title": "Qiskit addon utilities",
+ "children": [
+ {
+ "title": "API index",
+ "url": "/docs/api/qiskit-addon-utils/0.3"
+ },
+ {
+ "title": "Release notes",
+ "useDivider": true,
+ "url": "/docs/api/qiskit-addon-utils/release-notes"
+ },
+ {
+ "title": "qiskit_addon_utils.coloring",
+ "url": "/docs/api/qiskit-addon-utils/0.3/coloring",
+ "untranslatable": true
+ },
+ {
+ "title": "qiskit_addon_utils.exp_vals",
+ "url": "/docs/api/qiskit-addon-utils/0.3/exp-vals",
+ "untranslatable": true
+ },
+ {
+ "title": "qiskit_addon_utils.noise_management",
+ "url": "/docs/api/qiskit-addon-utils/0.3/noise-management",
+ "untranslatable": true
+ },
+ {
+ "title": "qiskit_addon_utils.noise_management.post_selection.transpiler.passes",
+ "untranslatable": true,
+ "children": [
+ {
+ "title": "Module overview",
+ "url": "/docs/api/qiskit-addon-utils/0.3/noise-management-post-selection-transpiler-passes"
+ },
+ {
+ "title": "AddPostSelectionMeasures",
+ "url": "/docs/api/qiskit-addon-utils/0.3/noise-management-post-selection-transpiler-passes-add-post-selection-measures",
+ "untranslatable": true
+ },
+ {
+ "title": "AddSpectatorMeasures",
+ "url": "/docs/api/qiskit-addon-utils/0.3/noise-management-post-selection-transpiler-passes-add-spectator-measures",
+ "untranslatable": true
+ },
+ {
+ "title": "XSlowGate",
+ "url": "/docs/api/qiskit-addon-utils/0.3/noise-management-post-selection-transpiler-passes-x-slow-gate",
+ "untranslatable": true
+ }
+ ]
+ },
+ {
+ "title": "qiskit_addon_utils.problem_generators",
+ "url": "/docs/api/qiskit-addon-utils/0.3/problem-generators",
+ "untranslatable": true
+ },
+ {
+ "title": "qiskit_addon_utils.slicing",
+ "url": "/docs/api/qiskit-addon-utils/0.3/slicing",
+ "untranslatable": true
+ },
+ {
+ "title": "qiskit_addon_utils.slicing.transpiler.passes",
+ "untranslatable": true,
+ "children": [
+ {
+ "title": "Module overview",
+ "url": "/docs/api/qiskit-addon-utils/0.3/slicing-transpiler-passes"
+ },
+ {
+ "title": "CollectOpColor",
+ "url": "/docs/api/qiskit-addon-utils/0.3/slicing-transpiler-passes-collect-op-color",
+ "untranslatable": true
+ },
+ {
+ "title": "CollectOpSize",
+ "url": "/docs/api/qiskit-addon-utils/0.3/slicing-transpiler-passes-collect-op-size",
+ "untranslatable": true
+ },
+ {
+ "title": "CollectOpType",
+ "url": "/docs/api/qiskit-addon-utils/0.3/slicing-transpiler-passes-collect-op-type",
+ "untranslatable": true
+ }
+ ]
+ }
+ ],
+ "collapsed": true,
+ "untranslatable": true,
+ "parentUrl": "/docs/addons/qiskit-addon-utils",
+ "parentLabel": "Qiskit addon utilities"
+}
diff --git a/docs/api/qiskit-addon-utils/0.3/coloring.mdx b/docs/api/qiskit-addon-utils/0.3/coloring.mdx
new file mode 100644
index 000000000000..a258aae596ef
--- /dev/null
+++ b/docs/api/qiskit-addon-utils/0.3/coloring.mdx
@@ -0,0 +1,56 @@
+---
+title: coloring (v0.3)
+description: API reference for qiskit_addon_utils.coloring in qiskit-addon-utils v0.3
+in_page_toc_min_heading_level: 2
+python_api_type: module
+python_api_name: qiskit_addon_utils.coloring
+---
+
+
+
+
+
+# coloring
+
+`qiskit_addon_utils.coloring`
+
+Utility methods for coloring.
+
+### auto\_color\_edges
+
+
+ Color the input edges of an undirected graph such that no two incident edges share a color.
+
+ **Parameters**
+
+ **edges** ([*Sequence*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Sequence)*\[*[*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple)*\[*[*int*](https://docs.python.org/3/library/functions.html#int)*,* [*int*](https://docs.python.org/3/library/functions.html#int)*]]*) – The edges describing an undirected graph.
+
+ **Returns**
+
+ A dictionary mapping each edge to an integer representation of a color.
+
+ **Return type**
+
+ [dict](https://docs.python.org/3/library/stdtypes.html#dict)\[[tuple](https://docs.python.org/3/library/stdtypes.html#tuple)\[[int](https://docs.python.org/3/library/functions.html#int), [int](https://docs.python.org/3/library/functions.html#int)], [int](https://docs.python.org/3/library/functions.html#int)]
+
+
+### is\_valid\_edge\_coloring
+
+
+ Check whether an edge coloring scheme is valid.
+
+ An edge coloring is valid if no two edges of the same color share a node.
+
+ **Parameters**
+
+ **coloring** ([*dict*](https://docs.python.org/3/library/stdtypes.html#dict)*\[*[*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple)*\[*[*int*](https://docs.python.org/3/library/functions.html#int)*,* [*int*](https://docs.python.org/3/library/functions.html#int)*],* [*int*](https://docs.python.org/3/library/functions.html#int)*]*) – A mapping from edges to integer representations of colors.
+
+ **Returns**
+
+ A boolean indicating whether the input coloring is valid.
+
+ **Return type**
+
+ [bool](https://docs.python.org/3/library/functions.html#bool)
+
+
diff --git a/docs/api/qiskit-addon-utils/0.3/exp-vals.mdx b/docs/api/qiskit-addon-utils/0.3/exp-vals.mdx
new file mode 100644
index 000000000000..2a1d42c9d7c5
--- /dev/null
+++ b/docs/api/qiskit-addon-utils/0.3/exp-vals.mdx
@@ -0,0 +1,141 @@
+---
+title: exp_vals (v0.3)
+description: API reference for qiskit_addon_utils.exp_vals in qiskit-addon-utils v0.3
+in_page_toc_min_heading_level: 2
+python_api_type: module
+python_api_name: qiskit_addon_utils.exp_vals
+---
+
+
+
+
+
+# exp\_vals
+
+`qiskit_addon_utils.exp_vals`
+
+Tools for calculating expectation values.
+
+### executor\_expectation\_values
+
+
+ Computes expectation values from boolean data and metadata, aiming for compatibility with the components of a result from `Executor` in `qiskit_ibm_runtime` .
+
+ Uses data in bool\_array, acquired with measurement bases as ordered in keys of basis\_dict, to compute observables encoded in values of basis\_dict.
+
+ Optionally allows averaging over additional axes of bool\_array, as when twirling.
+
+ Optionally supports measurement twirling, PEC, and postselection.
+
+ **Parameters**
+
+ * **bool\_array** ([*ndarray*](https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray)*\[*[*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple)*\[*[*int*](https://docs.python.org/3/library/functions.html#int)*, ...],* [*dtype*](https://numpy.org/doc/stable/reference/generated/numpy.dtype.html#numpy.dtype)*\[*[*bool*](https://numpy.org/doc/stable/reference/arrays.scalars.html#numpy.bool)*]]*) – Boolean array, presumably representing data from measured qubits. The last two axes are the number of shots and number of classical bits, respectively. The least significant bit is assumed to be at index 0 of the bits axis. If meas\_basis\_axis is given, that axis of bool\_array indexes the measurement bases, with length len(basis\_dict).
+ * **basis\_dict** ([*dict*](https://docs.python.org/3/library/stdtypes.html#dict)*\[*[*Pauli*](/docs/api/qiskit/qiskit.quantum_info.Pauli)*,* [*list*](https://docs.python.org/3/library/stdtypes.html#list)*\[*[*SparsePauliOp*](/docs/api/qiskit/qiskit.quantum_info.SparsePauliOp) *| None]]*) – This dict encodes how the data in bool\_array should be used to estimate the desired list of Pauli observables. The ith key is a measurement basis assumed to correspond to the ith slice of bool\_array along the meas\_basis\_axis axis. Each dict value is a list of length equal to the number of desired observables. The jth element of this list is a SparsePauliOp assumed to be compatible (qubit-wise commuting) with the measurement-basis key. In place of a SparsePauliOp, None may be used to represent the zero operator, when a basis is not used to compute an observable. The jth observable is defined as the sum of the jth element of each dict value (contribution from each meas basis). - Note the order of dict entries is relied on here for indexing; the dict keys are never used. - Assumes each Pauli term (in dict values) is compatible with each measurement basis (in keys). - Assumes each term in each observable appears for exactly one basis.
+ * **meas\_basis\_axis** ([*int*](https://docs.python.org/3/library/functions.html#int) *| None*) – Axis of bool\_array that indexes measurement bases. Ordering must match ordering in basis\_dict. If None, then len(basis\_dict) must be 1, and bool\_array is assumed to correspond to the only measurement basis.
+ * **avg\_axis** ([*int*](https://docs.python.org/3/library/functions.html#int) *|*[*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple)*\[*[*int*](https://docs.python.org/3/library/functions.html#int)*, ...] | None*) – Optional axis or axes of bool\_array to average over when computing expectation values. Usually this is the “twirling” axis. Must be nonnegative. (The shots axis, assumed to be at index -2 in the boolean array, is always averaged over).
+ * **measurement\_flips** ([*ndarray*](https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray)*\[*[*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple)*\[*[*int*](https://docs.python.org/3/library/functions.html#int)*, ...],* [*dtype*](https://numpy.org/doc/stable/reference/generated/numpy.dtype.html#numpy.dtype)*\[*[*bool*](https://numpy.org/doc/stable/reference/arrays.scalars.html#numpy.bool)*]] | None*) – Optional boolean array used with measurement twirling. Indicates which bits were acquired with measurements preceded by bit-flip gates. Data processing will use the result of xor\`ing this array with \`bool\_array. Must be same shape as bool\_array.
+ * **pauli\_signs** ([*ndarray*](https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray)*\[*[*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple)*\[*[*int*](https://docs.python.org/3/library/functions.html#int)*, ...],* [*dtype*](https://numpy.org/doc/stable/reference/generated/numpy.dtype.html#numpy.dtype)*\[*[*bool*](https://numpy.org/doc/stable/reference/arrays.scalars.html#numpy.bool)*]] | None*) – Optional boolean array used with probabilistic error cancellation (PEC). Final axis is assumed to index all noisy boxes in circuit. Value of True indicates an overall sign of -1 should be associated with the noisy box, typically because an odd number of inverse-noise errors were inserted in that box for the specified circuit randomization. The final axis is immediately collapsed as a sum mod 2 to obtain the overall sign associated with each circuit randomization. Remaining shape must be pauli\_signs.shape\[:-1] == bool\_array.shape\[:-2]. Note this array does not have a shots axis.
+ * **postselect\_mask** ([*ndarray*](https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray)*\[*[*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple)*\[*[*int*](https://docs.python.org/3/library/functions.html#int)*, ...],* [*dtype*](https://numpy.org/doc/stable/reference/generated/numpy.dtype.html#numpy.dtype)*\[*[*bool*](https://numpy.org/doc/stable/reference/arrays.scalars.html#numpy.bool)*]] | None*) – Optional boolean array used for postselection. True (False) indicates a shot accepted (rejected) by postselection. Shape must be bool\_array.shape\[:-1].
+ * **gamma\_factor** ([*float*](https://docs.python.org/3/library/functions.html#float) *| None*) – Rescaling factor gamma to be applied to PEC mitigated expectation values. If None, rescaling factors will be computed as the number of positive samples minus the number of negative samples, computed as 1/(np.sum(\~pauli\_signs, axis=avg\_axis) - np.sum(pauli\_signs, axis=avg\_axis)). This can fail due to division by zero if there are an equal number of positive and negative samples. Also note this rescales each expectation value by a different factor. (TODO: allow specifying an array of gamma values).
+ * **rescale\_factors** ([*Sequence*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Sequence)*\[*[*Sequence*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Sequence)*\[*[*Sequence*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Sequence)*\[*[*float*](https://docs.python.org/3/library/functions.html#float)*]]] | None*) – Scale factor for each Pauli term in each observable in each basis in the given `basis_dict`. Typically used for readout mitigation (“TREX”) correction factors. Each item in the list corresponds to a different basis, and contains a list of lists of factors for each term in each observable related to that basis. The order of the bases and the observables inside each basis should be the same as in basis\_dict. For empty observables for some of the bases, keep an empty list. If None, scaling factor will not be applied.
+
+ **Returns**
+
+ A list of (exp. val, variance) 2-tuples, one for each desired observable.
+
+ **Note: Covariances between summed terms in each observable are not currently accounted for in the**
+
+ returned variances. (TODO)
+
+ **Raises**
+
+ * **ValueError if avg\_axis contains negative values.** –
+ * **ValueError if meas\_basis\_axis is None but len**\*\*(****basis\_dict****) \*\***!= 1.** –
+ * **ValueError if the number**\*\* of ****entries in basis\_dict does not equal the length**** of \*\***bool\_array along meas\_basis\_axis.** –
+
+
+### get\_measurement\_bases
+
+
+ Choose bases to sample in order to calculate expectation values for all given observables.
+
+ Here a “basis” refers to measurement of a full-weight or high-weight Pauli, from which multiple qubit-wise commuting Paulis may be estimated.
+
+ The bases are chosen by grouping commuting Paulis across the different observables.
+
+ **Parameters**
+
+ **observables** ([*SparsePauliOp*](/docs/api/qiskit/qiskit.quantum_info.SparsePauliOp) *|*[*list*](https://docs.python.org/3/library/stdtypes.html#list)*\[*[*SparsePauliOp*](/docs/api/qiskit/qiskit.quantum_info.SparsePauliOp)*]*) – The observables to calculate using the quantum computer.
+
+ **Returns**
+
+ * List of Pauli bases to sample encoded in a list of uint8 where 0=I,1=Z,2=X,3=Y.
+ * Dict that maps each measured basis to the relevant Paulis and their coefficients for each observable. With the measured bases as keys, for each observable there is a SparsePauliOp representing it.
+
+ **Return type**
+
+ [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)\[[list](https://docs.python.org/3/library/stdtypes.html#list)\[[*ndarray*](https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray)\[[tuple](https://docs.python.org/3/library/stdtypes.html#tuple)\[[int](https://docs.python.org/3/library/functions.html#int), …], [*dtype*](https://numpy.org/doc/stable/reference/generated/numpy.dtype.html#numpy.dtype)\[*uint8*]]], [dict](https://docs.python.org/3/library/stdtypes.html#dict)\[[*Pauli*](/docs/api/qiskit/qiskit.quantum_info.Pauli), [list](https://docs.python.org/3/library/stdtypes.html#list)\[[*SparsePauliOp*](/docs/api/qiskit/qiskit.quantum_info.SparsePauliOp)]]]
+
+
+### map\_observable\_isa\_to\_canonical
+
+
+ Map an observable defined relative to the transpiled circuit to canonical box-order.
+
+ In the transpiled (or ISA) ordering, the qubits are indexed based on the “physical” layout of qubits in the device.
+
+ For info on canonical qubit ordering conventions see the [Samplomatic docs](https://qiskit.github.io/samplomatic/guides/samplex_io.html#qubit-ordering-convention)).
+
+ **Parameters**
+
+ * **isa\_observable** ([*Pauli*](/docs/api/qiskit/qiskit.quantum_info.Pauli) *|*[*SparsePauliOp*](/docs/api/qiskit/qiskit.quantum_info.SparsePauliOp) *|*[*SparseObservable*](/docs/api/qiskit/qiskit.quantum_info.SparseObservable)) – A Pauli, SparsePauliOp, or SparseObservable object.
+ * **canonical\_qubits** ([*Sequence*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Sequence)*\[*[*int*](https://docs.python.org/3/library/functions.html#int)*]*) – A sequence specifying the physical qubit for each canonical qubit.
+
+ **Returns**
+
+ A mapped operator of the same type as `isa_observable`
+
+ **Return type**
+
+ [*Pauli*](/docs/api/qiskit/qiskit.quantum_info.Pauli) | [*SparsePauliOp*](/docs/api/qiskit/qiskit.quantum_info.SparsePauliOp) | [*SparseObservable*](/docs/api/qiskit/qiskit.quantum_info.SparseObservable)
+
+
+### map\_observable\_virtual\_to\_canonical
+
+
+ Map an observable with virtual qubit ordering to canonical box-order.
+
+ For info on canonical qubit ordering conventions see the [Samplomatic docs](https://qiskit.github.io/samplomatic/guides/samplex_io.html#qubit-ordering-convention)).
+
+ **Parameters**
+
+ * **virt\_observable** ([*Pauli*](/docs/api/qiskit/qiskit.quantum_info.Pauli) *|*[*SparsePauliOp*](/docs/api/qiskit/qiskit.quantum_info.SparsePauliOp) *|*[*SparseObservable*](/docs/api/qiskit/qiskit.quantum_info.SparseObservable)) – A Pauli, SparsePauliOp, or SparseObservable object.
+ * **layout** ([*Sequence*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Sequence)*\[*[*int*](https://docs.python.org/3/library/functions.html#int)*]*) – The list of physical qubits used for the isa circuit.
+ * **canonical\_qubits** ([*Sequence*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Sequence)*\[*[*int*](https://docs.python.org/3/library/functions.html#int)*]*) – A dictionary mapping canonical qubits within a box to physical qubits within the layout.
+
+ **Returns**
+
+ A mapped operator of the same type as `virt_observable`
+
+
+### map\_observable\_isa\_to\_virtual
+
+
+ Map an observable defined relative to the transpiled circuit to virtual order.
+
+ In the transpiled (or ISA) ordering, the qubits are indexed based on the “physical” layout of qubits in the device.
+
+ **Parameters**
+
+ * **isa\_observable** ([*Pauli*](/docs/api/qiskit/qiskit.quantum_info.Pauli) *|*[*SparsePauliOp*](/docs/api/qiskit/qiskit.quantum_info.SparsePauliOp) *|*[*SparseObservable*](/docs/api/qiskit/qiskit.quantum_info.SparseObservable)) – A Pauli, SparsePauliOp, or SparseObservable object.
+ * **layout** ([*Sequence*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Sequence)*\[*[*int*](https://docs.python.org/3/library/functions.html#int)*]*) – The list of physical qubits used for the isa circuit.
+
+ **Returns**
+
+ A mapped operator of the same type as `isa_observable`
+
+ **Return type**
+
+ [*Pauli*](/docs/api/qiskit/qiskit.quantum_info.Pauli) | [*SparsePauliOp*](/docs/api/qiskit/qiskit.quantum_info.SparsePauliOp) | [*SparseObservable*](/docs/api/qiskit/qiskit.quantum_info.SparseObservable)
+
+
diff --git a/docs/api/qiskit-addon-utils/0.3/index.mdx b/docs/api/qiskit-addon-utils/0.3/index.mdx
new file mode 100644
index 000000000000..55e202885357
--- /dev/null
+++ b/docs/api/qiskit-addon-utils/0.3/index.mdx
@@ -0,0 +1,19 @@
+---
+title: Qiskit addon utilities API documentation (v0.3)
+description: Index of all the modules in qiskit-addon-utils v0.3.
+---
+
+
+
+# `qiskit-addon-utils` API reference
+
+This package contains functionality which is meant to supplement workflows involving one or more Qiskit addons. For example, this package contains functions for creating Hamiltonians, generating Trotter time evolution circuits, and slicing and combining quantum circuits in time-wise partitions.
+
+* [coloring (`qiskit_addon_utils.coloring`)](coloring)
+* [noise\_management (`qiskit_addon_utils.noise_management`)](noise-management)
+* [post\_selection\_transpiler\_passes (`qiskit_addon_utils.noise_management.post_selection.transpiler.passes`)](noise-management-post-selection-transpiler-passes)
+* [problem\_generators (`qiskit_addon_utils.problem_generators`)](problem-generators)
+* [slicing (`qiskit_addon_utils.slicing`)](slicing)
+* [slicing\_transpiler\_passes (`qiskit_addon_utils.slicing.transpiler.passes`)](slicing-transpiler-passes)
+* [exp\_vals (`qiskit_addon_utils.exp_vals`)](exp-vals)
+
diff --git a/docs/api/qiskit-addon-utils/0.3/noise-management-post-selection-transpiler-passes-add-post-selection-measures.mdx b/docs/api/qiskit-addon-utils/0.3/noise-management-post-selection-transpiler-passes-add-post-selection-measures.mdx
new file mode 100644
index 000000000000..dd280c0abd49
--- /dev/null
+++ b/docs/api/qiskit-addon-utils/0.3/noise-management-post-selection-transpiler-passes-add-post-selection-measures.mdx
@@ -0,0 +1,114 @@
+---
+title: AddPostSelectionMeasures (v0.3)
+description: API reference for qiskit_addon_utils.noise_management.post_selection.transpiler.passes.AddPostSelectionMeasures in qiskit-addon-utils v0.3
+in_page_toc_min_heading_level: 1
+python_api_type: class
+python_api_name: qiskit_addon_utils.noise_management.post_selection.transpiler.passes.AddPostSelectionMeasures
+---
+
+# AddPostSelectionMeasures
+
+
+ Bases: [`TransformationPass`](/docs/api/qiskit/qiskit.transpiler.TransformationPass)
+
+ Add a post selection measurement after every terminal measurement.
+
+ A post selection measurement is a measurement that follows a regular measurement on a given qubit. It consists of a narrowband X-pulse followed by a regular measurement operation. In the absence of noise, it is expected to return `(b + 1) % 2`, where `b` is the outcome of the original measurement.
+
+ This pass adds post selection measurements after every terminal measurement, i.e., after every measurement that is not followed by another operation on the same wire. The added measurements are placed after a barrier, and write to new classical registers that are copies of the DAG’s registers, with modified names.
+
+
+ When this pass encounters a control flow operation, it iterates through all of its blocks. It marks as “terminated” only those qubits that are terminated in every one of the blocks, and it treats as unterminated every other qubit.
+
+
+ Initialize the pass.
+
+ **Parameters**
+
+ * **x\_pulse\_type** – The type of X-pulse to apply for the post-selection measurements.
+ * **post\_selection\_suffix** – A fixed suffix to append to the names of the classical registers when copying them.
+
+ ## Attributes
+
+ ### is\_analysis\_pass
+
+
+ Check if the pass is an analysis pass.
+
+ If the pass is an AnalysisPass, that means that the pass can analyze the DAG and write the results of that analysis in the property set. Modifications on the DAG are not allowed by this kind of pass.
+
+
+ ### is\_transformation\_pass
+
+
+ Check if the pass is a transformation pass.
+
+ If the pass is a TransformationPass, that means that the pass can manipulate the DAG, but cannot modify the property set (but it can be read).
+
+
+ ## Methods
+
+ ### execute
+
+
+ Execute optimization task for input Qiskit IR.
+
+ **Parameters**
+
+ * **passmanager\_ir** ([*Any*](https://docs.python.org/3/library/typing.html#typing.Any)) – Qiskit IR to optimize.
+ * **state** ([*PassManagerState*](/docs/api/qiskit/qiskit.passmanager.PassManagerState)) – State associated with workflow execution by the pass manager itself.
+ * **callback** ([*Callable*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Callable) *| None*) – A callback function which is caller per execution of optimization task.
+
+ **Returns**
+
+ Optimized Qiskit IR and state of the workflow.
+
+ **Return type**
+
+ [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)\[[*Any*](https://docs.python.org/3/library/typing.html#typing.Any), [*PassManagerState*](/docs/api/qiskit/qiskit.passmanager.PassManagerState)]
+
+
+ ### name
+
+
+ Name of the pass.
+
+ **Return type**
+
+ [str](https://docs.python.org/3/library/stdtypes.html#str)
+
+
+ ### run
+
+
+ Run a pass on the DAGCircuit. This is implemented by the pass developer.
+
+ **Parameters**
+
+ **dag** ([*DAGCircuit*](/docs/api/qiskit/qiskit.dagcircuit.DAGCircuit)) – the dag on which the pass is run.
+
+ **Raises**
+
+ [**NotImplementedError**](https://docs.python.org/3/library/exceptions.html#NotImplementedError) – when this is left unimplemented for a pass.
+
+
+ ### update\_status
+
+
+ Update workflow status.
+
+ **Parameters**
+
+ * **state** ([*PassManagerState*](/docs/api/qiskit/qiskit.passmanager.PassManagerState)) – Pass manager state to update.
+ * **run\_state** (*RunState*) – Completion status of current task.
+
+ **Returns**
+
+ Updated pass manager state.
+
+ **Return type**
+
+ [*PassManagerState*](/docs/api/qiskit/qiskit.passmanager.PassManagerState)
+
+
+
diff --git a/docs/api/qiskit-addon-utils/0.3/noise-management-post-selection-transpiler-passes-add-spectator-measures.mdx b/docs/api/qiskit-addon-utils/0.3/noise-management-post-selection-transpiler-passes-add-spectator-measures.mdx
new file mode 100644
index 000000000000..b9903850a0df
--- /dev/null
+++ b/docs/api/qiskit-addon-utils/0.3/noise-management-post-selection-transpiler-passes-add-spectator-measures.mdx
@@ -0,0 +1,116 @@
+---
+title: AddSpectatorMeasures (v0.3)
+description: API reference for qiskit_addon_utils.noise_management.post_selection.transpiler.passes.AddSpectatorMeasures in qiskit-addon-utils v0.3
+in_page_toc_min_heading_level: 1
+python_api_type: class
+python_api_name: qiskit_addon_utils.noise_management.post_selection.transpiler.passes.AddSpectatorMeasures
+---
+
+# AddSpectatorMeasures
+
+
+ Bases: [`TransformationPass`](/docs/api/qiskit/qiskit.transpiler.TransformationPass)
+
+ Add measurements on spectator qubits.
+
+ An active qubit is a qubit acted on in the circuit by a non-barrier instruction. A terminated qubit is one whose last action is a measurement. A spectator qubit is a qubit that is inactive, but adjacent to an active qubit under the coupling map. This pass adds a measurement to all spectator qubits and, optionally via `include_unmeasured`, to all active qubits that are not terminated qubits.
+
+ The added measurements write to a new register that has one bit per spectator qubit and name `spectator_creg_name`.
+
+
+ When this pass encounters a control flow operation, it iterates through all of its blocks. It marks as “active” every qubit that is active within at least one of the blocks, and as “terminated” every qubit that is terminated in every one of the blocks.
+
+
+ Initialize the pass.
+
+ **Parameters**
+
+ * **coupling\_map** – A coupling map or a list of tuples indicating pairs of neighboring qubits.
+ * **include\_unmeasured** – Whether the qubits that are active but are not terminated by a measurement should also be treated as spectators. If `True`, a terminal measurement is added on each of them.
+ * **spectator\_creg\_name** – The name of the classical register added for the measurements on the spectator qubits.
+ * **add\_barrier** – Whether to add a barrier acting on all active and spectator qubits prior to the spectator measurements.
+
+ ## Attributes
+
+ ### is\_analysis\_pass
+
+
+ Check if the pass is an analysis pass.
+
+ If the pass is an AnalysisPass, that means that the pass can analyze the DAG and write the results of that analysis in the property set. Modifications on the DAG are not allowed by this kind of pass.
+
+
+ ### is\_transformation\_pass
+
+
+ Check if the pass is a transformation pass.
+
+ If the pass is a TransformationPass, that means that the pass can manipulate the DAG, but cannot modify the property set (but it can be read).
+
+
+ ## Methods
+
+ ### execute
+
+
+ Execute optimization task for input Qiskit IR.
+
+ **Parameters**
+
+ * **passmanager\_ir** ([*Any*](https://docs.python.org/3/library/typing.html#typing.Any)) – Qiskit IR to optimize.
+ * **state** ([*PassManagerState*](/docs/api/qiskit/qiskit.passmanager.PassManagerState)) – State associated with workflow execution by the pass manager itself.
+ * **callback** ([*Callable*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Callable) *| None*) – A callback function which is caller per execution of optimization task.
+
+ **Returns**
+
+ Optimized Qiskit IR and state of the workflow.
+
+ **Return type**
+
+ [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)\[[*Any*](https://docs.python.org/3/library/typing.html#typing.Any), [*PassManagerState*](/docs/api/qiskit/qiskit.passmanager.PassManagerState)]
+
+
+ ### name
+
+
+ Name of the pass.
+
+ **Return type**
+
+ [str](https://docs.python.org/3/library/stdtypes.html#str)
+
+
+ ### run
+
+
+ Run a pass on the DAGCircuit. This is implemented by the pass developer.
+
+ **Parameters**
+
+ **dag** ([*DAGCircuit*](/docs/api/qiskit/qiskit.dagcircuit.DAGCircuit)) – the dag on which the pass is run.
+
+ **Raises**
+
+ [**NotImplementedError**](https://docs.python.org/3/library/exceptions.html#NotImplementedError) – when this is left unimplemented for a pass.
+
+
+ ### update\_status
+
+
+ Update workflow status.
+
+ **Parameters**
+
+ * **state** ([*PassManagerState*](/docs/api/qiskit/qiskit.passmanager.PassManagerState)) – Pass manager state to update.
+ * **run\_state** (*RunState*) – Completion status of current task.
+
+ **Returns**
+
+ Updated pass manager state.
+
+ **Return type**
+
+ [*PassManagerState*](/docs/api/qiskit/qiskit.passmanager.PassManagerState)
+
+
+
diff --git a/docs/api/qiskit-addon-utils/0.3/noise-management-post-selection-transpiler-passes-x-slow-gate.mdx b/docs/api/qiskit-addon-utils/0.3/noise-management-post-selection-transpiler-passes-x-slow-gate.mdx
new file mode 100644
index 000000000000..bd2bc8e27b8b
--- /dev/null
+++ b/docs/api/qiskit-addon-utils/0.3/noise-management-post-selection-transpiler-passes-x-slow-gate.mdx
@@ -0,0 +1,344 @@
+---
+title: XSlowGate (v0.3)
+description: API reference for qiskit_addon_utils.noise_management.post_selection.transpiler.passes.XSlowGate in qiskit-addon-utils v0.3
+in_page_toc_min_heading_level: 1
+python_api_type: class
+python_api_name: qiskit_addon_utils.noise_management.post_selection.transpiler.passes.XSlowGate
+---
+
+# XSlowGate
+
+
+ Bases: [`Gate`](/docs/api/qiskit/qiskit.circuit.Gate)
+
+ The x-slow gate.
+
+ **Parameters**
+
+ * **name** – The name of the gate.
+ * **num\_qubits** – The number of qubits the gate acts on.
+ * **params** – A list of parameters.
+ * **label** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – An optional label for the gate.
+ * **xslow\_gate\_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str))
+
+ ## Attributes
+
+ ### base\_class
+
+
+ Get the base class of this instruction. This is guaranteed to be in the inheritance tree of `self`.
+
+ The “base class” of an instruction is the lowest class in its inheritance tree that the object should be considered entirely compatible with for \_all\_ circuit applications. This typically means that the subclass is defined purely to offer some sort of programmer convenience over the base class, and the base class is the “true” class for a behavioral perspective. In particular, you should *not* override [`base_class`](#qiskit_addon_utils.noise_management.post_selection.transpiler.passes.XSlowGate.base_class "qiskit_addon_utils.noise_management.post_selection.transpiler.passes.XSlowGate.base_class") if you are defining a custom version of an instruction that will be implemented differently by hardware, such as an alternative measurement strategy, or a version of a parametrized gate with a particular set of parameters for the purposes of distinguishing it in a `Target` from the full parametrized gate.
+
+ This is often exactly equivalent to `type(obj)`, except in the case of singleton instances of standard-library instructions. These singleton instances are special subclasses of their base class, and this property will return that base. For example:
+
+ ```python
+ >>> isinstance(XGate(), XGate)
+ True
+ >>> type(XGate()) is XGate
+ False
+ >>> XGate().base_class is XGate
+ True
+ ```
+
+ In general, you should not rely on the precise class of an instruction; within a given circuit, it is expected that `Instruction.name` should be a more suitable discriminator in most situations.
+
+
+ ### decompositions
+
+
+ Get the decompositions of the instruction from the SessionEquivalenceLibrary.
+
+
+ ### definition
+
+
+ Return definition in terms of other basic gates.
+
+
+ ### label
+
+
+ Return instruction label
+
+
+ ### mutable
+
+
+ Is this instance is a mutable unique instance or not.
+
+ If this attribute is `False` the gate instance is a shared singleton and is not mutable.
+
+
+ ### name
+
+
+ Return the name.
+
+
+ ### num\_clbits
+
+
+ Return the number of clbits.
+
+
+ ### num\_qubits
+
+
+ Return the number of qubits.
+
+
+ ### params
+
+
+ The parameters of this `Instruction`. Ideally these will be gate angles.
+
+
+ ## Methods
+
+ ### add\_decomposition
+
+
+ Add a decomposition of the instruction to the SessionEquivalenceLibrary.
+
+
+ ### broadcast\_arguments
+
+
+ Validation and handling of the arguments and its relationship.
+
+ For example, `cx([q[0],q[1]], q[2])` means `cx(q[0], q[2]); cx(q[1], q[2])`. This method yields the arguments in the right grouping. In the given example:
+
+ ```python
+ in: [[q[0],q[1]], q[2]],[]
+ outs: [q[0], q[2]], []
+ [q[1], q[2]], []
+ ```
+
+ The general broadcasting rules are:
+
+ > * If len(qargs) == 1:
+ >
+ > ```python
+ > [q[0], q[1]] -> [q[0]],[q[1]]
+ > ```
+ >
+ > * If len(qargs) == 2:
+ >
+ > ```python
+ > [[q[0], q[1]], [r[0], r[1]]] -> [q[0], r[0]], [q[1], r[1]]
+ > [[q[0]], [r[0], r[1]]] -> [q[0], r[0]], [q[0], r[1]]
+ > [[q[0], q[1]], [r[0]]] -> [q[0], r[0]], [q[1], r[0]]
+ > ```
+ >
+ > * If len(qargs) >= 3:
+ >
+ > ```python
+ > [q[0], q[1]], [r[0], r[1]], ...] -> [q[0], r[0], ...], [q[1], r[1], ...]
+ > ```
+
+ **Parameters**
+
+ * **qargs** ([*list*](https://docs.python.org/3/library/stdtypes.html#list)) – List of quantum bit arguments.
+ * **cargs** ([*list*](https://docs.python.org/3/library/stdtypes.html#list)) – List of classical bit arguments.
+
+ **Returns**
+
+ A tuple with single arguments.
+
+ **Raises**
+
+ **CircuitError** – If the input is not valid. For example, the number of arguments does not match the gate expectation.
+
+ **Return type**
+
+ [*Iterable*](https://docs.python.org/3/library/typing.html#typing.Iterable)\[[tuple](https://docs.python.org/3/library/stdtypes.html#tuple)\[[list](https://docs.python.org/3/library/stdtypes.html#list), [list](https://docs.python.org/3/library/stdtypes.html#list)]]
+
+
+ ### control
+
+
+ Return the controlled version of itself.
+
+ The controlled gate is implemented as `ControlledGate` when `annotated` is `False`, and as `AnnotatedOperation` when `annotated` is `True`.
+
+
+ `qiskit.circuit.gate.Gate.control()`’s argument `annotated` is deprecated as of Qiskit 2.3. It will be removed in Qiskit 3.0. The method Gate.control() no longer accepts annotated=None. The new default is annotated=True, which represents the controlled gate as an AnnotatedOperation (unless a dedicated controlled-gate class already exists). You can explicitly set annotated=False to preserve the previous behavior. However, using annotated=True is recommended, as it defers construction of the controlled circuit to transpiler, and furthermore enables additional controlled-gate optimizations (typically leading to higher-quality circuits).
+
+
+ **Parameters**
+
+ * **num\_ctrl\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int)) – Number of controls to add. Defauls to `1`.
+ * **label** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *| None*) – Optional gate label. Defaults to `None`. Ignored if the controlled gate is implemented as an annotated operation.
+ * **ctrl\_state** ([*int*](https://docs.python.org/3/library/functions.html#int) *|*[*str*](https://docs.python.org/3/library/stdtypes.html#str) *| None*) – The control state of the gate, specified either as an integer or a bitstring (e.g. `"110"`). If `None`, defaults to the all-ones state `2**num_ctrl_qubits - 1`.
+ * **annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool) *| None*) – Indicates whether the controlled gate should be implemented as a controlled gate or as an annotated operation. If `None`, treated as `False`.
+
+ **Returns**
+
+ A controlled version of this gate.
+
+ **Raises**
+
+ **QiskitError** – invalid `ctrl_state`.
+
+
+ ### copy
+
+
+ Copy of the instruction.
+
+ **Parameters**
+
+ **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – name to be given to the copied circuit, if `None` then the name stays the same.
+
+ **Returns**
+
+ a copy of the current instruction, with the name updated if it was provided
+
+ **Return type**
+
+ [qiskit.circuit.Instruction](/docs/api/qiskit/qiskit.circuit.Instruction)
+
+
+ ### inverse
+
+
+ Invert this instruction.
+
+ If annotated is False, the inverse instruction is implemented as a fresh instruction with the recursively inverted definition.
+
+ If annotated is True, the inverse instruction is implemented as `AnnotatedOperation`, and corresponds to the given instruction annotated with the “inverse modifier”.
+
+ Special instructions inheriting from Instruction can implement their own inverse (e.g. T and Tdg, Barrier, etc.) In particular, they can choose how to handle the argument `annotated` which may include ignoring it and always returning a concrete gate class if the inverse is defined as a standard gate.
+
+ **Parameters**
+
+ **annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) – if set to True the output inverse gate will be returned as `AnnotatedOperation`.
+
+ **Returns**
+
+ The inverse operation.
+
+ **Raises**
+
+ **CircuitError** – if the instruction is not composite and an inverse has not been implemented for it.
+
+
+ ### is\_parameterized
+
+
+ Return whether the `Instruction` contains [compile-time parameters](/docs/api/qiskit/circuit#circuit-compile-time-parameters).
+
+
+ ### power
+
+
+ Raise this gate to the power of `exponent`.
+
+ Implemented either as a unitary gate (ref. `UnitaryGate`) or as an annotated operation (ref. `AnnotatedOperation`). In the case of several standard gates, such as `RXGate`, when the power of a gate can be expressed in terms of another standard gate that is returned directly.
+
+ **Parameters**
+
+ * **exponent** ([*float*](https://docs.python.org/3/library/functions.html#float)) – the power to raise the gate to
+ * **annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) – indicates whether the power gate can be implemented as an annotated operation. In the case of several standard gates, such as `RXGate`, this argument is ignored when the power of a gate can be expressed in terms of another standard gate.
+
+ **Returns**
+
+ An operation implementing `gate^exponent`
+
+ **Raises**
+
+ **CircuitError** – If gate is not unitary
+
+
+ ### repeat
+
+
+ Creates an instruction with `self` repeated :math\`n\` times.
+
+ **Parameters**
+
+ **n** ([*int*](https://docs.python.org/3/library/functions.html#int)) – Number of times to repeat the instruction
+
+ **Returns**
+
+ Containing the definition.
+
+ **Return type**
+
+ [qiskit.circuit.Instruction](/docs/api/qiskit/qiskit.circuit.Instruction)
+
+ **Raises**
+
+ **CircuitError** – If n \< 1.
+
+
+ ### reverse\_ops
+
+
+ For a composite instruction, reverse the order of sub-instructions.
+
+ This is done by recursively reversing all sub-instructions. It does not invert any gate.
+
+ **Returns**
+
+ **a new instruction with**
+
+ sub-instructions reversed.
+
+ **Return type**
+
+ [qiskit.circuit.Instruction](/docs/api/qiskit/qiskit.circuit.Instruction)
+
+
+ ### soft\_compare
+
+
+ Soft comparison between gates. Their names, number of qubits, and classical bit numbers must match. The number of parameters must match. Each parameter is compared. If one is a ParameterExpression then it is not taken into account.
+
+ **Parameters**
+
+ **other** (*instruction*) – other instruction.
+
+ **Returns**
+
+ are self and other equal up to parameter expressions.
+
+ **Return type**
+
+ [bool](https://docs.python.org/3/library/functions.html#bool)
+
+
+ ### to\_matrix
+
+
+ Return a Numpy.array for the gate unitary matrix.
+
+ **Returns**
+
+ if the Gate subclass has a matrix definition.
+
+ **Return type**
+
+ np.ndarray
+
+ **Raises**
+
+ **CircuitError** – If a Gate subclass does not implement this method an exception will be raised when this base class method is called.
+
+
+ ### to\_mutable
+
+
+ Return a mutable copy of this gate.
+
+ This method will return a new mutable copy of this gate instance. If a singleton instance is being used this will be a new unique instance that can be mutated. If the instance is already mutable it will be a deepcopy of that instance.
+
+
+ ### validate\_parameter
+
+
+ Gate parameters should be int, float, or ParameterExpression
+
+
+
diff --git a/docs/api/qiskit-addon-utils/0.3/noise-management-post-selection-transpiler-passes.mdx b/docs/api/qiskit-addon-utils/0.3/noise-management-post-selection-transpiler-passes.mdx
new file mode 100644
index 000000000000..6bb25fb84e3c
--- /dev/null
+++ b/docs/api/qiskit-addon-utils/0.3/noise-management-post-selection-transpiler-passes.mdx
@@ -0,0 +1,24 @@
+---
+title: passes (v0.3)
+description: API reference for qiskit_addon_utils.noise_management.post_selection.transpiler.passes in qiskit-addon-utils v0.3
+in_page_toc_min_heading_level: 2
+python_api_type: module
+python_api_name: qiskit_addon_utils.noise_management.post_selection.transpiler.passes
+---
+
+
+
+
+
+# post\_selection\_transpiler\_passes
+
+`qiskit_addon_utils.noise_management.post_selection.transpiler.passes`
+
+A submodule with transpilation passes for post selection.
+
+| | |
+| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ |
+| [`AddSpectatorMeasures`](/docs/api/qiskit-addon-utils/0.3/noise-management-post-selection-transpiler-passes-add-spectator-measures "qiskit_addon_utils.noise_management.post_selection.transpiler.passes.AddSpectatorMeasures") | Add measurements on spectator qubits. |
+| [`AddPostSelectionMeasures`](/docs/api/qiskit-addon-utils/0.3/noise-management-post-selection-transpiler-passes-add-post-selection-measures "qiskit_addon_utils.noise_management.post_selection.transpiler.passes.AddPostSelectionMeasures") | Add a post selection measurement after every terminal measurement. |
+| [`XSlowGate`](/docs/api/qiskit-addon-utils/0.3/noise-management-post-selection-transpiler-passes-x-slow-gate "qiskit_addon_utils.noise_management.post_selection.transpiler.passes.XSlowGate") | The x-slow gate. |
+
diff --git a/docs/api/qiskit-addon-utils/0.3/noise-management.mdx b/docs/api/qiskit-addon-utils/0.3/noise-management.mdx
new file mode 100644
index 000000000000..fb89cc088778
--- /dev/null
+++ b/docs/api/qiskit-addon-utils/0.3/noise-management.mdx
@@ -0,0 +1,175 @@
+---
+title: noise_management (v0.3)
+description: API reference for qiskit_addon_utils.noise_management in qiskit-addon-utils v0.3
+in_page_toc_min_heading_level: 2
+python_api_type: module
+python_api_name: qiskit_addon_utils.noise_management
+---
+
+
+
+
+
+# noise\_management
+
+`qiskit_addon_utils.noise_management`
+
+Noise management tools.
+
+### trex\_factors
+
+
+ Calculates TREX mitigation algorithm’s expectation value scale factor for each Pauli term in `basis_dict`.
+
+ Calculates \ for each Pauli term in each observable, where n is the non identity indices in the Pauli term. The calculation is done using learned measurement noise.
+
+ **Parameters**
+
+ * **measurement\_noise\_map** ([*PauliLindbladMap*](/docs/api/qiskit/qiskit.quantum_info.PauliLindbladMap)) – Learned measurement noise in PauliLindbladMap format.
+ * **basis\_dict** ([*dict*](https://docs.python.org/3/library/stdtypes.html#dict)*\[*[*Pauli*](/docs/api/qiskit/qiskit.quantum_info.Pauli)*,* [*list*](https://docs.python.org/3/library/stdtypes.html#list)*\[*[*SparsePauliOp*](/docs/api/qiskit/qiskit.quantum_info.SparsePauliOp) *| None]]*) – Mapping between measure bases and observables in which the TREX algorithm mitigates their
+ * **calculation.** (*expectation value*)
+
+ **Returns**
+
+ A list of numpy array of floats that represent the TREX mitigation algorithm’s expectation value scale factor for each Pauli term in each observable in each basis in the given basis\_dict.
+
+
+### gamma\_from\_noisy\_boxes
+
+
+ Calculate the gamma factor for a circuit given the Pauli-Lindblad noise models for the boxes in that circuit.
+
+ This function expects the noise models to represent the noise in the circuit, and thus to have positive Lindblad rates. The returned gamma is that associated with the inverse noise maps needed to cancel the noise in the circuit.
+
+ **Parameters**
+
+ * **noise\_models** ([*dict*](https://docs.python.org/3/library/stdtypes.html#dict)*\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str)*,* [*PauliLindbladMap*](/docs/api/qiskit/qiskit.quantum_info.PauliLindbladMap)*]*) – Dict of noise-model IDs (strings) and learned noise models for each unique noisy box in the circuit.
+ * **box\_id\_to\_noise\_id** ([*dict*](https://docs.python.org/3/library/stdtypes.html#dict)*\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str)*,* [*str*](https://docs.python.org/3/library/stdtypes.html#str)*]*) – Dict of box IDs and noise-model IDs.
+ * **noise\_scales\_each\_box** ([*dict*](https://docs.python.org/3/library/stdtypes.html#dict)*\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str)*,* [*ndarray*](https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray)*] | None*) – Dict of box IDs and factors by which to rescale the Lindblad error rates of each generator in the associated noise model.
+
+ **Returns**
+
+ The gamma factor.
+
+ **Raises**
+
+ **ValueError if the length**\*\* of ****an array in noise\_scales\_each\_box does not equal the length**** of ****rates**** of \*\***the associated** – PauliLindbladMap in noise\_models.
+
+ **Return type**
+
+ [float](https://docs.python.org/3/library/functions.html#float)
+
+
+### PostSelectionSummary
+
+
+ Bases: [`object`](https://docs.python.org/3/library/functions.html#object)
+
+ A helper class to store the properties of a quantum circuit required to post select the results.
+
+ Initialize a `PostSelectionSummary` object.
+
+ **Parameters**
+
+ * **primary\_cregs** ([*set*](https://docs.python.org/3/library/stdtypes.html#set)*\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str)*]*) – The names of the “primary” classical registers, namely those that do not end with the post selection suffix.
+ * **measure\_map** ([*dict*](https://docs.python.org/3/library/stdtypes.html#dict)*\[*[*int*](https://docs.python.org/3/library/functions.html#int)*,* [*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple)*\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str)*,* [*int*](https://docs.python.org/3/library/functions.html#int)*]]*) – A map between qubit indices to the register and clbits that uniquely define a measurement on those qubits.
+ * **edges** ([*set*](https://docs.python.org/3/library/stdtypes.html#set)*\[*[*frozenset*](https://docs.python.org/3/library/stdtypes.html#frozenset)*\[*[*int*](https://docs.python.org/3/library/functions.html#int)*]]*) – A list of tuples defining pairs of neighboring qubits.
+ * **post\_selection\_suffix** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – The suffix of the post selection registers.
+
+ #### edges
+
+
+ A set of edges to consider for edge-based post selection.
+
+
+ #### from\_circuit
+
+
+ Initialize from quantum circuits.
+
+ **Parameters**
+
+ * **circuit** ([*QuantumCircuit*](/docs/api/qiskit/qiskit.circuit.QuantumCircuit)) – The circuit to create a summary of.
+ * **coupling\_map** ([*CouplingMap*](/docs/api/qiskit/qiskit.transpiler.CouplingMap) *|*[*list*](https://docs.python.org/3/library/stdtypes.html#list)*\[*[*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple)*\[*[*int*](https://docs.python.org/3/library/functions.html#int)*,* [*int*](https://docs.python.org/3/library/functions.html#int)*]]*) – A coupling map or a list of tuples indicating pairs of neighboring qubits.
+ * **post\_selection\_suffix** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – A fixed suffix to append to the names of the classical registers when copying them.
+
+ **Return type**
+
+ [*PostSelectionSummary*](#qiskit_addon_utils.noise_management.PostSelectionSummary "qiskit_addon_utils.noise_management.post_selection.post_selection_summary.PostSelectionSummary")
+
+
+ #### measure\_map
+
+
+ A map from qubit indices to the register and clbit index used to measure those qubits.
+
+
+ #### post\_selection\_suffix
+
+
+ The suffix of the post selection registers.
+
+
+ #### primary\_cregs
+
+
+ The names of the “primary” classical registers.
+
+
+
+### PostSelector
+
+
+ Bases: [`object`](https://docs.python.org/3/library/functions.html#object)
+
+ A class to process the results of quantum programs based on the outcome of post selection measurements.
+
+ Initialize a `PostSelector` object.
+
+ **Parameters**
+
+ **summary** ([*PostSelectionSummary*](#qiskit_addon_utils.noise_management.PostSelectionSummary "qiskit_addon_utils.noise_management.PostSelectionSummary")) – A summary of the circuit being post selected.
+
+ #### compute\_mask
+
+
+ Compute boolean masks indicating what shots should be kept or discarded for the given result.
+
+ This function compares the bits returned by every pair of measurement and post selection measurement, identifying all those that failed to flip. The shots that should be kept are marked as `True` in the returned mask, those that should be discarded are marked as `False`.
+
+ By construction, the returned mask has the same shape as the arrays in corresponding result, but with one fewer dimension (the last axis of every array, over clbits, is not present in the mask).
+
+ **Parameters**
+
+ * **result** ([*dict*](https://docs.python.org/3/library/stdtypes.html#dict)*\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str)*,* [*ndarray*](https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray)*\[*[*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple)*\[*[*int*](https://docs.python.org/3/library/functions.html#int)*, ...],* [*dtype*](https://numpy.org/doc/stable/reference/generated/numpy.dtype.html#numpy.dtype)*\[*[*bool*](https://numpy.org/doc/stable/reference/arrays.scalars.html#numpy.bool)*]]]*) – The result to post-process. It must be a `QuantumProgramResult` containing a single item or a dictionary.
+ * **strategy** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *| PostSelectionStrategy*) – The post selection strategy used to process the result.
+
+ **Return type**
+
+ [*ndarray*](https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray)\[[tuple](https://docs.python.org/3/library/stdtypes.html#tuple)\[[int](https://docs.python.org/3/library/functions.html#int), …], [*dtype*](https://numpy.org/doc/stable/reference/generated/numpy.dtype.html#numpy.dtype)\[[*bool*](https://numpy.org/doc/stable/reference/arrays.scalars.html#numpy.bool)]]
+
+
+ #### from\_circuit
+
+
+ Initialize from quantum circuits.
+
+ **Parameters**
+
+ * **circuits** – The circuits to process the results of.
+ * **coupling\_map** ([*CouplingMap*](/docs/api/qiskit/qiskit.transpiler.CouplingMap) *|*[*list*](https://docs.python.org/3/library/stdtypes.html#list)*\[*[*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple)*\[*[*int*](https://docs.python.org/3/library/functions.html#int)*,* [*int*](https://docs.python.org/3/library/functions.html#int)*]]*) – A coupling map or a list of tuples indicating pairs of neighboring qubits.
+ * **post\_selection\_suffix** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – A fixed suffix to append to the names of the classical registers when copying them.
+ * **circuit** ([*QuantumCircuit*](/docs/api/qiskit/qiskit.circuit.QuantumCircuit))
+
+ **Return type**
+
+ [*PostSelector*](#qiskit_addon_utils.noise_management.PostSelector "qiskit_addon_utils.noise_management.post_selection.post_selector.PostSelector")
+
+
+ #### summary
+
+
+ A summary of the circuit being post selected.
+
+
+
diff --git a/docs/api/qiskit-addon-utils/0.3/problem-generators.mdx b/docs/api/qiskit-addon-utils/0.3/problem-generators.mdx
new file mode 100644
index 000000000000..9347f0b28fda
--- /dev/null
+++ b/docs/api/qiskit-addon-utils/0.3/problem-generators.mdx
@@ -0,0 +1,161 @@
+---
+title: problem_generators (v0.3)
+description: API reference for qiskit_addon_utils.problem_generators in qiskit-addon-utils v0.3
+in_page_toc_min_heading_level: 2
+python_api_type: module
+python_api_name: qiskit_addon_utils.problem_generators
+---
+
+
+
+
+
+# problem\_generators
+
+`qiskit_addon_utils.problem_generators`
+
+Utility methods for problem generation.
+
+### generate\_xyz\_hamiltonian
+
+
+ Generate a connectivity-aware qubit operator representing a quantum XYZ-type model.
+
+ This function implements the following Hamiltonian:
+
+$$
+\hat{H} = \sum_{(j,k)\in E} (J_{x} \sigma_j^{x} \sigma_{k}^{x} +
+J_{y} \sigma_j^{y} \sigma_{k}^{y} + J_{z} \sigma_j^{z} \sigma_{k}^{z}) +
+\sum_{j\in V} (h_{x} \sigma_j^{x} + h_{y} \sigma_j^{y} + h_{z} \sigma_j^{z})
+$$
+
+ Where G(V,E) is the graph of the provided `coupling` map.
+
+
+ There is often a $-\frac{1}{2}$ factor included outside the summation of this equation. This factor is not applied internally, so it should be accounted for in the `coupling_constants` and `ext_magnetic_field` inputs.
+
+
+ ```python
+ >>> from qiskit.transpiler import CouplingMap
+ >>> from qiskit_addon_utils.problem_generators import generate_xyz_hamiltonian
+
+ >>> coupling_map = CouplingMap.from_line(10)
+ >>> hamiltonian = generate_xyz_hamiltonian(
+ ... coupling_map,
+ ... coupling_constants=(0.4, 0.4, 0.0),
+ ... ext_magnetic_field=(0.0, 0.0, 0.6),
+ ... )
+ >>> print(hamiltonian)
+ SparsePauliOp(['IIIIIIIXXI', 'IIIIIIIYYI', 'IIIIIXXIII', 'IIIIIYYIII',
+ 'IIIXXIIIII', 'IIIYYIIIII', 'IXXIIIIIII', 'IYYIIIIIII',
+ 'IIIIIIIIXX', 'IIIIIIIIYY', 'IIIIIIXXII', 'IIIIIIYYII',
+ 'IIIIXXIIII', 'IIIIYYIIII', 'IIXXIIIIII', 'IIYYIIIIII',
+ 'XXIIIIIIII', 'YYIIIIIIII', 'IIIIIIIIIZ', 'IIIIIIIIZI',
+ 'IIIIIIIZII', 'IIIIIIZIII', 'IIIIIZIIII', 'IIIIZIIIII',
+ 'IIIZIIIIII', 'IIZIIIIIII', 'IZIIIIIIII', 'ZIIIIIIIII'],
+ coeffs=[0.4+0.j, 0.4+0.j, 0.4+0.j, 0.4+0.j, 0.4+0.j, 0.4+0.j, 0.4+0.j, 0.4+0.j,
+ 0.4+0.j, 0.4+0.j, 0.4+0.j, 0.4+0.j, 0.4+0.j, 0.4+0.j, 0.4+0.j, 0.4+0.j,
+ 0.4+0.j, 0.4+0.j, 0.6+0.j, 0.6+0.j, 0.6+0.j, 0.6+0.j, 0.6+0.j, 0.6+0.j,
+ 0.6+0.j, 0.6+0.j, 0.6+0.j, 0.6+0.j])
+ ```
+
+ **Parameters**
+
+ * **coupling** ([*CouplingMap*](/docs/api/qiskit/qiskit.transpiler.CouplingMap) *|*[*PyGraph*](https://www.rustworkx.org/apiref/rustworkx.PyGraph.html#rustworkx.PyGraph) *|*[*PyDiGraph*](https://www.rustworkx.org/apiref/rustworkx.PyDiGraph.html#rustworkx.PyDiGraph)) – The qubit subgraph on which to map the Hamiltonian. Directionality of graph edges will be ignored, and parallel edges will be treated as a single edge during generation of the operator.
+ * **coupling\_constants** ([*Sequence*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Sequence)*\[*[*float*](https://docs.python.org/3/library/functions.html#float)*]*) – The real-valued coupling constants, $J_i$, in each Cartesian axis.
+ * **ext\_magnetic\_field** ([*Sequence*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Sequence)*\[*[*float*](https://docs.python.org/3/library/functions.html#float)*]*) – The coefficients, $h_i$, representing a magnetic field along each Cartesian axis.
+ * **pauli\_order\_strategy** ([*PauliOrderStrategy*](#qiskit_addon_utils.problem_generators.PauliOrderStrategy "qiskit_addon_utils.problem_generators.generate_xyz_hamiltonian.PauliOrderStrategy")) – Indicates the iteration strategy in which the Pauli terms will be generated. See [`PauliOrderStrategy`](#qiskit_addon_utils.problem_generators.PauliOrderStrategy "qiskit_addon_utils.problem_generators.PauliOrderStrategy") for more details.
+ * **coloring** ([*dict*](https://docs.python.org/3/library/stdtypes.html#dict)*\[*[*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple)*\[*[*int*](https://docs.python.org/3/library/functions.html#int)*,* [*int*](https://docs.python.org/3/library/functions.html#int)*],* [*int*](https://docs.python.org/3/library/functions.html#int)*] | None*) – An optional dictionary encoding the graph coloring that is used to sort the Hamiltonian terms. This dictionary maps edge labels (in the form of integer pairs) to color values (simple integers). Hamiltonian interaction terms will be added by increasing color value. Within each color, edges are sorted which does not change anything physically but results in easier to read results.
+
+ **Returns**
+
+ A qubit operator describing a quantum XYZ-type model. The `i`-th qubit in the operator corresponds to the node in index `i` on the coupling map.
+
+ **Raises**
+
+ * [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) – The coupling constants must be specified by a length-3 sequence of floating point values.
+ * [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) – The external magnetic field must be specified by a length-3 sequence of floating point values.
+
+ **Return type**
+
+ [*SparsePauliOp*](/docs/api/qiskit/qiskit.quantum_info.SparsePauliOp)
+
+
+### generate\_time\_evolution\_circuit
+
+
+ Model the time evolution of an operator.
+
+ ```python
+ >>> from qiskit.quantum_info import SparsePauliOp
+ >>> from qiskit.synthesis import SuzukiTrotter
+ >>> from qiskit.transpiler import CouplingMap
+ >>> from qiskit_addon_utils.problem_generators import (
+ ... PauliOrderStrategy,
+ ... generate_xyz_hamiltonian,
+ ... generate_time_evolution_circuit,
+ ... )
+ ```
+
+ ```python
+ >>> coupling_map = CouplingMap.from_line(6)
+ >>> hamiltonian = generate_xyz_hamiltonian(
+ ... coupling_map,
+ ... coupling_constants=(0.4, 0.4, 0.0),
+ ... ext_magnetic_field=(0.0, 0.0, 0.6),
+ ... pauli_order_strategy=PauliOrderStrategy.InteractionThenColorZigZag,
+ ... )
+ ```
+
+ ```python
+ >>> circ = generate_time_evolution_circuit(
+ ... hamiltonian, synthesis=SuzukiTrotter(order=2, reps=2), time=2.0
+ ... )
+ >>> _ = circ.draw("mpl", fold=-1)
+ ```
+
+ 
+
+ **Parameters**
+
+ * **operator** ([*SparsePauliOp*](/docs/api/qiskit/qiskit.quantum_info.SparsePauliOp)) – The operator for which to model the time evolution.
+ * **synthesis** ([*EvolutionSynthesis*](/docs/api/qiskit/qiskit.synthesis.EvolutionSynthesis) *| None*) – A synthesis strategy. If `None`, the default synthesis is the Lie-Trotter product formula with a single repetition.
+ * **time** ([*float*](https://docs.python.org/3/library/functions.html#float)) – The evolution time.
+
+ **Returns**
+
+ A [`QuantumCircuit`](/docs/api/qiskit/qiskit.circuit.QuantumCircuit) implementing a time-evolved operator.
+
+ **Return type**
+
+ [*QuantumCircuit*](/docs/api/qiskit/qiskit.circuit.QuantumCircuit)
+
+
+### PauliOrderStrategy
+
+
+ Bases: [`Enum`](https://docs.python.org/3/library/enum.html#enum.Enum)
+
+ Enumeration of different Pauli-orderings.
+
+ When constructing a Hamiltonian on a colored set of edges, the generated Pauli terms can be ordered in different ways. This order of terms in the Hamiltonian is preserved during its time evolution and, thus, directly impacts the resulting quantum circuit.
+
+ #### ColorThenInteraction
+
+
+ This strategy first iterates all edges (sorted by their color value) and then the interactions (sorted as `X`, `Y`, `Z`).
+
+
+ #### InteractionThenColor
+
+
+ This strategy is the inverse to `ColorThenInteraction`. It first iterates the interactions (sorted as `X`, `Y`, `Z`) and then all edges (sorted by their color value).
+
+
+ #### InteractionThenColorZigZag
+
+
+ This strategy is similar to the `InteractionThenColor` one. However, it alternates between iterating the edges by incrementing and decrementing color values as it jumps from one interaction to the next. For example, if only `X` and `Y` interactions are included and three color values are used (`{1, 2, 3}`), this will result in the following order: `["X on 1", "X on 2", "X on 3", "Y on 3", "Y on 2", "Y on 1"]`.
+
+
+
diff --git a/docs/api/qiskit-addon-utils/0.3/slicing-transpiler-passes-collect-op-color.mdx b/docs/api/qiskit-addon-utils/0.3/slicing-transpiler-passes-collect-op-color.mdx
new file mode 100644
index 000000000000..be132c68c65d
--- /dev/null
+++ b/docs/api/qiskit-addon-utils/0.3/slicing-transpiler-passes-collect-op-color.mdx
@@ -0,0 +1,113 @@
+---
+title: CollectOpColor (v0.3)
+description: API reference for qiskit_addon_utils.slicing.transpiler.passes.CollectOpColor in qiskit-addon-utils v0.3
+in_page_toc_min_heading_level: 1
+python_api_type: class
+python_api_name: qiskit_addon_utils.slicing.transpiler.passes.CollectOpColor
+---
+
+# CollectOpColor
+
+
+ Bases: [`CollectAndCollapse`](/docs/api/qiskit/qiskit.transpiler.passes.CollectAndCollapse)
+
+ Collects blocks of operations which act on the provided edges.
+
+ The collected operations are replaced by a single block instruction.
+
+ Initialize a `CollectOpColor` object.
+
+
+ The `do_commutative_analysis` keyword currently does not work as intended due to an open issue. Thus, setting it to `True` will not work.
+
+
+ **Parameters**
+
+ * **color\_name** – The name of the color to consolidate into blocks. This is used to prefix the labels on the produced block instructions such that each block is labeled `"{color_name}_slice"`.
+ * **edges** – The set of edges belonging to this color.
+ * **do\_commutative\_analysis** – If `True`, exploits commutativity relations between nodes. Note also the warning above.
+
+ ## Attributes
+
+ ### is\_analysis\_pass
+
+
+ Check if the pass is an analysis pass.
+
+ If the pass is an AnalysisPass, that means that the pass can analyze the DAG and write the results of that analysis in the property set. Modifications on the DAG are not allowed by this kind of pass.
+
+
+ ### is\_transformation\_pass
+
+
+ Check if the pass is a transformation pass.
+
+ If the pass is a TransformationPass, that means that the pass can manipulate the DAG, but cannot modify the property set (but it can be read).
+
+
+ ## Methods
+
+ ### execute
+
+
+ Execute optimization task for input Qiskit IR.
+
+ **Parameters**
+
+ * **passmanager\_ir** ([*Any*](https://docs.python.org/3/library/typing.html#typing.Any)) – Qiskit IR to optimize.
+ * **state** ([*PassManagerState*](/docs/api/qiskit/qiskit.passmanager.PassManagerState)) – State associated with workflow execution by the pass manager itself.
+ * **callback** ([*Callable*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Callable) *| None*) – A callback function which is caller per execution of optimization task.
+
+ **Returns**
+
+ Optimized Qiskit IR and state of the workflow.
+
+ **Return type**
+
+ [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)\[[*Any*](https://docs.python.org/3/library/typing.html#typing.Any), [*PassManagerState*](/docs/api/qiskit/qiskit.passmanager.PassManagerState)]
+
+
+ ### name
+
+
+ Name of the pass.
+
+ **Return type**
+
+ [str](https://docs.python.org/3/library/stdtypes.html#str)
+
+
+ ### run
+
+
+ Run the CollectLinearFunctions pass on dag. :param dag: the DAG to be optimized. :type dag: DAGCircuit
+
+ **Returns**
+
+ the optimized DAG.
+
+ **Return type**
+
+ DAGCircuit
+
+
+ ### update\_status
+
+
+ Update workflow status.
+
+ **Parameters**
+
+ * **state** ([*PassManagerState*](/docs/api/qiskit/qiskit.passmanager.PassManagerState)) – Pass manager state to update.
+ * **run\_state** (*RunState*) – Completion status of current task.
+
+ **Returns**
+
+ Updated pass manager state.
+
+ **Return type**
+
+ [*PassManagerState*](/docs/api/qiskit/qiskit.passmanager.PassManagerState)
+
+
+
diff --git a/docs/api/qiskit-addon-utils/0.3/slicing-transpiler-passes-collect-op-size.mdx b/docs/api/qiskit-addon-utils/0.3/slicing-transpiler-passes-collect-op-size.mdx
new file mode 100644
index 000000000000..ad5e9296b131
--- /dev/null
+++ b/docs/api/qiskit-addon-utils/0.3/slicing-transpiler-passes-collect-op-size.mdx
@@ -0,0 +1,110 @@
+---
+title: CollectOpSize (v0.3)
+description: API reference for qiskit_addon_utils.slicing.transpiler.passes.CollectOpSize in qiskit-addon-utils v0.3
+in_page_toc_min_heading_level: 1
+python_api_type: class
+python_api_name: qiskit_addon_utils.slicing.transpiler.passes.CollectOpSize
+---
+
+# CollectOpSize
+
+
+ Bases: [`CollectAndCollapse`](/docs/api/qiskit/qiskit.transpiler.passes.CollectAndCollapse)
+
+ Collects blocks of the specified size and replaces them by a single block instruction.
+
+ Initialize a `CollectOpSize` object.
+
+
+ The `do_commutative_analysis` keyword currently does not work as intended due to an open issue. Thus, setting it to `True` will not work.
+
+
+ **Parameters**
+
+ * **size** – The size of operations to collect.
+ * **do\_commutative\_analysis** – If `True`, exploits commutativity relations between nodes. Note also the warning above.
+
+ ## Attributes
+
+ ### is\_analysis\_pass
+
+
+ Check if the pass is an analysis pass.
+
+ If the pass is an AnalysisPass, that means that the pass can analyze the DAG and write the results of that analysis in the property set. Modifications on the DAG are not allowed by this kind of pass.
+
+
+ ### is\_transformation\_pass
+
+
+ Check if the pass is a transformation pass.
+
+ If the pass is a TransformationPass, that means that the pass can manipulate the DAG, but cannot modify the property set (but it can be read).
+
+
+ ## Methods
+
+ ### execute
+
+
+ Execute optimization task for input Qiskit IR.
+
+ **Parameters**
+
+ * **passmanager\_ir** ([*Any*](https://docs.python.org/3/library/typing.html#typing.Any)) – Qiskit IR to optimize.
+ * **state** ([*PassManagerState*](/docs/api/qiskit/qiskit.passmanager.PassManagerState)) – State associated with workflow execution by the pass manager itself.
+ * **callback** ([*Callable*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Callable) *| None*) – A callback function which is caller per execution of optimization task.
+
+ **Returns**
+
+ Optimized Qiskit IR and state of the workflow.
+
+ **Return type**
+
+ [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)\[[*Any*](https://docs.python.org/3/library/typing.html#typing.Any), [*PassManagerState*](/docs/api/qiskit/qiskit.passmanager.PassManagerState)]
+
+
+ ### name
+
+
+ Name of the pass.
+
+ **Return type**
+
+ [str](https://docs.python.org/3/library/stdtypes.html#str)
+
+
+ ### run
+
+
+ Run the CollectLinearFunctions pass on dag. :param dag: the DAG to be optimized. :type dag: DAGCircuit
+
+ **Returns**
+
+ the optimized DAG.
+
+ **Return type**
+
+ DAGCircuit
+
+
+ ### update\_status
+
+
+ Update workflow status.
+
+ **Parameters**
+
+ * **state** ([*PassManagerState*](/docs/api/qiskit/qiskit.passmanager.PassManagerState)) – Pass manager state to update.
+ * **run\_state** (*RunState*) – Completion status of current task.
+
+ **Returns**
+
+ Updated pass manager state.
+
+ **Return type**
+
+ [*PassManagerState*](/docs/api/qiskit/qiskit.passmanager.PassManagerState)
+
+
+
diff --git a/docs/api/qiskit-addon-utils/0.3/slicing-transpiler-passes-collect-op-type.mdx b/docs/api/qiskit-addon-utils/0.3/slicing-transpiler-passes-collect-op-type.mdx
new file mode 100644
index 000000000000..f4c0af6ec736
--- /dev/null
+++ b/docs/api/qiskit-addon-utils/0.3/slicing-transpiler-passes-collect-op-type.mdx
@@ -0,0 +1,110 @@
+---
+title: CollectOpType (v0.3)
+description: API reference for qiskit_addon_utils.slicing.transpiler.passes.CollectOpType in qiskit-addon-utils v0.3
+in_page_toc_min_heading_level: 1
+python_api_type: class
+python_api_name: qiskit_addon_utils.slicing.transpiler.passes.CollectOpType
+---
+
+# CollectOpType
+
+
+ Bases: [`CollectAndCollapse`](/docs/api/qiskit/qiskit.transpiler.passes.CollectAndCollapse)
+
+ Collects blocks of the specified operation and replaces them by a single block instruction.
+
+ Initialize a `CollectOpType` object.
+
+
+ The `do_commutative_analysis` keyword currently does not work as intended due to an open issue. Thus, setting it to `True` will not work.
+
+
+ **Parameters**
+
+ * **op\_name** – The name of the operation to consolidate into blocks.
+ * **do\_commutative\_analysis** – If `True`, exploits commutativity relations between nodes. Note also the warning above.
+
+ ## Attributes
+
+ ### is\_analysis\_pass
+
+
+ Check if the pass is an analysis pass.
+
+ If the pass is an AnalysisPass, that means that the pass can analyze the DAG and write the results of that analysis in the property set. Modifications on the DAG are not allowed by this kind of pass.
+
+
+ ### is\_transformation\_pass
+
+
+ Check if the pass is a transformation pass.
+
+ If the pass is a TransformationPass, that means that the pass can manipulate the DAG, but cannot modify the property set (but it can be read).
+
+
+ ## Methods
+
+ ### execute
+
+
+ Execute optimization task for input Qiskit IR.
+
+ **Parameters**
+
+ * **passmanager\_ir** ([*Any*](https://docs.python.org/3/library/typing.html#typing.Any)) – Qiskit IR to optimize.
+ * **state** ([*PassManagerState*](/docs/api/qiskit/qiskit.passmanager.PassManagerState)) – State associated with workflow execution by the pass manager itself.
+ * **callback** ([*Callable*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Callable) *| None*) – A callback function which is caller per execution of optimization task.
+
+ **Returns**
+
+ Optimized Qiskit IR and state of the workflow.
+
+ **Return type**
+
+ [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)\[[*Any*](https://docs.python.org/3/library/typing.html#typing.Any), [*PassManagerState*](/docs/api/qiskit/qiskit.passmanager.PassManagerState)]
+
+
+ ### name
+
+
+ Name of the pass.
+
+ **Return type**
+
+ [str](https://docs.python.org/3/library/stdtypes.html#str)
+
+
+ ### run
+
+
+ Run the CollectLinearFunctions pass on dag. :param dag: the DAG to be optimized. :type dag: DAGCircuit
+
+ **Returns**
+
+ the optimized DAG.
+
+ **Return type**
+
+ DAGCircuit
+
+
+ ### update\_status
+
+
+ Update workflow status.
+
+ **Parameters**
+
+ * **state** ([*PassManagerState*](/docs/api/qiskit/qiskit.passmanager.PassManagerState)) – Pass manager state to update.
+ * **run\_state** (*RunState*) – Completion status of current task.
+
+ **Returns**
+
+ Updated pass manager state.
+
+ **Return type**
+
+ [*PassManagerState*](/docs/api/qiskit/qiskit.passmanager.PassManagerState)
+
+
+
diff --git a/docs/api/qiskit-addon-utils/0.3/slicing-transpiler-passes.mdx b/docs/api/qiskit-addon-utils/0.3/slicing-transpiler-passes.mdx
new file mode 100644
index 000000000000..7c510c3044f7
--- /dev/null
+++ b/docs/api/qiskit-addon-utils/0.3/slicing-transpiler-passes.mdx
@@ -0,0 +1,24 @@
+---
+title: passes (v0.3)
+description: API reference for qiskit_addon_utils.slicing.transpiler.passes in qiskit-addon-utils v0.3
+in_page_toc_min_heading_level: 2
+python_api_type: module
+python_api_name: qiskit_addon_utils.slicing.transpiler.passes
+---
+
+
+
+
+
+# slicing\_transpiler\_passes
+
+`qiskit_addon_utils.slicing.transpiler.passes`
+
+A submodule with transpilation passes for slicing.
+
+| | |
+| ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
+| [`CollectOpColor`](/docs/api/qiskit-addon-utils/0.3/slicing-transpiler-passes-collect-op-color "qiskit_addon_utils.slicing.transpiler.passes.CollectOpColor") | Collects blocks of operations which act on the provided edges. |
+| [`CollectOpSize`](/docs/api/qiskit-addon-utils/0.3/slicing-transpiler-passes-collect-op-size "qiskit_addon_utils.slicing.transpiler.passes.CollectOpSize") | Collects blocks of the specified size and replaces them by a single block instruction. |
+| [`CollectOpType`](/docs/api/qiskit-addon-utils/0.3/slicing-transpiler-passes-collect-op-type "qiskit_addon_utils.slicing.transpiler.passes.CollectOpType") | Collects blocks of the specified operation and replaces them by a single block instruction. |
+
diff --git a/docs/api/qiskit-addon-utils/0.3/slicing.mdx b/docs/api/qiskit-addon-utils/0.3/slicing.mdx
new file mode 100644
index 000000000000..75e4c4d488c1
--- /dev/null
+++ b/docs/api/qiskit-addon-utils/0.3/slicing.mdx
@@ -0,0 +1,180 @@
+---
+title: slicing (v0.3)
+description: API reference for qiskit_addon_utils.slicing in qiskit-addon-utils v0.3
+in_page_toc_min_heading_level: 2
+python_api_type: module
+python_api_name: qiskit_addon_utils.slicing
+---
+
+
+
+
+
+# slicing
+
+`qiskit_addon_utils.slicing`
+
+Utility methods for circuit slicing.
+
+For more information, check out the [how-to guide](https://qiskit.github.io/qiskit-addon-utils/how_tos/create_circuit_slices.html) which discusses this submodule.
+
+### combine\_slices
+
+
+ Combine N-qubit slices of a circuit into a single circuit.
+
+ **Parameters**
+
+ * **slices** ([*Sequence*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Sequence)*\[*[*QuantumCircuit*](/docs/api/qiskit/qiskit.circuit.QuantumCircuit)*]*) – The N-qubit circuit slices.
+ * **include\_barriers** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) – If `True`, place barriers between each slice.
+
+ **Returns**
+
+ A [`QuantumCircuit`](/docs/api/qiskit/qiskit.circuit.QuantumCircuit) with the slices appended in sequential order.
+
+ **Raises**
+
+ [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) – Two input slices were defined on different numbers of qubits.
+
+ **Return type**
+
+ [*QuantumCircuit*](/docs/api/qiskit/qiskit.circuit.QuantumCircuit) | None
+
+
+### slice\_by\_barriers
+
+
+ Split a `QuantumCircuit` into slices around full-circuit barriers.
+
+ Barriers which do not act on all circuit qubits will be treated as normal operations and included in the slices. Barriers which act on all qubits will be interpreted as slice locations and will not be included in the output slices.
+
+ **Parameters**
+
+ **circuit** ([*QuantumCircuit*](/docs/api/qiskit/qiskit.circuit.QuantumCircuit)) – The circuit to be split.
+
+ **Returns**
+
+ A sequence of [`QuantumCircuit`](/docs/api/qiskit/qiskit.circuit.QuantumCircuit) objects, one for each slice.
+
+ **Return type**
+
+ [list](https://docs.python.org/3/library/stdtypes.html#list)\[[*QuantumCircuit*](/docs/api/qiskit/qiskit.circuit.QuantumCircuit)]
+
+
+### slice\_by\_coloring
+
+
+ Split a `QuantumCircuit` into slices using the provided edge coloring.
+
+ Two-qubit gates acting on identically colored qubit connections (edges) will be grouped greedily into slices using [`CollectOpColor`](/docs/api/qiskit-addon-utils/0.3/slicing-transpiler-passes-collect-op-color "qiskit_addon_utils.slicing.transpiler.passes.CollectOpColor"). This will be done in order of increasing color value (the integer values which each edge is mapped to).
+
+
+ Note, that this does *not* mean that low valued color slices are guaranteed to be left-most in your circuit. Below is an example to emphasize this.
+
+
+ ```python
+ >>> from qiskit import QuantumCircuit
+
+ >>> circuit = QuantumCircuit(5)
+ >>> _ = circuit.cx(0, 1)
+ >>> _ = circuit.cx(3, 4)
+ >>> _ = circuit.cx(2, 3)
+
+ >>> circuit.draw()
+ q_0: ──■───────
+ ┌─┴─┐
+ q_1: ┤ X ├─────
+ └───┘
+ q_2: ───────■──
+ ┌─┴─┐
+ q_3: ──■──┤ X ├
+ ┌─┴─┐└───┘
+ q_4: ┤ X ├─────
+ └───┘
+
+ >>> coloring = {(0, 1): 0, (2, 3): 0, (3, 4): 1}
+
+ >>> from qiskit_addon_utils.slicing import combine_slices, slice_by_coloring
+
+ >>> slices = slice_by_coloring(circuit, coloring)
+
+ # for illustration purposes, we are recombining the slices with barriers
+ >>> recombined = combine_slices(slices, include_barriers=True)
+ >>> recombined.draw()
+ ░
+ q_0: ──────░───■──
+ ░ ┌─┴─┐
+ q_1: ──────░─┤ X ├
+ ░ └───┘
+ q_2: ──────░───■──
+ ░ ┌─┴─┐
+ q_3: ──■───░─┤ X ├
+ ┌─┴─┐ ░ └───┘
+ q_4: ┤ X ├─░──────
+ └───┘ ░
+ ```
+
+ Single-qubit gates will be collected into a single slice using [`CollectOpSize`](/docs/api/qiskit-addon-utils/0.3/slicing-transpiler-passes-collect-op-size "qiskit_addon_utils.slicing.transpiler.passes.CollectOpSize").
+
+ **Parameters**
+
+ * **circuit** ([*QuantumCircuit*](/docs/api/qiskit/qiskit.circuit.QuantumCircuit)) – The circuit to be split.
+ * **coloring** ([*dict*](https://docs.python.org/3/library/stdtypes.html#dict)*\[*[*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple)*\[*[*int*](https://docs.python.org/3/library/functions.html#int)*,* [*int*](https://docs.python.org/3/library/functions.html#int)*],* [*int*](https://docs.python.org/3/library/functions.html#int)*]*) – A dictionary mapping edges (pairs of integers) to color values.
+
+ **Returns**
+
+ A sequence of [`QuantumCircuit`](/docs/api/qiskit/qiskit.circuit.QuantumCircuit) objects, one for each slice.
+
+ **Raises**
+
+ * [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) – The input edge coloring is invalid.
+ * [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) – Could not assign a color to circuit instruction.
+
+ **Return type**
+
+ [list](https://docs.python.org/3/library/stdtypes.html#list)\[[*QuantumCircuit*](/docs/api/qiskit/qiskit.circuit.QuantumCircuit)]
+
+
+### slice\_by\_depth
+
+
+ Split a `QuantumCircuit` into slices based on depth.
+
+ This function transforms the input circuit into a [`DAGCircuit`](/docs/api/qiskit/qiskit.dagcircuit.DAGCircuit) and batches the sequence of depth-1 layers output from [`layers()`](/docs/api/qiskit/qiskit.dagcircuit.DAGCircuit#layers) into slices of depth not exceeding `max_slice_depth`. This is achieved by composing layers into slices until the max slice depth is reached and then starting a new slice with the next layer. The final slice may be composed of fewer than `max_slice_depth` layers.
+
+ **Parameters**
+
+ * **circuit** ([*QuantumCircuit*](/docs/api/qiskit/qiskit.circuit.QuantumCircuit)) – The circuit to be split.
+ * **max\_slice\_depth** ([*int*](https://docs.python.org/3/library/functions.html#int)) – The maximum depth of a given slice.
+
+ **Returns**
+
+ A sequence of [`QuantumCircuit`](/docs/api/qiskit/qiskit.circuit.QuantumCircuit) objects, one for each slice.
+
+ **Return type**
+
+ [list](https://docs.python.org/3/library/stdtypes.html#list)\[[*QuantumCircuit*](/docs/api/qiskit/qiskit.circuit.QuantumCircuit)]
+
+
+### slice\_by\_gate\_types
+
+
+ Split a `QuantumCircuit` into depth-1 slices of operations of the same type.
+
+
+ Note: Adjacent slices sharing no qubits in common may be ordered arbitrarily.
+
+
+ **Parameters**
+
+ **circuit** ([*QuantumCircuit*](/docs/api/qiskit/qiskit.circuit.QuantumCircuit)) – The circuit to be split.
+
+ **Returns**
+
+ A sequence of [`QuantumCircuit`](/docs/api/qiskit/qiskit.circuit.QuantumCircuit) objects, one for each slice.
+
+ **Return type**
+
+ [list](https://docs.python.org/3/library/stdtypes.html#list)\[[*QuantumCircuit*](/docs/api/qiskit/qiskit.circuit.QuantumCircuit)]
+
+
diff --git a/docs/api/qiskit-addon-utils/_package.json b/docs/api/qiskit-addon-utils/_package.json
index 648d449cc7c8..e7e36c1e29e7 100644
--- a/docs/api/qiskit-addon-utils/_package.json
+++ b/docs/api/qiskit-addon-utils/_package.json
@@ -1,4 +1,4 @@
{
"name": "qiskit-addon-utils",
- "version": "0.3.1"
+ "version": "0.4.0"
}
diff --git a/docs/api/qiskit-addon-utils/_toc.json b/docs/api/qiskit-addon-utils/_toc.json
index 890eceb867e7..e5450453c2dc 100644
--- a/docs/api/qiskit-addon-utils/_toc.json
+++ b/docs/api/qiskit-addon-utils/_toc.json
@@ -25,6 +25,46 @@
"url": "/docs/api/qiskit-addon-utils/noise-management",
"untranslatable": true
},
+ {
+ "title": "qiskit_addon_utils.noise_management.bit_flip_checks",
+ "url": "/docs/api/qiskit-addon-utils/noise-management-bit-flip-checks",
+ "untranslatable": true
+ },
+ {
+ "title": "qiskit_addon_utils.noise_management.bit_flip_checks.passes",
+ "untranslatable": true,
+ "children": [
+ {
+ "title": "Module overview",
+ "url": "/docs/api/qiskit-addon-utils/noise-management-bit-flip-checks-passes"
+ },
+ {
+ "title": "AddPostCircuitBitFlipChecks",
+ "url": "/docs/api/qiskit-addon-utils/noise-management-bit-flip-checks-passes-add-post-circuit-bit-flip-checks",
+ "untranslatable": true
+ },
+ {
+ "title": "AddPreCircuitBitFlipChecks",
+ "url": "/docs/api/qiskit-addon-utils/noise-management-bit-flip-checks-passes-add-pre-circuit-bit-flip-checks",
+ "untranslatable": true
+ },
+ {
+ "title": "AddSpectatorPostCircuitBitFlipChecks",
+ "url": "/docs/api/qiskit-addon-utils/noise-management-bit-flip-checks-passes-add-spectator-post-circuit-bit-flip-checks",
+ "untranslatable": true
+ },
+ {
+ "title": "AddSpectatorPreCircuitBitFlipChecks",
+ "url": "/docs/api/qiskit-addon-utils/noise-management-bit-flip-checks-passes-add-spectator-pre-circuit-bit-flip-checks",
+ "untranslatable": true
+ },
+ {
+ "title": "XPulseType",
+ "url": "/docs/api/qiskit-addon-utils/noise-management-bit-flip-checks-passes-x-pulse-type",
+ "untranslatable": true
+ }
+ ]
+ },
{
"title": "qiskit_addon_utils.noise_management.post_selection.transpiler.passes",
"untranslatable": true,
@@ -87,5 +127,7 @@
}
],
"collapsed": true,
- "untranslatable": true
+ "untranslatable": true,
+ "parentUrl": "/docs/addons/qiskit-addon-utils",
+ "parentLabel": "Qiskit addon utilities"
}
diff --git a/docs/api/qiskit-addon-utils/coloring.mdx b/docs/api/qiskit-addon-utils/coloring.mdx
index 1252944d9f20..b4ed6d806b07 100644
--- a/docs/api/qiskit-addon-utils/coloring.mdx
+++ b/docs/api/qiskit-addon-utils/coloring.mdx
@@ -18,7 +18,7 @@ Utility methods for coloring.
### auto\_color\_edges
-
+
Color the input edges of an undirected graph such that no two incident edges share a color.
**Parameters**
@@ -36,7 +36,7 @@ Utility methods for coloring.
### is\_valid\_edge\_coloring
-
+
Check whether an edge coloring scheme is valid.
An edge coloring is valid if no two edges of the same color share a node.
diff --git a/docs/api/qiskit-addon-utils/exp-vals.mdx b/docs/api/qiskit-addon-utils/exp-vals.mdx
index 27e37a407841..38288cc87783 100644
--- a/docs/api/qiskit-addon-utils/exp-vals.mdx
+++ b/docs/api/qiskit-addon-utils/exp-vals.mdx
@@ -18,26 +18,39 @@ Tools for calculating expectation values.
### executor\_expectation\_values
-
- Computes expectation values from boolean data and metadata, aiming for compatibility with the components of a result from `Executor` in `qiskit_ibm_runtime` .
+
+ Computes expectation values from shot data from `qiskit_ibm_runtime.Executor` and metadata.
- Uses data in bool\_array, acquired with measurement bases as ordered in keys of basis\_dict, to compute observables encoded in values of basis\_dict.
+ Uses data in `bool_array`, acquired with measurement bases as ordered in keys of `basis_dict`, to compute observables encoded in values of `basis_dict`.
- Optionally allows averaging over additional axes of bool\_array, as when twirling.
+ Optionally allows averaging over additional axes of `bool_array`, as when twirling.
Optionally supports measurement twirling, PEC, and postselection.
**Parameters**
- * **bool\_array** ([*ndarray*](https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray)*\[*[*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple)*\[*[*int*](https://docs.python.org/3/library/functions.html#int)*, ...],* [*dtype*](https://numpy.org/doc/stable/reference/generated/numpy.dtype.html#numpy.dtype)*\[*[*bool*](https://numpy.org/doc/stable/reference/arrays.scalars.html#numpy.bool)*]]*) – Boolean array, presumably representing data from measured qubits. The last two axes are the number of shots and number of classical bits, respectively. The least significant bit is assumed to be at index 0 of the bits axis. If meas\_basis\_axis is given, that axis of bool\_array indexes the measurement bases, with length len(basis\_dict).
- * **basis\_dict** ([*dict*](https://docs.python.org/3/library/stdtypes.html#dict)*\[*[*Pauli*](/docs/api/qiskit/qiskit.quantum_info.Pauli)*,* [*list*](https://docs.python.org/3/library/stdtypes.html#list)*\[*[*SparsePauliOp*](/docs/api/qiskit/qiskit.quantum_info.SparsePauliOp) *| None]]*) – This dict encodes how the data in bool\_array should be used to estimate the desired list of Pauli observables. The ith key is a measurement basis assumed to correspond to the ith slice of bool\_array along the meas\_basis\_axis axis. Each dict value is a list of length equal to the number of desired observables. The jth element of this list is a SparsePauliOp assumed to be compatible (qubit-wise commuting) with the measurement-basis key. In place of a SparsePauliOp, None may be used to represent the zero operator, when a basis is not used to compute an observable. The jth observable is defined as the sum of the jth element of each dict value (contribution from each meas basis). - Note the order of dict entries is relied on here for indexing; the dict keys are never used. - Assumes each Pauli term (in dict values) is compatible with each measurement basis (in keys). - Assumes each term in each observable appears for exactly one basis.
- * **meas\_basis\_axis** ([*int*](https://docs.python.org/3/library/functions.html#int) *| None*) – Axis of bool\_array that indexes measurement bases. Ordering must match ordering in basis\_dict. If None, then len(basis\_dict) must be 1, and bool\_array is assumed to correspond to the only measurement basis.
- * **avg\_axis** ([*int*](https://docs.python.org/3/library/functions.html#int) *|*[*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple)*\[*[*int*](https://docs.python.org/3/library/functions.html#int)*, ...] | None*) – Optional axis or axes of bool\_array to average over when computing expectation values. Usually this is the “twirling” axis. Must be nonnegative. (The shots axis, assumed to be at index -2 in the boolean array, is always averaged over).
- * **measurement\_flips** ([*ndarray*](https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray)*\[*[*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple)*\[*[*int*](https://docs.python.org/3/library/functions.html#int)*, ...],* [*dtype*](https://numpy.org/doc/stable/reference/generated/numpy.dtype.html#numpy.dtype)*\[*[*bool*](https://numpy.org/doc/stable/reference/arrays.scalars.html#numpy.bool)*]] | None*) – Optional boolean array used with measurement twirling. Indicates which bits were acquired with measurements preceded by bit-flip gates. Data processing will use the result of xor\`ing this array with \`bool\_array. Must be same shape as bool\_array.
- * **pauli\_signs** ([*ndarray*](https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray)*\[*[*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple)*\[*[*int*](https://docs.python.org/3/library/functions.html#int)*, ...],* [*dtype*](https://numpy.org/doc/stable/reference/generated/numpy.dtype.html#numpy.dtype)*\[*[*bool*](https://numpy.org/doc/stable/reference/arrays.scalars.html#numpy.bool)*]] | None*) – Optional boolean array used with probabilistic error cancellation (PEC). Final axis is assumed to index all noisy boxes in circuit. Value of True indicates an overall sign of -1 should be associated with the noisy box, typically because an odd number of inverse-noise errors were inserted in that box for the specified circuit randomization. The final axis is immediately collapsed as a sum mod 2 to obtain the overall sign associated with each circuit randomization. Remaining shape must be pauli\_signs.shape\[:-1] == bool\_array.shape\[:-2]. Note this array does not have a shots axis.
- * **postselect\_mask** ([*ndarray*](https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray)*\[*[*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple)*\[*[*int*](https://docs.python.org/3/library/functions.html#int)*, ...],* [*dtype*](https://numpy.org/doc/stable/reference/generated/numpy.dtype.html#numpy.dtype)*\[*[*bool*](https://numpy.org/doc/stable/reference/arrays.scalars.html#numpy.bool)*]] | None*) – Optional boolean array used for postselection. True (False) indicates a shot accepted (rejected) by postselection. Shape must be bool\_array.shape\[:-1].
- * **gamma\_factor** ([*float*](https://docs.python.org/3/library/functions.html#float) *| None*) – Rescaling factor gamma to be applied to PEC mitigated expectation values. If None, rescaling factors will be computed as the number of positive samples minus the number of negative samples, computed as 1/(np.sum(\~pauli\_signs, axis=avg\_axis) - np.sum(pauli\_signs, axis=avg\_axis)). This can fail due to division by zero if there are an equal number of positive and negative samples. Also note this rescales each expectation value by a different factor. (TODO: allow specifying an array of gamma values).
- * **rescale\_factors** ([*Sequence*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Sequence)*\[*[*Sequence*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Sequence)*\[*[*Sequence*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Sequence)*\[*[*float*](https://docs.python.org/3/library/functions.html#float)*]]] | None*) – Scale factor for each Pauli term in each observable in each basis in the given `basis_dict`. Typically used for readout mitigation (“TREX”) correction factors. Each item in the list corresponds to a different basis, and contains a list of lists of factors for each term in each observable related to that basis. The order of the bases and the observables inside each basis should be the same as in basis\_dict. For empty observables for some of the bases, keep an empty list. If None, scaling factor will not be applied.
+ * **bool\_array** ([*ndarray*](https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray)*\[*[*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple)*\[*[*int*](https://docs.python.org/3/library/functions.html#int)*, ...],* [*dtype*](https://numpy.org/doc/stable/reference/generated/numpy.dtype.html#numpy.dtype)*\[*[*bool*](https://numpy.org/doc/stable/reference/arrays.scalars.html#numpy.bool)*]]*) – Boolean array, presumably representing data from measured qubits. The last two axes are the number of shots and number of classical bits, respectively. The least significant bit is assumed to be at index `0` of the bits axis. If `meas_basis_axis` is given, that axis of `bool_array` indexes the measurement bases, with length `len(basis_mapping)`.
+
+ * **basis\_mapping** ([*dict*](https://docs.python.org/3/library/stdtypes.html#dict)*\[*[*Pauli*](/docs/api/qiskit/qiskit.quantum_info.Pauli)*,* [*list*](https://docs.python.org/3/library/stdtypes.html#list)*\[*[*SparsePauliOp*](/docs/api/qiskit/qiskit.quantum_info.SparsePauliOp) *| None]] |*[*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple)*\[*[*Sequence*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Sequence)*\[*[*SparsePauliOp*](/docs/api/qiskit/qiskit.quantum_info.SparsePauliOp)*],* [*Sequence*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Sequence)*\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str)*] |* [*PauliList*](/docs/api/qiskit/qiskit.quantum_info.PauliList)*]*) –
+
+ The Pauli observables and associated bases which were measured. Can be a `tuple`, `(observables, msmt_bases)`, or a `dict`, `{basis: commuting_observables}`.
+
+ * **tuple**: A length-2 tuple containing `(observables, msmt_bases)`, where `observables` is a sequence of `SparsePauliOp` instances for which individual expectation values should be calculated, and `msmt_bases` is a sequence of Pauli observables. The `i` th Pauli in `msmt_bases` is expected to correspond to the `i` th slice of `bool_array` along the `meas_basis_axis`.
+ * **dict**: The `i` th key is a measurement basis assumed to correspond to the `i` th slice of `bool_array` along the `meas_basis_axis` axis. The values are lists of observables (`SparsePauliOp`) with length equal to the number of observables. `None` values are used when an observable does not qubit-wise commute with the basis. This method assumes each observable appears only once in the values, even if it commutes with more than one basis.
+
+ * **meas\_basis\_axis** ([*int*](https://docs.python.org/3/library/functions.html#int) *| None*) – Axis of bool\_array that indexes measurement bases. Ordering must match ordering in `basis_mapping`. If `None`, then `len(basis_mapping)` must be `1`, and `bool_array` is assumed to correspond to the only measurement basis.
+
+ * **avg\_axis** ([*int*](https://docs.python.org/3/library/functions.html#int) *|*[*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple)*\[*[*int*](https://docs.python.org/3/library/functions.html#int)*, ...] | None*) – Optional axis or axes of bool\_array to average over when computing expectation values. Usually this is the “twirling” axis. Must be nonnegative. (The shots axis, assumed to be at index `-2` in the boolean array, is always averaged over).
+
+ * **measurement\_flips** ([*ndarray*](https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray)*\[*[*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple)*\[*[*int*](https://docs.python.org/3/library/functions.html#int)*, ...],* [*dtype*](https://numpy.org/doc/stable/reference/generated/numpy.dtype.html#numpy.dtype)*\[*[*bool*](https://numpy.org/doc/stable/reference/arrays.scalars.html#numpy.bool)*]] | None*) – Optional boolean array used with measurement twirling. Indicates which bits were acquired with measurements preceded by bit-flip gates. Data processing will use the result of XOR’ing this array with `bool_array`. Must be same shape as `bool_array`.
+
+ * **pauli\_signs** ([*ndarray*](https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray)*\[*[*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple)*\[*[*int*](https://docs.python.org/3/library/functions.html#int)*, ...],* [*dtype*](https://numpy.org/doc/stable/reference/generated/numpy.dtype.html#numpy.dtype)*\[*[*bool*](https://numpy.org/doc/stable/reference/arrays.scalars.html#numpy.bool)*]] | None*) – Optional boolean array used with probabilistic error cancellation (PEC). Final axis is assumed to index all noisy boxes in circuit. Value of `True` indicates an overall sign of `-1` should be associated with the noisy box, typically because an odd number of inverse-noise errors were inserted in that box for the specified circuit randomization. The final axis is immediately collapsed as a sum mod 2 to obtain the overall sign associated with each circuit randomization. Remaining shape must be `pauli_signs.shape[:-1] == bool_array.shape[:-2]`. Note this array does not have a shots axis.
+
+ * **postselect\_mask** ([*ndarray*](https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray)*\[*[*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple)*\[*[*int*](https://docs.python.org/3/library/functions.html#int)*, ...],* [*dtype*](https://numpy.org/doc/stable/reference/generated/numpy.dtype.html#numpy.dtype)*\[*[*bool*](https://numpy.org/doc/stable/reference/arrays.scalars.html#numpy.bool)*]] | None*) – Optional boolean array used for postselection. `True` (`False`) indicates a shot accepted (rejected) by postselection. Shape must be `bool_array.shape[:-1]`.
+
+ * **gamma\_factor** ([*float*](https://docs.python.org/3/library/functions.html#float) *| None*) – Rescaling factor gamma to be applied to PEC mitigated expectation values. If `None`, rescaling factors will be computed as the number of positive samples minus the number of negative samples, computed as `1/(np.sum(~pauli_signs, axis=avg_axis) - np.sum(pauli_signs, axis=avg_axis))`. This can fail due to division by zero if there are an equal number of positive and negative samples. Also note this rescales each expectation value by a different factor. (TODO: allow specifying an array of gamma values).
+
+ * **rescale\_factors** ([*Sequence*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Sequence)*\[*[*Sequence*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Sequence)*\[*[*Sequence*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Sequence)*\[*[*float*](https://docs.python.org/3/library/functions.html#float)*]]] | None*) – Scale factor for each Pauli term in each observable in each basis in the given `basis_mapping`. Typically used for readout mitigation (“TREX”) correction factors. Each item in the list corresponds to a different basis, and contains a list of lists of factors for each term in each observable related to that basis. The order of the bases and the observables inside each basis should be the same as in `basis_mapping`. For empty observables for some of the bases, keep an empty list. If `None`, scaling factor will not be applied.
**Returns**
@@ -45,18 +58,19 @@ Tools for calculating expectation values.
**Note: Covariances between summed terms in each observable are not currently accounted for in the**
- returned variances. (TODO)
+ returned variances. # TODO
**Raises**
- * **ValueError if avg\_axis contains negative values.** –
- * **ValueError if meas\_basis\_axis is None but len**\*\*(****basis\_dict****) \*\***!= 1.** –
- * **ValueError if the number**\*\* of ****entries in basis\_dict does not equal the length**** of \*\***bool\_array along meas\_basis\_axis.** –
+ * [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) – `avg_axis` contains negative values.
+ * [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) – `meas_basis_axis` is `None` but `len(basis_mapping) != 1`.
+ * [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) – The number of entries in `basis_mapping` does not equal the length of `bool_array` along `meas_basis_axis`.
+ * [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) – An observable is not covered by the measurement bases.
### get\_measurement\_bases
-
+
Choose bases to sample in order to calculate expectation values for all given observables.
Here a “basis” refers to measurement of a full-weight or high-weight Pauli, from which multiple qubit-wise commuting Paulis may be estimated.
@@ -65,21 +79,22 @@ Tools for calculating expectation values.
**Parameters**
- **observables** ([*SparsePauliOp*](/docs/api/qiskit/qiskit.quantum_info.SparsePauliOp) *|*[*list*](https://docs.python.org/3/library/stdtypes.html#list)*\[*[*SparsePauliOp*](/docs/api/qiskit/qiskit.quantum_info.SparsePauliOp)*]*) – The observables to calculate using the quantum computer.
+ * **observables** ([*SparsePauliOp*](/docs/api/qiskit/qiskit.quantum_info.SparsePauliOp) *|*[*list*](https://docs.python.org/3/library/stdtypes.html#list)*\[*[*SparsePauliOp*](/docs/api/qiskit/qiskit.quantum_info.SparsePauliOp)*]*) – The observables to calculate using the quantum computer.
+ * **bases\_in\_int\_format** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) – If true, return bases as an array of ints, using the samplomatic convention of: I=0, Z=1, X=2, Y=3. The order of the ints will be according to the index of each Pauli in the string. For example, the basis “IXYZ” would be returned as \[1, 3, 2, 0]. If false, return the bases as an array of strings.
**Returns**
- * List of Pauli bases to sample encoded in a list of uint8 where 0=I,1=Z,2=X,3=Y.
+ * List of Pauli bases to sample encoded in a list of uint8 where 0=I,1=Z,2=X,3=Y or a list of strings (based on bases\_in\_int\_format parameter).
* Dict that maps each measured basis to the relevant Paulis and their coefficients for each observable. With the measured bases as keys, for each observable there is a SparsePauliOp representing it.
**Return type**
- [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)\[[list](https://docs.python.org/3/library/stdtypes.html#list)\[[*ndarray*](https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray)\[[tuple](https://docs.python.org/3/library/stdtypes.html#tuple)\[[int](https://docs.python.org/3/library/functions.html#int), …], [*dtype*](https://numpy.org/doc/stable/reference/generated/numpy.dtype.html#numpy.dtype)\[*uint8*]]], [dict](https://docs.python.org/3/library/stdtypes.html#dict)\[[*Pauli*](/docs/api/qiskit/qiskit.quantum_info.Pauli), [list](https://docs.python.org/3/library/stdtypes.html#list)\[[*SparsePauliOp*](/docs/api/qiskit/qiskit.quantum_info.SparsePauliOp)]]]
+ [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)\[[list](https://docs.python.org/3/library/stdtypes.html#list)\[[*ndarray*](https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray)\[[tuple](https://docs.python.org/3/library/stdtypes.html#tuple)\[[int](https://docs.python.org/3/library/functions.html#int), …], [*dtype*](https://numpy.org/doc/stable/reference/generated/numpy.dtype.html#numpy.dtype)\[*uint8*]]], [dict](https://docs.python.org/3/library/stdtypes.html#dict)\[[*Pauli*](/docs/api/qiskit/qiskit.quantum_info.Pauli), [list](https://docs.python.org/3/library/stdtypes.html#list)\[[*SparsePauliOp*](/docs/api/qiskit/qiskit.quantum_info.SparsePauliOp)]]] | [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)\[[list](https://docs.python.org/3/library/stdtypes.html#list)\[[str](https://docs.python.org/3/library/stdtypes.html#str)], [dict](https://docs.python.org/3/library/stdtypes.html#dict)\[[*Pauli*](/docs/api/qiskit/qiskit.quantum_info.Pauli), [list](https://docs.python.org/3/library/stdtypes.html#list)\[[*SparsePauliOp*](/docs/api/qiskit/qiskit.quantum_info.SparsePauliOp)]]]
### map\_observable\_isa\_to\_canonical
-
+
Map an observable defined relative to the transpiled circuit to canonical box-order.
In the transpiled (or ISA) ordering, the qubits are indexed based on the “physical” layout of qubits in the device.
@@ -102,7 +117,7 @@ Tools for calculating expectation values.
### map\_observable\_virtual\_to\_canonical
-
+
Map an observable with virtual qubit ordering to canonical box-order.
For info on canonical qubit ordering conventions see the [Samplomatic docs](https://qiskit.github.io/samplomatic/guides/samplex_io.html#qubit-ordering-convention)).
@@ -120,7 +135,7 @@ Tools for calculating expectation values.
### map\_observable\_isa\_to\_virtual
-
+
Map an observable defined relative to the transpiled circuit to virtual order.
In the transpiled (or ISA) ordering, the qubits are indexed based on the “physical” layout of qubits in the device.
diff --git a/docs/api/qiskit-addon-utils/index.mdx b/docs/api/qiskit-addon-utils/index.mdx
index ccbe08bfd877..b85a866b3ae6 100644
--- a/docs/api/qiskit-addon-utils/index.mdx
+++ b/docs/api/qiskit-addon-utils/index.mdx
@@ -11,6 +11,8 @@ This package contains functionality which is meant to supplement workflows invol
* [coloring (`qiskit_addon_utils.coloring`)](coloring)
* [noise\_management (`qiskit_addon_utils.noise_management`)](noise-management)
+* [bit\_flip\_checks (`qiskit_addon_utils.noise_management.bit_flip_checks`)](noise-management-bit-flip-checks)
+* [bit\_flip\_checks\_passes (`qiskit_addon_utils.noise_management.bit_flip_checks.passes`)](noise-management-bit-flip-checks-passes)
* [post\_selection\_transpiler\_passes (`qiskit_addon_utils.noise_management.post_selection.transpiler.passes`)](noise-management-post-selection-transpiler-passes)
* [problem\_generators (`qiskit_addon_utils.problem_generators`)](problem-generators)
* [slicing (`qiskit_addon_utils.slicing`)](slicing)
diff --git a/docs/api/qiskit-addon-utils/noise-management-bit-flip-checks-passes-add-post-circuit-bit-flip-checks.mdx b/docs/api/qiskit-addon-utils/noise-management-bit-flip-checks-passes-add-post-circuit-bit-flip-checks.mdx
new file mode 100644
index 000000000000..ada171b0a701
--- /dev/null
+++ b/docs/api/qiskit-addon-utils/noise-management-bit-flip-checks-passes-add-post-circuit-bit-flip-checks.mdx
@@ -0,0 +1,115 @@
+---
+title: AddPostCircuitBitFlipChecks (latest version)
+description: API reference for qiskit_addon_utils.noise_management.bit_flip_checks.passes.AddPostCircuitBitFlipChecks in the latest version of qiskit-addon-utils
+in_page_toc_min_heading_level: 1
+python_api_type: class
+python_api_name: qiskit_addon_utils.noise_management.bit_flip_checks.passes.AddPostCircuitBitFlipChecks
+---
+
+# AddPostCircuitBitFlipChecks
+
+
+ Bases: [`TransformationPass`](/docs/api/qiskit/qiskit.transpiler.TransformationPass)
+
+ Add bit-flip checks at the end of the circuit on active qubits terminated by a measurement.
+
+ A post-circuit bit-flip check consists of a narrowband X-pulse located after a terminal measurement that flips the state of the qubit from the measured state $|x\rangle\mapsto|x\oplus1\rangle$. The state is then measured, and if the QPU failed to flip the qubit on a given shot, that sample may be considered unreliable and discarded. Postselecting only samples that pass all checks can improve the fidelity of distributions sampled from the QPU.
+
+ The added measurements write to new classical registers that are copies of the DAG’s registers, with modified names (by default, appending `"_ps"` to the register name).
+
+
+ These passes are only supported on Heron QPUs where [fractional gates](http://quantum.cloud.ibm.com/docs/guides/fractional-gates) are supported.
+
+
+ Initialize the pass.
+
+ **Parameters**
+
+ * **x\_pulse\_type** – The type of X-pulse to apply for the post-check measurements. Either `"xslow"` or `"rx"`.
+ * **post\_check\_suffix** – A fixed suffix to append to the names of the classical registers when copying them.
+ * **ignore\_creg\_suffixes** – A list of suffixes for classical registers that should be ignored (not copied). By default, registers ending with “\_pre” are ignored to avoid adding post-check to pre-check registers.
+
+ ## Attributes
+
+ ### is\_analysis\_pass
+
+
+ Check if the pass is an analysis pass.
+
+ If the pass is an AnalysisPass, that means that the pass can analyze the DAG and write the results of that analysis in the property set. Modifications on the DAG are not allowed by this kind of pass.
+
+
+ ### is\_transformation\_pass
+
+
+ Check if the pass is a transformation pass.
+
+ If the pass is a TransformationPass, that means that the pass can manipulate the DAG, but cannot modify the property set (but it can be read).
+
+
+ ## Methods
+
+ ### execute
+
+
+ Execute optimization task for input Qiskit IR.
+
+ **Parameters**
+
+ * **passmanager\_ir** ([*DAGCircuit*](/docs/api/qiskit/qiskit.dagcircuit.DAGCircuit)) – Qiskit IR to optimize.
+ * **state** ([*DAGCircuit*](/docs/api/qiskit/qiskit.dagcircuit.DAGCircuit)) – State associated with workflow execution by the pass manager itself.
+ * **callback** ([*Callable*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Callable)*\[\[Task,* [*DAGCircuit*](/docs/api/qiskit/qiskit.dagcircuit.DAGCircuit)*,* [*PropertySet*](/docs/api/qiskit/qiskit.passmanager.PropertySet)*,* [*float*](https://docs.python.org/3/library/functions.html#float)*,* [*int*](https://docs.python.org/3/library/functions.html#int)*], None] | None*) – A callback function which is called per execution of optimization task.
+
+ **Returns**
+
+ Optimized Qiskit IR and state of the workflow.
+
+ **Return type**
+
+ [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)\[[*DAGCircuit*](/docs/api/qiskit/qiskit.dagcircuit.DAGCircuit), [*PassManagerState*](/docs/api/qiskit/qiskit.passmanager.PassManagerState)]
+
+
+ ### name
+
+
+ Name of the pass.
+
+ **Return type**
+
+ [str](https://docs.python.org/3/library/stdtypes.html#str)
+
+
+ ### run
+
+
+ Run a pass on the DAGCircuit. This is implemented by the pass developer.
+
+ **Parameters**
+
+ **dag** ([*DAGCircuit*](/docs/api/qiskit/qiskit.dagcircuit.DAGCircuit)) – the dag on which the pass is run.
+
+ **Raises**
+
+ [**NotImplementedError**](https://docs.python.org/3/library/exceptions.html#NotImplementedError) – when this is left unimplemented for a pass.
+
+
+ ### update\_status
+
+
+ Update workflow status.
+
+ **Parameters**
+
+ * **state** ([*PassManagerState*](/docs/api/qiskit/qiskit.passmanager.PassManagerState)) – Pass manager state to update.
+ * **run\_state** (*RunState*) – Completion status of current task.
+
+ **Returns**
+
+ Updated pass manager state.
+
+ **Return type**
+
+ [*PassManagerState*](/docs/api/qiskit/qiskit.passmanager.PassManagerState)
+
+
+
diff --git a/docs/api/qiskit-addon-utils/noise-management-bit-flip-checks-passes-add-pre-circuit-bit-flip-checks.mdx b/docs/api/qiskit-addon-utils/noise-management-bit-flip-checks-passes-add-pre-circuit-bit-flip-checks.mdx
new file mode 100644
index 000000000000..650a10f376b6
--- /dev/null
+++ b/docs/api/qiskit-addon-utils/noise-management-bit-flip-checks-passes-add-pre-circuit-bit-flip-checks.mdx
@@ -0,0 +1,116 @@
+---
+title: AddPreCircuitBitFlipChecks (latest version)
+description: API reference for qiskit_addon_utils.noise_management.bit_flip_checks.passes.AddPreCircuitBitFlipChecks in the latest version of qiskit-addon-utils
+in_page_toc_min_heading_level: 1
+python_api_type: class
+python_api_name: qiskit_addon_utils.noise_management.bit_flip_checks.passes.AddPreCircuitBitFlipChecks
+---
+
+# AddPreCircuitBitFlipChecks
+
+
+ Bases: [`TransformationPass`](/docs/api/qiskit/qiskit.transpiler.TransformationPass)
+
+ Add bit-flip checks at the beginning of the circuit on active qubits terminated by a measurement.
+
+ A pre-circuit bit-flip check consists of a narrowband X-pulse that rotates the qubit from $|0\rangle\mapsto|1\rangle$ followed by a normal X-pulse that rotates the qubit back to the ground state $|0\rangle$ and a measurement. If the QPU fails to flip the qubit from $|0\rangle\mapsto|1\rangle\mapsto|0\rangle$ on a given shot, that sample may be considered unreliable and discarded. Postselecting only samples that pass all checks can improve the fidelity of distributions sampled from the QPU.
+
+ The added measurements write to new classical registers that are copies of the DAG’s registers, with modified names (by default, appending `"_pre"` to the register name).
+
+
+ These passes are only supported on Heron QPUs where [fractional gates](http://quantum.cloud.ibm.com/docs/guides/fractional-gates) are supported.
+
+
+ Initialize the pass.
+
+ **Parameters**
+
+ * **x\_pulse\_type** – The type of X-pulse to apply for the pre-check measurements. Either `"xslow"` or `"rx"`.
+ * **pre\_check\_suffix** – A fixed suffix to append to the names of the classical registers when copying them.
+ * **ignore\_creg\_suffixes** – A list of suffixes for classical registers that should be ignored (not copied). By default, registers ending with “\_ps” are ignored to avoid adding pre-check to post-check registers.
+ * **ignore\_creg\_names** – A list of exact classical register names that should be ignored (not copied). By default, registers named “spec” are ignored to avoid adding pre-check to spectator registers.
+
+ ## Attributes
+
+ ### is\_analysis\_pass
+
+
+ Check if the pass is an analysis pass.
+
+ If the pass is an AnalysisPass, that means that the pass can analyze the DAG and write the results of that analysis in the property set. Modifications on the DAG are not allowed by this kind of pass.
+
+
+ ### is\_transformation\_pass
+
+
+ Check if the pass is a transformation pass.
+
+ If the pass is a TransformationPass, that means that the pass can manipulate the DAG, but cannot modify the property set (but it can be read).
+
+
+ ## Methods
+
+ ### execute
+
+
+ Execute optimization task for input Qiskit IR.
+
+ **Parameters**
+
+ * **passmanager\_ir** ([*DAGCircuit*](/docs/api/qiskit/qiskit.dagcircuit.DAGCircuit)) – Qiskit IR to optimize.
+ * **state** ([*DAGCircuit*](/docs/api/qiskit/qiskit.dagcircuit.DAGCircuit)) – State associated with workflow execution by the pass manager itself.
+ * **callback** ([*Callable*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Callable)*\[\[Task,* [*DAGCircuit*](/docs/api/qiskit/qiskit.dagcircuit.DAGCircuit)*,* [*PropertySet*](/docs/api/qiskit/qiskit.passmanager.PropertySet)*,* [*float*](https://docs.python.org/3/library/functions.html#float)*,* [*int*](https://docs.python.org/3/library/functions.html#int)*], None] | None*) – A callback function which is called per execution of optimization task.
+
+ **Returns**
+
+ Optimized Qiskit IR and state of the workflow.
+
+ **Return type**
+
+ [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)\[[*DAGCircuit*](/docs/api/qiskit/qiskit.dagcircuit.DAGCircuit), [*PassManagerState*](/docs/api/qiskit/qiskit.passmanager.PassManagerState)]
+
+
+ ### name
+
+
+ Name of the pass.
+
+ **Return type**
+
+ [str](https://docs.python.org/3/library/stdtypes.html#str)
+
+
+ ### run
+
+
+ Run a pass on the DAGCircuit. This is implemented by the pass developer.
+
+ **Parameters**
+
+ **dag** ([*DAGCircuit*](/docs/api/qiskit/qiskit.dagcircuit.DAGCircuit)) – the dag on which the pass is run.
+
+ **Raises**
+
+ [**NotImplementedError**](https://docs.python.org/3/library/exceptions.html#NotImplementedError) – when this is left unimplemented for a pass.
+
+
+ ### update\_status
+
+
+ Update workflow status.
+
+ **Parameters**
+
+ * **state** ([*PassManagerState*](/docs/api/qiskit/qiskit.passmanager.PassManagerState)) – Pass manager state to update.
+ * **run\_state** (*RunState*) – Completion status of current task.
+
+ **Returns**
+
+ Updated pass manager state.
+
+ **Return type**
+
+ [*PassManagerState*](/docs/api/qiskit/qiskit.passmanager.PassManagerState)
+
+
+
diff --git a/docs/api/qiskit-addon-utils/noise-management-bit-flip-checks-passes-add-spectator-post-circuit-bit-flip-checks.mdx b/docs/api/qiskit-addon-utils/noise-management-bit-flip-checks-passes-add-spectator-post-circuit-bit-flip-checks.mdx
new file mode 100644
index 000000000000..5cf3db34379c
--- /dev/null
+++ b/docs/api/qiskit-addon-utils/noise-management-bit-flip-checks-passes-add-spectator-post-circuit-bit-flip-checks.mdx
@@ -0,0 +1,118 @@
+---
+title: AddSpectatorPostCircuitBitFlipChecks (latest version)
+description: API reference for qiskit_addon_utils.noise_management.bit_flip_checks.passes.AddSpectatorPostCircuitBitFlipChecks in the latest version of qiskit-addon-utils
+in_page_toc_min_heading_level: 1
+python_api_type: class
+python_api_name: qiskit_addon_utils.noise_management.bit_flip_checks.passes.AddSpectatorPostCircuitBitFlipChecks
+---
+
+# AddSpectatorPostCircuitBitFlipChecks
+
+
+ Bases: [`TransformationPass`](/docs/api/qiskit/qiskit.transpiler.TransformationPass)
+
+ Add bit-flip checks at the end of the circuit on qubits adjacent to active qubits.
+
+ Each spectator qubit receives a post-circuit bit-flip check: a measurement, then a narrowband X-pulse that flips the qubit’s state ($|x\rangle\mapsto|x\oplus1\rangle$), then a second measurement. If the QPU fails to flip the qubit between the two measurements on a given shot, that sample may be considered unreliable and discarded. Postselecting only samples that pass all checks can improve the fidelity of distributions sampled from the QPU. Optionally via `include_unmeasured`, active qubits that are not terminated by a measurement are also treated as spectators.
+
+ Two classical registers are added, each with one bit per spectator qubit: `spectator_creg_name` (default `"spec"`) holds the first measurement and `spectator_creg_name + post_check_suffix` (default `"spec_ps"`) holds the second, and a shot is kept when the two disagree.
+
+
+ These passes are only supported on Heron QPUs where [fractional gates](http://quantum.cloud.ibm.com/docs/guides/fractional-gates) are supported.
+
+
+ Initialize the pass.
+
+ **Parameters**
+
+ * **coupling\_map** – A coupling map or a list of tuples indicating pairs of neighboring qubits.
+ * **x\_pulse\_type** – The type of X-pulse to apply between the two spectator measurements. Either `"xslow"` or `"rx"`.
+ * **include\_unmeasured** – Whether qubits that are active but not terminated should also be treated as spectators. If `True`, the parity check is added to each of them as well.
+ * **spectator\_creg\_name** – The name of the classical register holding the first spectator measurement. The post-check register is named `spectator_creg_name + post_check_suffix`.
+ * **ignore\_creg\_suffixes** – A list of suffixes for classical registers that should be ignored when determining active/terminated qubits. By default, registers ending with `"_pre"` are ignored so that pre-check measurements aren’t treated as regular terminations.
+ * **post\_check\_suffix** – The suffix appended to `spectator_creg_name` to form the post-check register name, and used to identify the data-qubit post-check barriers that the spectator parity check is integrated into. Defaults to `"_ps"`.
+
+ ## Attributes
+
+ ### is\_analysis\_pass
+
+
+ Check if the pass is an analysis pass.
+
+ If the pass is an AnalysisPass, that means that the pass can analyze the DAG and write the results of that analysis in the property set. Modifications on the DAG are not allowed by this kind of pass.
+
+
+ ### is\_transformation\_pass
+
+
+ Check if the pass is a transformation pass.
+
+ If the pass is a TransformationPass, that means that the pass can manipulate the DAG, but cannot modify the property set (but it can be read).
+
+
+ ## Methods
+
+ ### execute
+
+
+ Execute optimization task for input Qiskit IR.
+
+ **Parameters**
+
+ * **passmanager\_ir** ([*DAGCircuit*](/docs/api/qiskit/qiskit.dagcircuit.DAGCircuit)) – Qiskit IR to optimize.
+ * **state** ([*DAGCircuit*](/docs/api/qiskit/qiskit.dagcircuit.DAGCircuit)) – State associated with workflow execution by the pass manager itself.
+ * **callback** ([*Callable*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Callable)*\[\[Task,* [*DAGCircuit*](/docs/api/qiskit/qiskit.dagcircuit.DAGCircuit)*,* [*PropertySet*](/docs/api/qiskit/qiskit.passmanager.PropertySet)*,* [*float*](https://docs.python.org/3/library/functions.html#float)*,* [*int*](https://docs.python.org/3/library/functions.html#int)*], None] | None*) – A callback function which is called per execution of optimization task.
+
+ **Returns**
+
+ Optimized Qiskit IR and state of the workflow.
+
+ **Return type**
+
+ [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)\[[*DAGCircuit*](/docs/api/qiskit/qiskit.dagcircuit.DAGCircuit), [*PassManagerState*](/docs/api/qiskit/qiskit.passmanager.PassManagerState)]
+
+
+ ### name
+
+
+ Name of the pass.
+
+ **Return type**
+
+ [str](https://docs.python.org/3/library/stdtypes.html#str)
+
+
+ ### run
+
+
+ Run a pass on the DAGCircuit. This is implemented by the pass developer.
+
+ **Parameters**
+
+ **dag** ([*DAGCircuit*](/docs/api/qiskit/qiskit.dagcircuit.DAGCircuit)) – the dag on which the pass is run.
+
+ **Raises**
+
+ [**NotImplementedError**](https://docs.python.org/3/library/exceptions.html#NotImplementedError) – when this is left unimplemented for a pass.
+
+
+ ### update\_status
+
+
+ Update workflow status.
+
+ **Parameters**
+
+ * **state** ([*PassManagerState*](/docs/api/qiskit/qiskit.passmanager.PassManagerState)) – Pass manager state to update.
+ * **run\_state** (*RunState*) – Completion status of current task.
+
+ **Returns**
+
+ Updated pass manager state.
+
+ **Return type**
+
+ [*PassManagerState*](/docs/api/qiskit/qiskit.passmanager.PassManagerState)
+
+
+
diff --git a/docs/api/qiskit-addon-utils/noise-management-bit-flip-checks-passes-add-spectator-pre-circuit-bit-flip-checks.mdx b/docs/api/qiskit-addon-utils/noise-management-bit-flip-checks-passes-add-spectator-pre-circuit-bit-flip-checks.mdx
new file mode 100644
index 000000000000..a9a0518cab6b
--- /dev/null
+++ b/docs/api/qiskit-addon-utils/noise-management-bit-flip-checks-passes-add-spectator-pre-circuit-bit-flip-checks.mdx
@@ -0,0 +1,119 @@
+---
+title: AddSpectatorPreCircuitBitFlipChecks (latest version)
+description: API reference for qiskit_addon_utils.noise_management.bit_flip_checks.passes.AddSpectatorPreCircuitBitFlipChecks in the latest version of qiskit-addon-utils
+in_page_toc_min_heading_level: 1
+python_api_type: class
+python_api_name: qiskit_addon_utils.noise_management.bit_flip_checks.passes.AddSpectatorPreCircuitBitFlipChecks
+---
+
+# AddSpectatorPreCircuitBitFlipChecks
+
+
+ Bases: [`TransformationPass`](/docs/api/qiskit/qiskit.transpiler.TransformationPass)
+
+ Add bit-flip checks at the beginning of the circuit on qubits adjacent to active qubits.
+
+ Each spectator qubit receives a pre-circuit bit-flip check: A narrowband X-pulse that flips the qubit’s state ($|x\rangle\mapsto|x\oplus1\rangle$), then a regular X-pulse followed by a measurement. If the QPU fails to flip the qubit from $|0\rangle\mapsto|1\rangle\mapsto|0\rangle$, that sample may be considered unreliable and discarded. Postselecting only samples that pass all checks can improve the fidelity of distributions sampled from the QPU. Optionally via `include_unmeasured`, active qubits that are not terminated by a measurement are also treated as spectators.
+
+ The added measurements write to a new classical register with one bit per spectator qubit, named `spectator_creg_name` (default `"spec_pre"`).
+
+
+ These passes are only supported on Heron QPUs where [fractional gates](http://quantum.cloud.ibm.com/docs/guides/fractional-gates) are supported.
+
+
+ Initialize the pass.
+
+ **Parameters**
+
+ * **coupling\_map** – A coupling map or a list of tuples indicating pairs of neighboring qubits.
+ * **x\_pulse\_type** – The type of X-pulse to apply for the pre-check measurements. Either `"xslow"` or `"rx"`.
+ * **include\_unmeasured** – Whether the qubits that are active but are not terminated by a measurement should also be treated as spectators. If `True`, a terminal measurement is added on each of them.
+ * **spectator\_creg\_name** – The name of the classical register added for the measurements on the spectator qubits.
+ * **ignore\_spectator\_creg\_names** – List of classical register names to ignore when determining active qubits. Qubits that only have measurements to these registers are not considered active, preventing cascading spectator selection. Defaults to `["spec"]` (the default name used by [`AddSpectatorPostCircuitBitFlipChecks`](noise-management-bit-flip-checks-passes-add-spectator-post-circuit-bit-flip-checks "qiskit_addon_utils.noise_management.bit_flip_checks.passes.AddSpectatorPostCircuitBitFlipChecks")).
+ * **ignore\_creg\_suffixes** – A list of suffixes for classical registers that should be ignored when determining terminated qubits. Qubits with measurements into registers with these suffixes are not considered terminated, allowing pre-check measurements to be added. By default, registers ending with “\_ps” are ignored to allow pre-check after post-check.
+ * **pre\_check\_suffix** – The suffix used by AddPreCircuitBitFlipChecks for pre-check registers. This is used to identify which qubits have pre-check measurements and which barrier to extend. Defaults to “\_pre”.
+
+ ## Attributes
+
+ ### is\_analysis\_pass
+
+
+ Check if the pass is an analysis pass.
+
+ If the pass is an AnalysisPass, that means that the pass can analyze the DAG and write the results of that analysis in the property set. Modifications on the DAG are not allowed by this kind of pass.
+
+
+ ### is\_transformation\_pass
+
+
+ Check if the pass is a transformation pass.
+
+ If the pass is a TransformationPass, that means that the pass can manipulate the DAG, but cannot modify the property set (but it can be read).
+
+
+ ## Methods
+
+ ### execute
+
+
+ Execute optimization task for input Qiskit IR.
+
+ **Parameters**
+
+ * **passmanager\_ir** ([*DAGCircuit*](/docs/api/qiskit/qiskit.dagcircuit.DAGCircuit)) – Qiskit IR to optimize.
+ * **state** ([*DAGCircuit*](/docs/api/qiskit/qiskit.dagcircuit.DAGCircuit)) – State associated with workflow execution by the pass manager itself.
+ * **callback** ([*Callable*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Callable)*\[\[Task,* [*DAGCircuit*](/docs/api/qiskit/qiskit.dagcircuit.DAGCircuit)*,* [*PropertySet*](/docs/api/qiskit/qiskit.passmanager.PropertySet)*,* [*float*](https://docs.python.org/3/library/functions.html#float)*,* [*int*](https://docs.python.org/3/library/functions.html#int)*], None] | None*) – A callback function which is called per execution of optimization task.
+
+ **Returns**
+
+ Optimized Qiskit IR and state of the workflow.
+
+ **Return type**
+
+ [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)\[[*DAGCircuit*](/docs/api/qiskit/qiskit.dagcircuit.DAGCircuit), [*PassManagerState*](/docs/api/qiskit/qiskit.passmanager.PassManagerState)]
+
+
+ ### name
+
+
+ Name of the pass.
+
+ **Return type**
+
+ [str](https://docs.python.org/3/library/stdtypes.html#str)
+
+
+ ### run
+
+
+ Run a pass on the DAGCircuit. This is implemented by the pass developer.
+
+ **Parameters**
+
+ **dag** ([*DAGCircuit*](/docs/api/qiskit/qiskit.dagcircuit.DAGCircuit)) – the dag on which the pass is run.
+
+ **Raises**
+
+ [**NotImplementedError**](https://docs.python.org/3/library/exceptions.html#NotImplementedError) – when this is left unimplemented for a pass.
+
+
+ ### update\_status
+
+
+ Update workflow status.
+
+ **Parameters**
+
+ * **state** ([*PassManagerState*](/docs/api/qiskit/qiskit.passmanager.PassManagerState)) – Pass manager state to update.
+ * **run\_state** (*RunState*) – Completion status of current task.
+
+ **Returns**
+
+ Updated pass manager state.
+
+ **Return type**
+
+ [*PassManagerState*](/docs/api/qiskit/qiskit.passmanager.PassManagerState)
+
+
+
diff --git a/docs/api/qiskit-addon-utils/noise-management-bit-flip-checks-passes-x-pulse-type.mdx b/docs/api/qiskit-addon-utils/noise-management-bit-flip-checks-passes-x-pulse-type.mdx
new file mode 100644
index 000000000000..c353c3b6fae2
--- /dev/null
+++ b/docs/api/qiskit-addon-utils/noise-management-bit-flip-checks-passes-x-pulse-type.mdx
@@ -0,0 +1,430 @@
+---
+title: XPulseType (latest version)
+description: API reference for qiskit_addon_utils.noise_management.bit_flip_checks.passes.XPulseType in the latest version of qiskit-addon-utils
+in_page_toc_min_heading_level: 1
+python_api_type: class
+python_api_name: qiskit_addon_utils.noise_management.bit_flip_checks.passes.XPulseType
+---
+
+# XPulseType
+
+
+ Bases: [`str`](https://docs.python.org/3/library/stdtypes.html#str), [`Enum`](https://docs.python.org/3/library/enum.html#enum.Enum)
+
+ The type of X-pulse to apply for a bit-flip check measurement.
+
+ ## Attributes
+
+ ### XSLOW
+
+
+ An `xslow` gate.
+
+
+ ### RX
+
+
+ Twenty `rx` gates with angles `pi/20`.
+
+
+ ## Methods
+
+ ### encode
+
+
+ Encode the string using the codec registered for encoding.
+
+ **encoding**
+
+ The encoding in which to encode the string.
+
+ **errors**
+
+ The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register\_error that can handle UnicodeEncodeErrors.
+
+
+ ### replace
+
+
+ Return a copy with all occurrences of substring old replaced by new.
+
+ > **count**
+ >
+ > Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.
+
+ If the optional argument count is given, only the first count occurrences are replaced.
+
+
+ ### split
+
+
+ Return a list of the substrings in the string, using sep as the separator string.
+
+ > **sep**
+ >
+ > The separator used to split the string.
+ >
+ > When set to None (the default value), will split on any whitespace character (including \n \r \t \f and spaces) and will discard empty strings from the result.
+ >
+ > **maxsplit**
+ >
+ > Maximum number of splits (starting from the left). -1 (the default value) means no limit.
+
+ Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.
+
+
+ ### rsplit
+
+
+ Return a list of the substrings in the string, using sep as the separator string.
+
+ > **sep**
+ >
+ > The separator used to split the string.
+ >
+ > When set to None (the default value), will split on any whitespace character (including \n \r \t \f and spaces) and will discard empty strings from the result.
+ >
+ > **maxsplit**
+ >
+ > Maximum number of splits (starting from the left). -1 (the default value) means no limit.
+
+ Splitting starts at the end of the string and works to the front.
+
+
+ ### join
+
+
+ Concatenate any number of strings.
+
+ The string whose method is called is inserted in between each given string. The result is returned as a new string.
+
+ Example: ‘.’.join(\[‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’
+
+
+ ### capitalize
+
+
+ Return a capitalized version of the string.
+
+ More specifically, make the first character have upper case and the rest lower case.
+
+
+ ### casefold
+
+
+ Return a version of the string suitable for caseless comparisons.
+
+
+ ### title
+
+
+ Return a version of the string where each word is titlecased.
+
+ More specifically, words start with uppercased characters and all remaining cased characters have lower case.
+
+
+ ### center
+
+
+ Return a centered string of length width.
+
+ Padding is done using the specified fill character (default is a space).
+
+
+ ### count
+
+
+ Return the number of non-overlapping occurrences of substring sub in string S\[start:end]. Optional arguments start and end are interpreted as in slice notation.
+
+
+ ### expandtabs
+
+
+ Return a copy where all tab characters are expanded using spaces.
+
+ If tabsize is not given, a tab size of 8 characters is assumed.
+
+
+ ### find
+
+
+ Return the lowest index in S where substring sub is found, such that sub is contained within S\[start:end]. Optional arguments start and end are interpreted as in slice notation.
+
+ Return -1 on failure.
+
+
+ ### partition
+
+
+ Partition the string into three parts using the given separator.
+
+ This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
+
+ If the separator is not found, returns a 3-tuple containing the original string and two empty strings.
+
+
+ ### index
+
+
+ Return the lowest index in S where substring sub is found, such that sub is contained within S\[start:end]. Optional arguments start and end are interpreted as in slice notation.
+
+ Raises ValueError when the substring is not found.
+
+
+ ### ljust
+
+
+ Return a left-justified string of length width.
+
+ Padding is done using the specified fill character (default is a space).
+
+
+ ### lower
+
+
+ Return a copy of the string converted to lowercase.
+
+
+ ### lstrip
+
+
+ Return a copy of the string with leading whitespace removed.
+
+ If chars is given and not None, remove characters in chars instead.
+
+
+ ### rfind
+
+
+ Return the highest index in S where substring sub is found, such that sub is contained within S\[start:end]. Optional arguments start and end are interpreted as in slice notation.
+
+ Return -1 on failure.
+
+
+ ### rindex
+
+
+ Return the highest index in S where substring sub is found, such that sub is contained within S\[start:end]. Optional arguments start and end are interpreted as in slice notation.
+
+ Raises ValueError when the substring is not found.
+
+
+ ### rjust
+
+
+ Return a right-justified string of length width.
+
+ Padding is done using the specified fill character (default is a space).
+
+
+ ### rstrip
+
+
+ Return a copy of the string with trailing whitespace removed.
+
+ If chars is given and not None, remove characters in chars instead.
+
+
+ ### rpartition
+
+
+ Partition the string into three parts using the given separator.
+
+ This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
+
+ If the separator is not found, returns a 3-tuple containing two empty strings and the original string.
+
+
+ ### splitlines
+
+
+ Return a list of the lines in the string, breaking at line boundaries.
+
+ Line breaks are not included in the resulting list unless keepends is given and true.
+
+
+ ### strip
+
+
+ Return a copy of the string with leading and trailing whitespace removed.
+
+ If chars is given and not None, remove characters in chars instead.
+
+
+ ### swapcase
+
+
+ Convert uppercase characters to lowercase and lowercase characters to uppercase.
+
+
+ ### translate
+
+
+ Replace each character in the string using the given translation table.
+
+ > **table**
+ >
+ > Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.
+
+ The table must implement lookup/indexing via \_\_getitem\_\_, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.
+
+
+ ### upper
+
+
+ Return a copy of the string converted to uppercase.
+
+
+ ### startswith
+
+
+ Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.
+
+
+ ### endswith
+
+
+ Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.
+
+
+ ### removeprefix
+
+
+ Return a str with the given prefix string removed if present.
+
+ If the string starts with the prefix string, return string\[len(prefix):]. Otherwise, return a copy of the original string.
+
+
+ ### removesuffix
+
+
+ Return a str with the given suffix string removed if present.
+
+ If the string ends with the suffix string and that suffix is not empty, return string\[:-len(suffix)]. Otherwise, return a copy of the original string.
+
+
+ ### isascii
+
+
+ Return True if all characters in the string are ASCII, False otherwise.
+
+ ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.
+
+
+ ### islower
+
+
+ Return True if the string is a lowercase string, False otherwise.
+
+ A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.
+
+
+ ### isupper
+
+
+ Return True if the string is an uppercase string, False otherwise.
+
+ A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.
+
+
+ ### istitle
+
+
+ Return True if the string is a title-cased string, False otherwise.
+
+ In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.
+
+
+ ### isspace
+
+
+ Return True if the string is a whitespace string, False otherwise.
+
+ A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.
+
+
+ ### isdecimal
+
+
+ Return True if the string is a decimal string, False otherwise.
+
+ A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.
+
+
+ ### isdigit
+
+
+ Return True if the string is a digit string, False otherwise.
+
+ A string is a digit string if all characters in the string are digits and there is at least one character in the string.
+
+
+ ### isnumeric
+
+
+ Return True if the string is a numeric string, False otherwise.
+
+ A string is numeric if all characters in the string are numeric and there is at least one character in the string.
+
+
+ ### isalpha
+
+
+ Return True if the string is an alphabetic string, False otherwise.
+
+ A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.
+
+
+ ### isalnum
+
+
+ Return True if the string is an alpha-numeric string, False otherwise.
+
+ A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.
+
+
+ ### isidentifier
+
+
+ Return True if the string is a valid Python identifier, False otherwise.
+
+ Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.
+
+
+ ### isprintable
+
+
+ Return True if the string is printable, False otherwise.
+
+ A string is printable if all of its characters are considered printable in repr() or if it is empty.
+
+
+ ### zfill
+
+
+ Pad a numeric string with zeros on the left, to fill a field of the given width.
+
+ The string is never truncated.
+
+
+ ### format
+
+
+ Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘\{’ and ‘}’).
+
+
+ ### format\_map
+
+
+ Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘\{’ and ‘}’).
+
+
+ ### maketrans
+
+
+ Return a translation table usable for str.translate().
+
+ If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.
+
+
+
diff --git a/docs/api/qiskit-addon-utils/noise-management-bit-flip-checks-passes.mdx b/docs/api/qiskit-addon-utils/noise-management-bit-flip-checks-passes.mdx
new file mode 100644
index 000000000000..afb77e32801c
--- /dev/null
+++ b/docs/api/qiskit-addon-utils/noise-management-bit-flip-checks-passes.mdx
@@ -0,0 +1,26 @@
+---
+title: passes (latest version)
+description: API reference for qiskit_addon_utils.noise_management.bit_flip_checks.passes in the latest version of qiskit-addon-utils
+in_page_toc_min_heading_level: 2
+python_api_type: module
+python_api_name: qiskit_addon_utils.noise_management.bit_flip_checks.passes
+---
+
+
+
+
+
+# bit\_flip\_checks\_passes
+
+`qiskit_addon_utils.noise_management.bit_flip_checks.passes`
+
+A submodule with transpilation passes for circuit bit-flip checks.
+
+| | |
+| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
+| [`AddPostCircuitBitFlipChecks`](/docs/api/qiskit-addon-utils/noise-management-bit-flip-checks-passes-add-post-circuit-bit-flip-checks "qiskit_addon_utils.noise_management.bit_flip_checks.passes.AddPostCircuitBitFlipChecks") | Add bit-flip checks at the end of the circuit on active qubits terminated by a measurement. |
+| [`AddPreCircuitBitFlipChecks`](/docs/api/qiskit-addon-utils/noise-management-bit-flip-checks-passes-add-pre-circuit-bit-flip-checks "qiskit_addon_utils.noise_management.bit_flip_checks.passes.AddPreCircuitBitFlipChecks") | Add bit-flip checks at the beginning of the circuit on active qubits terminated by a measurement. |
+| [`AddSpectatorPostCircuitBitFlipChecks`](/docs/api/qiskit-addon-utils/noise-management-bit-flip-checks-passes-add-spectator-post-circuit-bit-flip-checks "qiskit_addon_utils.noise_management.bit_flip_checks.passes.AddSpectatorPostCircuitBitFlipChecks") | Add bit-flip checks at the end of the circuit on qubits adjacent to active qubits. |
+| [`AddSpectatorPreCircuitBitFlipChecks`](/docs/api/qiskit-addon-utils/noise-management-bit-flip-checks-passes-add-spectator-pre-circuit-bit-flip-checks "qiskit_addon_utils.noise_management.bit_flip_checks.passes.AddSpectatorPreCircuitBitFlipChecks") | Add bit-flip checks at the beginning of the circuit on qubits adjacent to active qubits. |
+| [`XPulseType`](/docs/api/qiskit-addon-utils/noise-management-bit-flip-checks-passes-x-pulse-type "qiskit_addon_utils.noise_management.bit_flip_checks.passes.XPulseType") | The type of X-pulse to apply for a bit-flip check measurement. |
+
diff --git a/docs/api/qiskit-addon-utils/noise-management-bit-flip-checks.mdx b/docs/api/qiskit-addon-utils/noise-management-bit-flip-checks.mdx
new file mode 100644
index 000000000000..f07281fee569
--- /dev/null
+++ b/docs/api/qiskit-addon-utils/noise-management-bit-flip-checks.mdx
@@ -0,0 +1,921 @@
+---
+title: bit_flip_checks (latest version)
+description: API reference for qiskit_addon_utils.noise_management.bit_flip_checks in the latest version of qiskit-addon-utils
+in_page_toc_min_heading_level: 2
+python_api_type: module
+python_api_name: qiskit_addon_utils.noise_management.bit_flip_checks
+---
+
+
+
+
+
+# bit\_flip\_checks
+
+`qiskit_addon_utils.noise_management.bit_flip_checks`
+
+Functions and classes for post-selection via circuit bit-flip checks.
+
+### PostSelectionSummary
+
+
+ Bases: [`object`](https://docs.python.org/3/library/functions.html#object)
+
+ A helper class to store the properties of a quantum circuit required to postselect based on bit-flip checks.
+
+ Initialize a `PostSelectionSummary` object.
+
+ **Parameters**
+
+ * **primary\_cregs** ([*set*](https://docs.python.org/3/library/stdtypes.html#set)*\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str)*]*) – The names of the “primary” classical registers, namely those that do not end with the pre- and post-circuit check suffixes.
+ * **measure\_map** ([*dict*](https://docs.python.org/3/library/stdtypes.html#dict)*\[*[*int*](https://docs.python.org/3/library/functions.html#int)*,* [*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple)*\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str)*,* [*int*](https://docs.python.org/3/library/functions.html#int)*]]*) – A map between qubit indices to the register and clbits that uniquely define a measurement on those qubits (primary measurements).
+ * **edges** ([*set*](https://docs.python.org/3/library/stdtypes.html#set)*\[*[*frozenset*](https://docs.python.org/3/library/stdtypes.html#frozenset)*\[*[*int*](https://docs.python.org/3/library/functions.html#int)*]]*) – A list of tuples defining pairs of neighboring qubits.
+ * **measure\_map\_ps** ([*dict*](https://docs.python.org/3/library/stdtypes.html#dict)*\[*[*int*](https://docs.python.org/3/library/functions.html#int)*,* [*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple)*\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str)*,* [*int*](https://docs.python.org/3/library/functions.html#int)*]] | None*) – An optional map for post-circuit check measurements.
+ * **measure\_map\_pre** ([*dict*](https://docs.python.org/3/library/stdtypes.html#dict)*\[*[*int*](https://docs.python.org/3/library/functions.html#int)*,* [*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple)*\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str)*,* [*int*](https://docs.python.org/3/library/functions.html#int)*]] | None*) – An optional map for pre-circuit check measurements.
+ * **post\_check\_suffix** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – The suffix of the post-circuit check registers.
+ * **pre\_check\_suffix** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – The suffix of the pre-circuit check registers.
+ * **spectator\_cregs** ([*set*](https://docs.python.org/3/library/stdtypes.html#set)*\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str)*] | None*) – Names of primary registers that hold spectator measurements (the first half of the spectator parity check produced by [`AddSpectatorPostCircuitBitFlipChecks`](/docs/api/qiskit-addon-utils/noise-management-bit-flip-checks-passes-add-spectator-post-circuit-bit-flip-checks "qiskit_addon_utils.noise_management.bit_flip_checks.passes.AddSpectatorPostCircuitBitFlipChecks")).
+
+ #### edges
+
+
+ A set of edges to consider for edge-based postselection.
+
+
+ #### from\_circuit
+
+
+ Initialize from quantum circuits.
+
+ **Parameters**
+
+ * **circuit** ([*QuantumCircuit*](/docs/api/qiskit/qiskit.circuit.QuantumCircuit)) – The circuit containing bit-flip checks..
+ * **coupling\_map** ([*CouplingMap*](/docs/api/qiskit/qiskit.transpiler.CouplingMap) *|*[*list*](https://docs.python.org/3/library/stdtypes.html#list)*\[*[*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple)*\[*[*int*](https://docs.python.org/3/library/functions.html#int)*,* [*int*](https://docs.python.org/3/library/functions.html#int)*]]*) – A coupling map or a list of tuples indicating pairs of neighboring qubits.
+ * **post\_check\_suffix** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – A fixed suffix for post-circuit check classical registers.
+ * **pre\_check\_suffix** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – A fixed suffix for pre-circuit check classical registers.
+ * **spectator\_cregs** ([*set*](https://docs.python.org/3/library/stdtypes.html#set)*\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str)*] |* [*list*](https://docs.python.org/3/library/stdtypes.html#list)*\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str)*] | None*) – Names of primary registers that hold spectator measurements. Defaults to `["spec"]`, matching the default name used by [`AddSpectatorPostCircuitBitFlipChecks`](/docs/api/qiskit-addon-utils/noise-management-bit-flip-checks-passes-add-spectator-post-circuit-bit-flip-checks "qiskit_addon_utils.noise_management.bit_flip_checks.passes.AddSpectatorPostCircuitBitFlipChecks").
+
+ **Return type**
+
+ [*PostSelectionSummary*](#qiskit_addon_utils.noise_management.bit_flip_checks.PostSelectionSummary "qiskit_addon_utils.noise_management.bit_flip_checks.post_selection_summary.PostSelectionSummary")
+
+
+ #### measure\_map
+
+
+ A map from qubit indices to the register and clbit index used to measure those qubits.
+
+
+ #### measure\_map\_pre
+
+
+ A map from qubit indices to the register and clbit index for pre-circuit check measurements.
+
+
+ #### measure\_map\_ps
+
+
+ A map from qubit indices to the register and clbit index for post-circuit check measurements.
+
+
+ #### post\_check\_suffix
+
+
+ The suffix of the post-circuit check registers.
+
+
+ #### pre\_check\_suffix
+
+
+ The suffix of the pre-circuit check registers.
+
+
+ #### primary\_cregs
+
+
+ The names of the primary classical registers.
+
+
+ #### spectator\_cregs
+
+
+ Subset of `primary_cregs` that hold spectator measurements.
+
+ Use `primary_cregs - spectator_cregs` to get the data-only primary registers, e.g. when computing observables from filtered shots.
+
+
+
+### PostSelector
+
+
+ Bases: [`object`](https://docs.python.org/3/library/functions.html#object)
+
+ A class to process the results of bit-flip checks.
+
+ Initialize a `PostSelector` object.
+
+ **Parameters**
+
+ **summary** ([*PostSelectionSummary*](#qiskit_addon_utils.noise_management.bit_flip_checks.PostSelectionSummary "qiskit_addon_utils.noise_management.bit_flip_checks.PostSelectionSummary")) – A summary of the circuit containing bit-flip checks.
+
+ #### compute\_mask
+
+
+ Compute boolean masks indicating what shots should be kept or discarded.
+
+ By construction, the returned mask has the same shape as the arrays in the result, but with one fewer dimension (the last axis of every array, over clbits, is not present in the mask).
+
+ **Parameters**
+
+ * **result** ([*dict*](https://docs.python.org/3/library/stdtypes.html#dict)*\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str)*,* [*ndarray*](https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray)*\[*[*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple)*\[*[*int*](https://docs.python.org/3/library/functions.html#int)*, ...],* [*dtype*](https://numpy.org/doc/stable/reference/generated/numpy.dtype.html#numpy.dtype)*\[*[*bool*](https://numpy.org/doc/stable/reference/arrays.scalars.html#numpy.bool)*]]]*) – The result to post-process. Must be a dictionary mapping register names to boolean arrays.
+ * **strategy** ([*Literal*](https://docs.python.org/3/library/typing.html#typing.Literal)*\['node', 'edge'] | \~qiskit\_addon\_utils.noise\_management.bit\_flip\_checks.post\_selector.PostSelectionStrategy*) – The postselection strategy (“node” or “edge”).
+ * **mode** ([*Literal*](https://docs.python.org/3/library/typing.html#typing.Literal)*\['post', 'pre', 'both']*) – Which type of postselection to apply: - “post”: Apply post-circuit checks only - “pre”: Apply pre-circuit checks only - “both”: Apply both pre and post-check
+
+ **Returns**
+
+ A boolean mask where True indicates shots to keep, False indicates shots to discard.
+
+ **Raises**
+
+ [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) – If the requested mode is not available (e.g., no pre-check measurements in the circuit but mode=”pre” was requested).
+
+ **Return type**
+
+ [*ndarray*](https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray)\[[tuple](https://docs.python.org/3/library/stdtypes.html#tuple)\[[int](https://docs.python.org/3/library/functions.html#int), …], [*dtype*](https://numpy.org/doc/stable/reference/generated/numpy.dtype.html#numpy.dtype)\[[*bool*](https://numpy.org/doc/stable/reference/arrays.scalars.html#numpy.bool)]]
+
+
+ #### from\_circuit
+
+
+ Initialize from a quantum circuit.
+
+ **Parameters**
+
+ * **circuit** ([*QuantumCircuit*](/docs/api/qiskit/qiskit.circuit.QuantumCircuit)) – The circuit containing bit-flip checks.
+ * **coupling\_map** ([*CouplingMap*](/docs/api/qiskit/qiskit.transpiler.CouplingMap) *|*[*list*](https://docs.python.org/3/library/stdtypes.html#list)*\[*[*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple)*\[*[*int*](https://docs.python.org/3/library/functions.html#int)*,* [*int*](https://docs.python.org/3/library/functions.html#int)*]]*) – A coupling map or a list of tuples indicating pairs of neighboring qubits.
+ * **post\_check\_suffix** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – A fixed suffix for classical registers associated with post-circuit checks.
+ * **pre\_check\_suffix** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – A fixed suffix for classical registers associated with pre-circuit checks.
+ * **spectator\_cregs** ([*set*](https://docs.python.org/3/library/stdtypes.html#set)*\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str)*] |* [*list*](https://docs.python.org/3/library/stdtypes.html#list)*\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str)*] | None*) – Names of registers that hold spectator measurements (the first half of the spectator parity check produced by [`AddSpectatorPostCircuitBitFlipChecks`](/docs/api/qiskit-addon-utils/noise-management-bit-flip-checks-passes-add-spectator-post-circuit-bit-flip-checks "qiskit_addon_utils.noise_management.bit_flip_checks.passes.AddSpectatorPostCircuitBitFlipChecks")). Defaults to `["spec"]` to match [`AddSpectatorPostCircuitBitFlipChecks`](/docs/api/qiskit-addon-utils/noise-management-bit-flip-checks-passes-add-spectator-post-circuit-bit-flip-checks "qiskit_addon_utils.noise_management.bit_flip_checks.passes.AddSpectatorPostCircuitBitFlipChecks").
+
+ **Return type**
+
+ [*PostSelector*](#qiskit_addon_utils.noise_management.bit_flip_checks.PostSelector "qiskit_addon_utils.noise_management.bit_flip_checks.post_selector.PostSelector")
+
+
+ #### summary
+
+
+ A summary of the circuit containing bit-flip checks.
+
+
+
+### PostSelectionStrategy
+
+
+ Bases: [`str`](https://docs.python.org/3/library/stdtypes.html#str), [`Enum`](https://docs.python.org/3/library/enum.html#enum.Enum)
+
+ The supported postselection strategies.
+
+ #### EDGE
+
+
+ Discard every shot where there exists a pair of neighbouring qubits for which both checks fail.
+
+
+ #### NODE
+
+
+ Discard every shot where one or more checks fail.
+
+
+ #### capitalize
+
+
+ Return a capitalized version of the string.
+
+ More specifically, make the first character have upper case and the rest lower case.
+
+
+ #### casefold
+
+
+ Return a version of the string suitable for caseless comparisons.
+
+
+ #### center
+
+
+ Return a centered string of length width.
+
+ Padding is done using the specified fill character (default is a space).
+
+
+ #### count
+
+
+ Return the number of non-overlapping occurrences of substring sub in string S\[start:end]. Optional arguments start and end are interpreted as in slice notation.
+
+
+ #### encode
+
+
+ Encode the string using the codec registered for encoding.
+
+ **encoding**
+
+ The encoding in which to encode the string.
+
+ **errors**
+
+ The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register\_error that can handle UnicodeEncodeErrors.
+
+
+ #### endswith
+
+
+ Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.
+
+
+ #### expandtabs
+
+
+ Return a copy where all tab characters are expanded using spaces.
+
+ If tabsize is not given, a tab size of 8 characters is assumed.
+
+
+ #### find
+
+
+ Return the lowest index in S where substring sub is found, such that sub is contained within S\[start:end]. Optional arguments start and end are interpreted as in slice notation.
+
+ Return -1 on failure.
+
+
+ #### format
+
+
+ Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘\{’ and ‘}’).
+
+
+ #### format\_map
+
+
+ Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘\{’ and ‘}’).
+
+
+ #### index
+
+
+ Return the lowest index in S where substring sub is found, such that sub is contained within S\[start:end]. Optional arguments start and end are interpreted as in slice notation.
+
+ Raises ValueError when the substring is not found.
+
+
+ #### isalnum
+
+
+ Return True if the string is an alpha-numeric string, False otherwise.
+
+ A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.
+
+
+ #### isalpha
+
+
+ Return True if the string is an alphabetic string, False otherwise.
+
+ A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.
+
+
+ #### isascii
+
+
+ Return True if all characters in the string are ASCII, False otherwise.
+
+ ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.
+
+
+ #### isdecimal
+
+
+ Return True if the string is a decimal string, False otherwise.
+
+ A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.
+
+
+ #### isdigit
+
+
+ Return True if the string is a digit string, False otherwise.
+
+ A string is a digit string if all characters in the string are digits and there is at least one character in the string.
+
+
+ #### isidentifier
+
+
+ Return True if the string is a valid Python identifier, False otherwise.
+
+ Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.
+
+
+ #### islower
+
+
+ Return True if the string is a lowercase string, False otherwise.
+
+ A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.
+
+
+ #### isnumeric
+
+
+ Return True if the string is a numeric string, False otherwise.
+
+ A string is numeric if all characters in the string are numeric and there is at least one character in the string.
+
+
+ #### isprintable
+
+
+ Return True if the string is printable, False otherwise.
+
+ A string is printable if all of its characters are considered printable in repr() or if it is empty.
+
+
+ #### isspace
+
+
+ Return True if the string is a whitespace string, False otherwise.
+
+ A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.
+
+
+ #### istitle
+
+
+ Return True if the string is a title-cased string, False otherwise.
+
+ In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.
+
+
+ #### isupper
+
+
+ Return True if the string is an uppercase string, False otherwise.
+
+ A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.
+
+
+ #### join
+
+
+ Concatenate any number of strings.
+
+ The string whose method is called is inserted in between each given string. The result is returned as a new string.
+
+ Example: ‘.’.join(\[‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’
+
+
+ #### ljust
+
+
+ Return a left-justified string of length width.
+
+ Padding is done using the specified fill character (default is a space).
+
+
+ #### lower
+
+
+ Return a copy of the string converted to lowercase.
+
+
+ #### lstrip
+
+
+ Return a copy of the string with leading whitespace removed.
+
+ If chars is given and not None, remove characters in chars instead.
+
+
+ #### maketrans
+
+
+ Return a translation table usable for str.translate().
+
+ If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.
+
+
+ #### partition
+
+
+ Partition the string into three parts using the given separator.
+
+ This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
+
+ If the separator is not found, returns a 3-tuple containing the original string and two empty strings.
+
+
+ #### removeprefix
+
+
+ Return a str with the given prefix string removed if present.
+
+ If the string starts with the prefix string, return string\[len(prefix):]. Otherwise, return a copy of the original string.
+
+
+ #### removesuffix
+
+
+ Return a str with the given suffix string removed if present.
+
+ If the string ends with the suffix string and that suffix is not empty, return string\[:-len(suffix)]. Otherwise, return a copy of the original string.
+
+
+ #### replace
+
+
+ Return a copy with all occurrences of substring old replaced by new.
+
+ > **count**
+ >
+ > Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.
+
+ If the optional argument count is given, only the first count occurrences are replaced.
+
+
+ #### rfind
+
+
+ Return the highest index in S where substring sub is found, such that sub is contained within S\[start:end]. Optional arguments start and end are interpreted as in slice notation.
+
+ Return -1 on failure.
+
+
+ #### rindex
+
+
+ Return the highest index in S where substring sub is found, such that sub is contained within S\[start:end]. Optional arguments start and end are interpreted as in slice notation.
+
+ Raises ValueError when the substring is not found.
+
+
+ #### rjust
+
+
+ Return a right-justified string of length width.
+
+ Padding is done using the specified fill character (default is a space).
+
+
+ #### rpartition
+
+
+ Partition the string into three parts using the given separator.
+
+ This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
+
+ If the separator is not found, returns a 3-tuple containing two empty strings and the original string.
+
+
+ #### rsplit
+
+
+ Return a list of the substrings in the string, using sep as the separator string.
+
+ > **sep**
+ >
+ > The separator used to split the string.
+ >
+ > When set to None (the default value), will split on any whitespace character (including \n \r \t \f and spaces) and will discard empty strings from the result.
+ >
+ > **maxsplit**
+ >
+ > Maximum number of splits (starting from the left). -1 (the default value) means no limit.
+
+ Splitting starts at the end of the string and works to the front.
+
+
+ #### rstrip
+
+
+ Return a copy of the string with trailing whitespace removed.
+
+ If chars is given and not None, remove characters in chars instead.
+
+
+ #### split
+
+
+ Return a list of the substrings in the string, using sep as the separator string.
+
+ > **sep**
+ >
+ > The separator used to split the string.
+ >
+ > When set to None (the default value), will split on any whitespace character (including \n \r \t \f and spaces) and will discard empty strings from the result.
+ >
+ > **maxsplit**
+ >
+ > Maximum number of splits (starting from the left). -1 (the default value) means no limit.
+
+ Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.
+
+
+ #### splitlines
+
+
+ Return a list of the lines in the string, breaking at line boundaries.
+
+ Line breaks are not included in the resulting list unless keepends is given and true.
+
+
+ #### startswith
+
+
+ Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.
+
+
+ #### strip
+
+
+ Return a copy of the string with leading and trailing whitespace removed.
+
+ If chars is given and not None, remove characters in chars instead.
+
+
+ #### swapcase
+
+
+ Convert uppercase characters to lowercase and lowercase characters to uppercase.
+
+
+ #### title
+
+
+ Return a version of the string where each word is titlecased.
+
+ More specifically, words start with uppercased characters and all remaining cased characters have lower case.
+
+
+ #### translate
+
+
+ Replace each character in the string using the given translation table.
+
+ > **table**
+ >
+ > Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.
+
+ The table must implement lookup/indexing via \_\_getitem\_\_, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.
+
+
+ #### upper
+
+
+ Return a copy of the string converted to uppercase.
+
+
+ #### zfill
+
+
+ Pad a numeric string with zeros on the left, to fill a field of the given width.
+
+ The string is never truncated.
+
+
+
+### XSlowGate
+
+
+ Bases: [`Gate`](/docs/api/qiskit/qiskit.circuit.Gate)
+
+ The x-slow gate.
+
+ **Parameters**
+
+ * **name** – The name of the gate.
+ * **num\_qubits** – The number of qubits the gate acts on.
+ * **params** – A list of parameters.
+ * **label** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – An optional label for the gate.
+ * **xslow\_gate\_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str))
+
+ #### add\_decomposition
+
+
+ Add a decomposition of the instruction to the SessionEquivalenceLibrary.
+
+
+ #### base\_class
+
+
+ Get the base class of this instruction. This is guaranteed to be in the inheritance tree of `self`.
+
+ The “base class” of an instruction is the lowest class in its inheritance tree that the object should be considered entirely compatible with for \_all\_ circuit applications. This typically means that the subclass is defined purely to offer some sort of programmer convenience over the base class, and the base class is the “true” class for a behavioral perspective. In particular, you should *not* override [`base_class`](#qiskit_addon_utils.noise_management.bit_flip_checks.XSlowGate.base_class "qiskit_addon_utils.noise_management.bit_flip_checks.XSlowGate.base_class") if you are defining a custom version of an instruction that will be implemented differently by hardware, such as an alternative measurement strategy, or a version of a parametrized gate with a particular set of parameters for the purposes of distinguishing it in a `Target` from the full parametrized gate.
+
+ This is often exactly equivalent to `type(obj)`, except in the case of singleton instances of standard-library instructions. These singleton instances are special subclasses of their base class, and this property will return that base. For example:
+
+ ```python
+ >>> isinstance(XGate(), XGate)
+ True
+ >>> type(XGate()) is XGate
+ False
+ >>> XGate().base_class is XGate
+ True
+ ```
+
+ In general, you should not rely on the precise class of an instruction; within a given circuit, it is expected that `Instruction.name` should be a more suitable discriminator in most situations.
+
+
+ #### broadcast\_arguments
+
+
+ Validation and handling of the arguments and its relationship.
+
+ For example, `cx([q[0],q[1]], q[2])` means `cx(q[0], q[2]); cx(q[1], q[2])`. This method yields the arguments in the right grouping. In the given example:
+
+ ```python
+ in: [[q[0],q[1]], q[2]],[]
+ outs: [q[0], q[2]], []
+ [q[1], q[2]], []
+ ```
+
+ The general broadcasting rules are:
+
+ > * If len(qargs) == 1:
+ >
+ > ```python
+ > [q[0], q[1]] -> [q[0]],[q[1]]
+ > ```
+ >
+ > * If len(qargs) == 2:
+ >
+ > ```python
+ > [[q[0], q[1]], [r[0], r[1]]] -> [q[0], r[0]], [q[1], r[1]]
+ > [[q[0]], [r[0], r[1]]] -> [q[0], r[0]], [q[0], r[1]]
+ > [[q[0], q[1]], [r[0]]] -> [q[0], r[0]], [q[1], r[0]]
+ > ```
+ >
+ > * If len(qargs) >= 3:
+ >
+ > ```python
+ > [q[0], q[1]], [r[0], r[1]], ...] -> [q[0], r[0], ...], [q[1], r[1], ...]
+ > ```
+
+ **Parameters**
+
+ * **qargs** ([*list*](https://docs.python.org/3/library/stdtypes.html#list)) – List of quantum bit arguments.
+ * **cargs** ([*list*](https://docs.python.org/3/library/stdtypes.html#list)) – List of classical bit arguments.
+
+ **Returns**
+
+ A tuple with single arguments.
+
+ **Raises**
+
+ **CircuitError** – If the input is not valid. For example, the number of arguments does not match the gate expectation.
+
+ **Return type**
+
+ [*Iterable*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Iterable)\[[tuple](https://docs.python.org/3/library/stdtypes.html#tuple)\[[list](https://docs.python.org/3/library/stdtypes.html#list), [list](https://docs.python.org/3/library/stdtypes.html#list)]]
+
+
+ #### control
+
+
+ Return the controlled version of itself.
+
+ The controlled gate is implemented as `ControlledGate` when `annotated` is `False`, and as `AnnotatedOperation` when `annotated` is `True`.
+
+
+ `qiskit.circuit.gate.Gate.control()`’s argument `annotated` is deprecated as of Qiskit 2.3. It will be removed in Qiskit 3.0. The method Gate.control() no longer accepts annotated=None. The new default is annotated=True, which represents the controlled gate as an AnnotatedOperation (unless a dedicated controlled-gate class already exists). You can explicitly set annotated=False to preserve the previous behavior. However, using annotated=True is recommended, as it defers construction of the controlled circuit to transpiler, and furthermore enables additional controlled-gate optimizations (typically leading to higher-quality circuits).
+
+
+ **Parameters**
+
+ * **num\_ctrl\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int)) – Number of controls to add. Defaults to `1`.
+ * **label** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *| None*) – Optional gate label. Defaults to `None`. Ignored if the controlled gate is implemented as an annotated operation.
+ * **ctrl\_state** ([*int*](https://docs.python.org/3/library/functions.html#int) *|*[*str*](https://docs.python.org/3/library/stdtypes.html#str) *| None*) – The control state of the gate, specified either as an integer or a bitstring (e.g. `"110"`). If `None`, defaults to the all-ones state `2**num_ctrl_qubits - 1`.
+ * **annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool) *| None*) – Indicates whether the controlled gate should be implemented as a controlled gate or as an annotated operation. If `None`, treated as `False`.
+
+ **Returns**
+
+ A controlled version of this gate.
+
+ **Raises**
+
+ **QiskitError** – invalid `num_ctrl_qubits` or `ctrl_state`.
+
+
+ #### copy
+
+
+ Copy of the instruction.
+
+ **Parameters**
+
+ **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – name to be given to the copied circuit, if `None` then the name stays the same.
+
+ **Returns**
+
+ a copy of the current instruction, with the name updated if it was provided
+
+ **Return type**
+
+ [qiskit.circuit.Instruction](/docs/api/qiskit/qiskit.circuit.Instruction)
+
+
+ #### decompositions
+
+
+ Get the decompositions of the instruction from the SessionEquivalenceLibrary.
+
+
+ #### definition
+
+
+ Return definition in terms of other basic gates.
+
+
+ #### inverse
+
+
+ Invert this instruction.
+
+ If annotated is False, the inverse instruction is implemented as a fresh instruction with the recursively inverted definition.
+
+ If annotated is True, the inverse instruction is implemented as `AnnotatedOperation`, and corresponds to the given instruction annotated with the “inverse modifier”.
+
+ Special instructions inheriting from Instruction can implement their own inverse (e.g. T and Tdg, Barrier, etc.) In particular, they can choose how to handle the argument `annotated` which may include ignoring it and always returning a concrete gate class if the inverse is defined as a standard gate.
+
+ **Parameters**
+
+ **annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) – if set to True the output inverse gate will be returned as `AnnotatedOperation`.
+
+ **Returns**
+
+ The inverse operation.
+
+ **Raises**
+
+ **CircuitError** – if the instruction is not composite and an inverse has not been implemented for it.
+
+
+ #### is\_parameterized
+
+
+ Return whether the `Instruction` contains compile-time parameters.
+
+
+ #### label
+
+
+ Return instruction label
+
+
+ #### mutable
+
+
+ Is this instance is a mutable unique instance or not.
+
+ If this attribute is `False` the gate instance is a shared singleton and is not mutable.
+
+
+ #### name
+
+
+ Return the name.
+
+
+ #### num\_clbits
+
+
+ Return the number of clbits.
+
+
+ #### num\_qubits
+
+
+ Return the number of qubits.
+
+
+ #### params
+
+
+ The parameters of this `Instruction`. Ideally these will be gate angles.
+
+
+ #### power
+
+
+ Raise this gate to the power of `exponent`.
+
+ Implemented either as a unitary gate (ref. `UnitaryGate`) or as an annotated operation (ref. `AnnotatedOperation`). In the case of several standard gates, such as `RXGate`, when the power of a gate can be expressed in terms of another standard gate that is returned directly.
+
+ **Parameters**
+
+ * **exponent** ([*float*](https://docs.python.org/3/library/functions.html#float)) – the power to raise the gate to
+ * **annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) – indicates whether the power gate can be implemented as an annotated operation. In the case of several standard gates, such as `RXGate`, this argument is ignored when the power of a gate can be expressed in terms of another standard gate.
+
+ **Returns**
+
+ An operation implementing `gate^exponent`
+
+ **Raises**
+
+ **CircuitError** – If gate is not unitary
+
+
+ #### repeat
+
+
+ Creates an instruction with `self` repeated $n$ times.
+
+ **Parameters**
+
+ **n** ([*int*](https://docs.python.org/3/library/functions.html#int)) – Number of times to repeat the instruction
+
+ **Returns**
+
+ Containing the definition.
+
+ **Return type**
+
+ [qiskit.circuit.Instruction](/docs/api/qiskit/qiskit.circuit.Instruction)
+
+ **Raises**
+
+ **CircuitError** – If n \< 1.
+
+
+ #### reverse\_ops
+
+
+ For a composite instruction, reverse the order of sub-instructions.
+
+ This is done by recursively reversing all sub-instructions. It does not invert any gate.
+
+ **Returns**
+
+ **a new instruction with**
+
+ sub-instructions reversed.
+
+ **Return type**
+
+ [qiskit.circuit.Instruction](/docs/api/qiskit/qiskit.circuit.Instruction)
+
+
+ #### soft\_compare
+
+
+ Soft comparison between gates. Their names, number of qubits, and classical bit numbers must match. The number of parameters must match. Each parameter is compared. If one is a ParameterExpression then it is not taken into account.
+
+ **Parameters**
+
+ **other** (*instruction*) – other instruction.
+
+ **Returns**
+
+ are self and other equal up to parameter expressions.
+
+ **Return type**
+
+ [bool](https://docs.python.org/3/library/functions.html#bool)
+
+
+ #### to\_matrix
+
+
+ Return a Numpy.array for the gate unitary matrix.
+
+ **Returns**
+
+ if the Gate subclass has a matrix definition.
+
+ **Return type**
+
+ np.ndarray
+
+ **Raises**
+
+ **CircuitError** – If a Gate subclass does not implement this method an exception will be raised when this base class method is called.
+
+
+ #### to\_mutable
+
+
+ Return a mutable copy of this gate.
+
+ This method will return a new mutable copy of this gate instance. If a singleton instance is being used this will be a new unique instance that can be mutated. If the instance is already mutable it will be a deepcopy of that instance.
+
+
+ #### validate\_parameter
+
+
+ Gate parameters should be int, float, or ParameterExpression
+
+
+
diff --git a/docs/api/qiskit-addon-utils/noise-management-post-selection-transpiler-passes-add-post-selection-measures.mdx b/docs/api/qiskit-addon-utils/noise-management-post-selection-transpiler-passes-add-post-selection-measures.mdx
index 9f4b58f3a819..76a7ffe19306 100644
--- a/docs/api/qiskit-addon-utils/noise-management-post-selection-transpiler-passes-add-post-selection-measures.mdx
+++ b/docs/api/qiskit-addon-utils/noise-management-post-selection-transpiler-passes-add-post-selection-measures.mdx
@@ -8,7 +8,7 @@ python_api_name: qiskit_addon_utils.noise_management.post_selection.transpiler.p
# AddPostSelectionMeasures
-
+
Bases: [`TransformationPass`](/docs/api/qiskit/qiskit.transpiler.TransformationPass)
Add a post selection measurement after every terminal measurement.
@@ -55,9 +55,9 @@ python_api_name: qiskit_addon_utils.noise_management.post_selection.transpiler.p
**Parameters**
- * **passmanager\_ir** ([*Any*](https://docs.python.org/3/library/typing.html#typing.Any)) – Qiskit IR to optimize.
- * **state** ([*PassManagerState*](/docs/api/qiskit/qiskit.passmanager.PassManagerState)) – State associated with workflow execution by the pass manager itself.
- * **callback** ([*Callable*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Callable) *| None*) – A callback function which is caller per execution of optimization task.
+ * **passmanager\_ir** ([*DAGCircuit*](/docs/api/qiskit/qiskit.dagcircuit.DAGCircuit)) – Qiskit IR to optimize.
+ * **state** ([*DAGCircuit*](/docs/api/qiskit/qiskit.dagcircuit.DAGCircuit)) – State associated with workflow execution by the pass manager itself.
+ * **callback** ([*Callable*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Callable)*\[\[Task,* [*DAGCircuit*](/docs/api/qiskit/qiskit.dagcircuit.DAGCircuit)*,* [*PropertySet*](/docs/api/qiskit/qiskit.passmanager.PropertySet)*,* [*float*](https://docs.python.org/3/library/functions.html#float)*,* [*int*](https://docs.python.org/3/library/functions.html#int)*], None] | None*) – A callback function which is called per execution of optimization task.
**Returns**
@@ -65,7 +65,7 @@ python_api_name: qiskit_addon_utils.noise_management.post_selection.transpiler.p
**Return type**
- [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)\[[*Any*](https://docs.python.org/3/library/typing.html#typing.Any), [*PassManagerState*](/docs/api/qiskit/qiskit.passmanager.PassManagerState)]
+ [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)\[[*DAGCircuit*](/docs/api/qiskit/qiskit.dagcircuit.DAGCircuit), [*PassManagerState*](/docs/api/qiskit/qiskit.passmanager.PassManagerState)]
### name
@@ -80,7 +80,7 @@ python_api_name: qiskit_addon_utils.noise_management.post_selection.transpiler.p
### run
-
+
Run a pass on the DAGCircuit. This is implemented by the pass developer.
**Parameters**
diff --git a/docs/api/qiskit-addon-utils/noise-management-post-selection-transpiler-passes-add-spectator-measures.mdx b/docs/api/qiskit-addon-utils/noise-management-post-selection-transpiler-passes-add-spectator-measures.mdx
index fd4a404d37ed..881065323302 100644
--- a/docs/api/qiskit-addon-utils/noise-management-post-selection-transpiler-passes-add-spectator-measures.mdx
+++ b/docs/api/qiskit-addon-utils/noise-management-post-selection-transpiler-passes-add-spectator-measures.mdx
@@ -8,7 +8,7 @@ python_api_name: qiskit_addon_utils.noise_management.post_selection.transpiler.p
# AddSpectatorMeasures
-
+
Bases: [`TransformationPass`](/docs/api/qiskit/qiskit.transpiler.TransformationPass)
Add measurements on spectator qubits.
@@ -57,9 +57,9 @@ python_api_name: qiskit_addon_utils.noise_management.post_selection.transpiler.p
**Parameters**
- * **passmanager\_ir** ([*Any*](https://docs.python.org/3/library/typing.html#typing.Any)) – Qiskit IR to optimize.
- * **state** ([*PassManagerState*](/docs/api/qiskit/qiskit.passmanager.PassManagerState)) – State associated with workflow execution by the pass manager itself.
- * **callback** ([*Callable*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Callable) *| None*) – A callback function which is caller per execution of optimization task.
+ * **passmanager\_ir** ([*DAGCircuit*](/docs/api/qiskit/qiskit.dagcircuit.DAGCircuit)) – Qiskit IR to optimize.
+ * **state** ([*DAGCircuit*](/docs/api/qiskit/qiskit.dagcircuit.DAGCircuit)) – State associated with workflow execution by the pass manager itself.
+ * **callback** ([*Callable*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Callable)*\[\[Task,* [*DAGCircuit*](/docs/api/qiskit/qiskit.dagcircuit.DAGCircuit)*,* [*PropertySet*](/docs/api/qiskit/qiskit.passmanager.PropertySet)*,* [*float*](https://docs.python.org/3/library/functions.html#float)*,* [*int*](https://docs.python.org/3/library/functions.html#int)*], None] | None*) – A callback function which is called per execution of optimization task.
**Returns**
@@ -67,7 +67,7 @@ python_api_name: qiskit_addon_utils.noise_management.post_selection.transpiler.p
**Return type**
- [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)\[[*Any*](https://docs.python.org/3/library/typing.html#typing.Any), [*PassManagerState*](/docs/api/qiskit/qiskit.passmanager.PassManagerState)]
+ [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)\[[*DAGCircuit*](/docs/api/qiskit/qiskit.dagcircuit.DAGCircuit), [*PassManagerState*](/docs/api/qiskit/qiskit.passmanager.PassManagerState)]
### name
@@ -82,7 +82,7 @@ python_api_name: qiskit_addon_utils.noise_management.post_selection.transpiler.p
### run
-
+
Run a pass on the DAGCircuit. This is implemented by the pass developer.
**Parameters**
diff --git a/docs/api/qiskit-addon-utils/noise-management-post-selection-transpiler-passes-x-slow-gate.mdx b/docs/api/qiskit-addon-utils/noise-management-post-selection-transpiler-passes-x-slow-gate.mdx
index 784e4f42b23c..9c33dad4e7f2 100644
--- a/docs/api/qiskit-addon-utils/noise-management-post-selection-transpiler-passes-x-slow-gate.mdx
+++ b/docs/api/qiskit-addon-utils/noise-management-post-selection-transpiler-passes-x-slow-gate.mdx
@@ -8,7 +8,7 @@ python_api_name: qiskit_addon_utils.noise_management.post_selection.transpiler.p
# XSlowGate
-
+
Bases: [`Gate`](/docs/api/qiskit/qiskit.circuit.Gate)
The x-slow gate.
@@ -152,7 +152,7 @@ python_api_name: qiskit_addon_utils.noise_management.post_selection.transpiler.p
**Return type**
- [*Iterable*](https://docs.python.org/3/library/typing.html#typing.Iterable)\[[tuple](https://docs.python.org/3/library/stdtypes.html#tuple)\[[list](https://docs.python.org/3/library/stdtypes.html#list), [list](https://docs.python.org/3/library/stdtypes.html#list)]]
+ [*Iterable*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Iterable)\[[tuple](https://docs.python.org/3/library/stdtypes.html#tuple)\[[list](https://docs.python.org/3/library/stdtypes.html#list), [list](https://docs.python.org/3/library/stdtypes.html#list)]]
### control
@@ -168,7 +168,7 @@ python_api_name: qiskit_addon_utils.noise_management.post_selection.transpiler.p
**Parameters**
- * **num\_ctrl\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int)) – Number of controls to add. Defauls to `1`.
+ * **num\_ctrl\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int)) – Number of controls to add. Defaults to `1`.
* **label** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *| None*) – Optional gate label. Defaults to `None`. Ignored if the controlled gate is implemented as an annotated operation.
* **ctrl\_state** ([*int*](https://docs.python.org/3/library/functions.html#int) *|*[*str*](https://docs.python.org/3/library/stdtypes.html#str) *| None*) – The control state of the gate, specified either as an integer or a bitstring (e.g. `"110"`). If `None`, defaults to the all-ones state `2**num_ctrl_qubits - 1`.
* **annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool) *| None*) – Indicates whether the controlled gate should be implemented as a controlled gate or as an annotated operation. If `None`, treated as `False`.
@@ -179,7 +179,7 @@ python_api_name: qiskit_addon_utils.noise_management.post_selection.transpiler.p
**Raises**
- **QiskitError** – invalid `ctrl_state`.
+ **QiskitError** – invalid `num_ctrl_qubits` or `ctrl_state`.
### copy
@@ -227,7 +227,7 @@ python_api_name: qiskit_addon_utils.noise_management.post_selection.transpiler.p
### is\_parameterized
- Return whether the `Instruction` contains [compile-time parameters](/docs/api/qiskit/circuit#circuit-compile-time-parameters).
+ Return whether the `Instruction` contains compile-time parameters.
### power
@@ -254,7 +254,7 @@ python_api_name: qiskit_addon_utils.noise_management.post_selection.transpiler.p
### repeat
- Creates an instruction with `self` repeated :math\`n\` times.
+ Creates an instruction with `self` repeated $n$ times.
**Parameters**
diff --git a/docs/api/qiskit-addon-utils/noise-management-post-selection-transpiler-passes.mdx b/docs/api/qiskit-addon-utils/noise-management-post-selection-transpiler-passes.mdx
index 0339b895ecac..855b494c0bc5 100644
--- a/docs/api/qiskit-addon-utils/noise-management-post-selection-transpiler-passes.mdx
+++ b/docs/api/qiskit-addon-utils/noise-management-post-selection-transpiler-passes.mdx
@@ -16,9 +16,9 @@ python_api_name: qiskit_addon_utils.noise_management.post_selection.transpiler.p
A submodule with transpilation passes for post selection.
-| | |
-| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ |
-| [`AddSpectatorMeasures`](noise-management-post-selection-transpiler-passes-add-spectator-measures "qiskit_addon_utils.noise_management.post_selection.transpiler.passes.AddSpectatorMeasures") | Add measurements on spectator qubits. |
-| [`AddPostSelectionMeasures`](noise-management-post-selection-transpiler-passes-add-post-selection-measures "qiskit_addon_utils.noise_management.post_selection.transpiler.passes.AddPostSelectionMeasures") | Add a post selection measurement after every terminal measurement. |
-| [`XSlowGate`](noise-management-post-selection-transpiler-passes-x-slow-gate "qiskit_addon_utils.noise_management.post_selection.transpiler.passes.XSlowGate") | The x-slow gate. |
+| | |
+| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ |
+| [`AddSpectatorMeasures`](/docs/api/qiskit-addon-utils/noise-management-post-selection-transpiler-passes-add-spectator-measures "qiskit_addon_utils.noise_management.post_selection.transpiler.passes.AddSpectatorMeasures") | Add measurements on spectator qubits. |
+| [`AddPostSelectionMeasures`](/docs/api/qiskit-addon-utils/noise-management-post-selection-transpiler-passes-add-post-selection-measures "qiskit_addon_utils.noise_management.post_selection.transpiler.passes.AddPostSelectionMeasures") | Add a post selection measurement after every terminal measurement. |
+| [`XSlowGate`](/docs/api/qiskit-addon-utils/noise-management-post-selection-transpiler-passes-x-slow-gate "qiskit_addon_utils.noise_management.post_selection.transpiler.passes.XSlowGate") | The x-slow gate. |
diff --git a/docs/api/qiskit-addon-utils/noise-management.mdx b/docs/api/qiskit-addon-utils/noise-management.mdx
index 2adc639d705b..bb7b2ed29a73 100644
--- a/docs/api/qiskit-addon-utils/noise-management.mdx
+++ b/docs/api/qiskit-addon-utils/noise-management.mdx
@@ -18,16 +18,15 @@ Noise management tools.
### trex\_factors
-
+
Calculates TREX mitigation algorithm’s expectation value scale factor for each Pauli term in `basis_dict`.
- Calculates \ for each Pauli term in each observable, where n is the non identity indices in the Pauli term. The calculation is done using learned measurement noise.
+ Calculates $\langle Z^N \rangle$ for each non-identity Pauli term in each observable using learned measurement noise, where $N$ are the non-identity indices in the term.
**Parameters**
* **measurement\_noise\_map** ([*PauliLindbladMap*](/docs/api/qiskit/qiskit.quantum_info.PauliLindbladMap)) – Learned measurement noise in PauliLindbladMap format.
- * **basis\_dict** ([*dict*](https://docs.python.org/3/library/stdtypes.html#dict)*\[*[*Pauli*](/docs/api/qiskit/qiskit.quantum_info.Pauli)*,* [*list*](https://docs.python.org/3/library/stdtypes.html#list)*\[*[*SparsePauliOp*](/docs/api/qiskit/qiskit.quantum_info.SparsePauliOp) *| None]]*) – Mapping between measure bases and observables in which the TREX algorithm mitigates their
- * **calculation.** (*expectation value*)
+ * **basis\_dict** ([*dict*](https://docs.python.org/3/library/stdtypes.html#dict)*\[*[*Pauli*](/docs/api/qiskit/qiskit.quantum_info.Pauli)*,* [*list*](https://docs.python.org/3/library/stdtypes.html#list)*\[*[*SparsePauliOp*](/docs/api/qiskit/qiskit.quantum_info.SparsePauliOp) *| None]]*) – Mapping between measure bases and observables in which the TREX algorithm mitigates their expectation value calculation.
**Returns**
@@ -36,7 +35,7 @@ Noise management tools.
### gamma\_from\_noisy\_boxes
-
+
Calculate the gamma factor for a circuit given the Pauli-Lindblad noise models for the boxes in that circuit.
This function expects the noise models to represent the noise in the circuit, and thus to have positive Lindblad rates. The returned gamma is that associated with the inverse noise maps needed to cancel the noise in the circuit.
@@ -62,7 +61,7 @@ Noise management tools.
### PostSelectionSummary
-
+
Bases: [`object`](https://docs.python.org/3/library/functions.html#object)
A helper class to store the properties of a quantum circuit required to post select the results.
@@ -84,7 +83,7 @@ Noise management tools.
#### from\_circuit
-
+
Initialize from quantum circuits.
**Parameters**
@@ -119,7 +118,7 @@ Noise management tools.
### PostSelector
-
+
Bases: [`object`](https://docs.python.org/3/library/functions.html#object)
A class to process the results of quantum programs based on the outcome of post selection measurements.
@@ -132,7 +131,7 @@ Noise management tools.
#### compute\_mask
-
+
Compute boolean masks indicating what shots should be kept or discarded for the given result.
This function compares the bits returned by every pair of measurement and post selection measurement, identifying all those that failed to flip. The shots that should be kept are marked as `True` in the returned mask, those that should be discarded are marked as `False`.
@@ -151,7 +150,7 @@ Noise management tools.
#### from\_circuit
-
+
Initialize from quantum circuits.
**Parameters**
diff --git a/docs/api/qiskit-addon-utils/problem-generators.mdx b/docs/api/qiskit-addon-utils/problem-generators.mdx
index 39d9cad27d64..5de07871bc4b 100644
--- a/docs/api/qiskit-addon-utils/problem-generators.mdx
+++ b/docs/api/qiskit-addon-utils/problem-generators.mdx
@@ -18,7 +18,7 @@ Utility methods for problem generation.
### generate\_xyz\_hamiltonian
-
+
Generate a connectivity-aware qubit operator representing a quantum XYZ-type model.
This function implements the following Hamiltonian:
@@ -83,7 +83,7 @@ $$
### generate\_time\_evolution\_circuit
-
+
Model the time evolution of an operator.
```python
@@ -133,7 +133,7 @@ $$
### PauliOrderStrategy
-
+
Bases: [`Enum`](https://docs.python.org/3/library/enum.html#enum.Enum)
Enumeration of different Pauli-orderings.
diff --git a/docs/api/qiskit-addon-utils/release-notes.mdx b/docs/api/qiskit-addon-utils/release-notes.mdx
index acb2e125492a..f270844f4db6 100644
--- a/docs/api/qiskit-addon-utils/release-notes.mdx
+++ b/docs/api/qiskit-addon-utils/release-notes.mdx
@@ -10,48 +10,64 @@ in_page_toc_max_heading_level: 2
# Qiskit addon utilities release notes
-
+
+## 0.4.0
+
+
+
+### New Features
+
+* Enable new input format for the executor\_expectation\_values function - allow a tuple of observables and measurement bases instead of a dictionary that maps between each measurement basis and its relevant commuting observables. In case such a tuple is given as input, the mapping between the measurement bases and the relevant commuting observables is done internally in the function.
+
+* Added the [`qiskit_addon_utils.noise_management.bit_flip_checks`](/docs/api/qiskit-addon-utils/noise-management-bit-flip-checks#module-qiskit_addon_utils.noise_management.bit_flip_checks "qiskit_addon_utils.noise_management.bit_flip_checks") sub-package for detecting samples likely corrupted by non-Markovian noise with bit-flip checks. Postselecting only samples which pass all checks can result in a higher-fidelity distribution of samples from the QPU. See the [guide](https://github.com/Qiskit/qiskit-addon-utils/blob/stable/0.4/docs/how_tos/postselection_with_bitflip_checks.ipynb) for more details.
+
+
+
+
+
## 0.3.1
### Bug Fixes
-* Fixed bugs in [`qiskit_addon_utils.exp_vals.executor_expectation_values()`](exp-vals#executor_expectation_values "qiskit_addon_utils.exp_vals.executor_expectation_values") causing indexing errors when bit\_array dimensions associated with twirling randomizations were not specified in avg\_axis.
+* Fixed bugs in [`qiskit_addon_utils.exp_vals.executor_expectation_values()`](/docs/api/qiskit-addon-utils/exp-vals#executor_expectation_values "qiskit_addon_utils.exp_vals.executor_expectation_values") causing indexing errors when bit\_array dimensions associated with twirling randomizations were not specified in avg\_axis.
-
+
## 0.3.0
+
+
### New Features
-* Added a new sub-package, [`qiskit_addon_utils.exp_vals`](exp-vals#module-qiskit_addon_utils.exp_vals "qiskit_addon_utils.exp_vals"), containing functions for calculating expectation values from the outputs of Qiskit Runtime’s new `Executor` primitive prototype. This includes:
+* Added a new sub-package, [`qiskit_addon_utils.exp_vals`](/docs/api/qiskit-addon-utils/exp-vals#module-qiskit_addon_utils.exp_vals "qiskit_addon_utils.exp_vals"), containing functions for calculating expectation values from the outputs of Qiskit Runtime’s new `Executor` primitive prototype. This includes:
- > * [`qiskit_addon_utils.exp_vals.executor_expectation_values()`](exp-vals#executor_expectation_values "qiskit_addon_utils.exp_vals.executor_expectation_values") for expectation value calculation
- > * [`qiskit_addon_utils.exp_vals.get_measurement_bases()`](exp-vals#get_measurement_bases "qiskit_addon_utils.exp_vals.get_measurement_bases") for identifying a minimal set of measurement bases to cover all terms in the observable.
- > * [`qiskit_addon_utils.exp_vals.map_observable_isa_to_canonical()`](exp-vals#map_observable_isa_to_canonical "qiskit_addon_utils.exp_vals.map_observable_isa_to_canonical"), [`qiskit_addon_utils.exp_vals.map_observable_virtual_to_canonical()`](exp-vals#map_observable_virtual_to_canonical "qiskit_addon_utils.exp_vals.map_observable_virtual_to_canonical"), and [`qiskit_addon_utils.exp_vals.map_observable_isa_to_virtual()`](exp-vals#map_observable_isa_to_virtual "qiskit_addon_utils.exp_vals.map_observable_isa_to_virtual") for transforming the qubit order of Pauli observables.
+ > * [`qiskit_addon_utils.exp_vals.executor_expectation_values()`](/docs/api/qiskit-addon-utils/exp-vals#executor_expectation_values "qiskit_addon_utils.exp_vals.executor_expectation_values") for expectation value calculation
+ > * [`qiskit_addon_utils.exp_vals.get_measurement_bases()`](/docs/api/qiskit-addon-utils/exp-vals#get_measurement_bases "qiskit_addon_utils.exp_vals.get_measurement_bases") for identifying a minimal set of measurement bases to cover all terms in the observable.
+ > * [`qiskit_addon_utils.exp_vals.map_observable_isa_to_canonical()`](/docs/api/qiskit-addon-utils/exp-vals#map_observable_isa_to_canonical "qiskit_addon_utils.exp_vals.map_observable_isa_to_canonical"), [`qiskit_addon_utils.exp_vals.map_observable_virtual_to_canonical()`](/docs/api/qiskit-addon-utils/exp-vals#map_observable_virtual_to_canonical "qiskit_addon_utils.exp_vals.map_observable_virtual_to_canonical"), and [`qiskit_addon_utils.exp_vals.map_observable_isa_to_virtual()`](/docs/api/qiskit-addon-utils/exp-vals#map_observable_isa_to_virtual "qiskit_addon_utils.exp_vals.map_observable_isa_to_virtual") for transforming the qubit order of Pauli observables.
-* Added two new functions to the [`qiskit_addon_utils.noise_management`](noise-management#module-qiskit_addon_utils.noise_management "qiskit_addon_utils.noise_management") sub-package:
+* Added two new functions to the [`qiskit_addon_utils.noise_management`](/docs/api/qiskit-addon-utils/noise-management#module-qiskit_addon_utils.noise_management "qiskit_addon_utils.noise_management") sub-package:
- > * [`qiskit_addon_utils.noise_management.trex_factors()`](noise-management#trex_factors "qiskit_addon_utils.noise_management.trex_factors") for calculating TREX readout error mitigation scaling factors
- > * [`qiskit_addon_utils.noise_management.gamma_from_noisy_boxes()`](noise-management#gamma_from_noisy_boxes "qiskit_addon_utils.noise_management.gamma_from_noisy_boxes") for calculating the gamma factor for a given circuit and noise model.
+ > * [`qiskit_addon_utils.noise_management.trex_factors()`](/docs/api/qiskit-addon-utils/noise-management#trex_factors "qiskit_addon_utils.noise_management.trex_factors") for calculating TREX readout error mitigation scaling factors
+ > * [`qiskit_addon_utils.noise_management.gamma_from_noisy_boxes()`](/docs/api/qiskit-addon-utils/noise-management#gamma_from_noisy_boxes "qiskit_addon_utils.noise_management.gamma_from_noisy_boxes") for calculating the gamma factor for a given circuit and noise model.
-
+
## 0.2.0
-
+
### New Features
@@ -67,7 +83,7 @@ in_page_toc_max_heading_level: 2
-
+
### Bug Fixes
@@ -81,15 +97,15 @@ in_page_toc_max_heading_level: 2
-
+
## 0.1.0
-
+
### Upgrade Notes
-* The keyword argument `include_slice_barriers` of [`combine_slices()`](slicing#combine_slices "qiskit_addon_utils.slicing.combine_slices") has been renamed to `include_barriers`.
+* The keyword argument `include_slice_barriers` of [`combine_slices()`](/docs/api/qiskit-addon-utils/slicing#combine_slices "qiskit_addon_utils.slicing.combine_slices") has been renamed to `include_barriers`.
diff --git a/docs/api/qiskit-addon-utils/slicing-transpiler-passes-collect-op-color.mdx b/docs/api/qiskit-addon-utils/slicing-transpiler-passes-collect-op-color.mdx
index c839e5e4d241..b92eecb058a1 100644
--- a/docs/api/qiskit-addon-utils/slicing-transpiler-passes-collect-op-color.mdx
+++ b/docs/api/qiskit-addon-utils/slicing-transpiler-passes-collect-op-color.mdx
@@ -8,7 +8,7 @@ python_api_name: qiskit_addon_utils.slicing.transpiler.passes.CollectOpColor
# CollectOpColor
-
+
Bases: [`CollectAndCollapse`](/docs/api/qiskit/qiskit.transpiler.passes.CollectAndCollapse)
Collects blocks of operations which act on the provided edges.
@@ -54,9 +54,9 @@ python_api_name: qiskit_addon_utils.slicing.transpiler.passes.CollectOpColor
**Parameters**
- * **passmanager\_ir** ([*Any*](https://docs.python.org/3/library/typing.html#typing.Any)) – Qiskit IR to optimize.
- * **state** ([*PassManagerState*](/docs/api/qiskit/qiskit.passmanager.PassManagerState)) – State associated with workflow execution by the pass manager itself.
- * **callback** ([*Callable*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Callable) *| None*) – A callback function which is caller per execution of optimization task.
+ * **passmanager\_ir** ([*DAGCircuit*](/docs/api/qiskit/qiskit.dagcircuit.DAGCircuit)) – Qiskit IR to optimize.
+ * **state** ([*DAGCircuit*](/docs/api/qiskit/qiskit.dagcircuit.DAGCircuit)) – State associated with workflow execution by the pass manager itself.
+ * **callback** ([*Callable*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Callable)*\[\[Task,* [*DAGCircuit*](/docs/api/qiskit/qiskit.dagcircuit.DAGCircuit)*,* [*PropertySet*](/docs/api/qiskit/qiskit.passmanager.PropertySet)*,* [*float*](https://docs.python.org/3/library/functions.html#float)*,* [*int*](https://docs.python.org/3/library/functions.html#int)*], None] | None*) – A callback function which is called per execution of optimization task.
**Returns**
@@ -64,7 +64,7 @@ python_api_name: qiskit_addon_utils.slicing.transpiler.passes.CollectOpColor
**Return type**
- [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)\[[*Any*](https://docs.python.org/3/library/typing.html#typing.Any), [*PassManagerState*](/docs/api/qiskit/qiskit.passmanager.PassManagerState)]
+ [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)\[[*DAGCircuit*](/docs/api/qiskit/qiskit.dagcircuit.DAGCircuit), [*PassManagerState*](/docs/api/qiskit/qiskit.passmanager.PassManagerState)]
### name
diff --git a/docs/api/qiskit-addon-utils/slicing-transpiler-passes-collect-op-size.mdx b/docs/api/qiskit-addon-utils/slicing-transpiler-passes-collect-op-size.mdx
index 6ea41f564c24..c4e5dcfaf974 100644
--- a/docs/api/qiskit-addon-utils/slicing-transpiler-passes-collect-op-size.mdx
+++ b/docs/api/qiskit-addon-utils/slicing-transpiler-passes-collect-op-size.mdx
@@ -8,7 +8,7 @@ python_api_name: qiskit_addon_utils.slicing.transpiler.passes.CollectOpSize
# CollectOpSize
-
+
Bases: [`CollectAndCollapse`](/docs/api/qiskit/qiskit.transpiler.passes.CollectAndCollapse)
Collects blocks of the specified size and replaces them by a single block instruction.
@@ -51,9 +51,9 @@ python_api_name: qiskit_addon_utils.slicing.transpiler.passes.CollectOpSize
**Parameters**
- * **passmanager\_ir** ([*Any*](https://docs.python.org/3/library/typing.html#typing.Any)) – Qiskit IR to optimize.
- * **state** ([*PassManagerState*](/docs/api/qiskit/qiskit.passmanager.PassManagerState)) – State associated with workflow execution by the pass manager itself.
- * **callback** ([*Callable*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Callable) *| None*) – A callback function which is caller per execution of optimization task.
+ * **passmanager\_ir** ([*DAGCircuit*](/docs/api/qiskit/qiskit.dagcircuit.DAGCircuit)) – Qiskit IR to optimize.
+ * **state** ([*DAGCircuit*](/docs/api/qiskit/qiskit.dagcircuit.DAGCircuit)) – State associated with workflow execution by the pass manager itself.
+ * **callback** ([*Callable*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Callable)*\[\[Task,* [*DAGCircuit*](/docs/api/qiskit/qiskit.dagcircuit.DAGCircuit)*,* [*PropertySet*](/docs/api/qiskit/qiskit.passmanager.PropertySet)*,* [*float*](https://docs.python.org/3/library/functions.html#float)*,* [*int*](https://docs.python.org/3/library/functions.html#int)*], None] | None*) – A callback function which is called per execution of optimization task.
**Returns**
@@ -61,7 +61,7 @@ python_api_name: qiskit_addon_utils.slicing.transpiler.passes.CollectOpSize
**Return type**
- [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)\[[*Any*](https://docs.python.org/3/library/typing.html#typing.Any), [*PassManagerState*](/docs/api/qiskit/qiskit.passmanager.PassManagerState)]
+ [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)\[[*DAGCircuit*](/docs/api/qiskit/qiskit.dagcircuit.DAGCircuit), [*PassManagerState*](/docs/api/qiskit/qiskit.passmanager.PassManagerState)]
### name
diff --git a/docs/api/qiskit-addon-utils/slicing-transpiler-passes-collect-op-type.mdx b/docs/api/qiskit-addon-utils/slicing-transpiler-passes-collect-op-type.mdx
index 784b57d3c06e..16b5ac21ab7d 100644
--- a/docs/api/qiskit-addon-utils/slicing-transpiler-passes-collect-op-type.mdx
+++ b/docs/api/qiskit-addon-utils/slicing-transpiler-passes-collect-op-type.mdx
@@ -8,7 +8,7 @@ python_api_name: qiskit_addon_utils.slicing.transpiler.passes.CollectOpType
# CollectOpType
-
+
Bases: [`CollectAndCollapse`](/docs/api/qiskit/qiskit.transpiler.passes.CollectAndCollapse)
Collects blocks of the specified operation and replaces them by a single block instruction.
@@ -51,9 +51,9 @@ python_api_name: qiskit_addon_utils.slicing.transpiler.passes.CollectOpType
**Parameters**
- * **passmanager\_ir** ([*Any*](https://docs.python.org/3/library/typing.html#typing.Any)) – Qiskit IR to optimize.
- * **state** ([*PassManagerState*](/docs/api/qiskit/qiskit.passmanager.PassManagerState)) – State associated with workflow execution by the pass manager itself.
- * **callback** ([*Callable*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Callable) *| None*) – A callback function which is caller per execution of optimization task.
+ * **passmanager\_ir** ([*DAGCircuit*](/docs/api/qiskit/qiskit.dagcircuit.DAGCircuit)) – Qiskit IR to optimize.
+ * **state** ([*DAGCircuit*](/docs/api/qiskit/qiskit.dagcircuit.DAGCircuit)) – State associated with workflow execution by the pass manager itself.
+ * **callback** ([*Callable*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Callable)*\[\[Task,* [*DAGCircuit*](/docs/api/qiskit/qiskit.dagcircuit.DAGCircuit)*,* [*PropertySet*](/docs/api/qiskit/qiskit.passmanager.PropertySet)*,* [*float*](https://docs.python.org/3/library/functions.html#float)*,* [*int*](https://docs.python.org/3/library/functions.html#int)*], None] | None*) – A callback function which is called per execution of optimization task.
**Returns**
@@ -61,7 +61,7 @@ python_api_name: qiskit_addon_utils.slicing.transpiler.passes.CollectOpType
**Return type**
- [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)\[[*Any*](https://docs.python.org/3/library/typing.html#typing.Any), [*PassManagerState*](/docs/api/qiskit/qiskit.passmanager.PassManagerState)]
+ [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)\[[*DAGCircuit*](/docs/api/qiskit/qiskit.dagcircuit.DAGCircuit), [*PassManagerState*](/docs/api/qiskit/qiskit.passmanager.PassManagerState)]
### name
diff --git a/docs/api/qiskit-addon-utils/slicing-transpiler-passes.mdx b/docs/api/qiskit-addon-utils/slicing-transpiler-passes.mdx
index f4ee1a48a786..041efb1adb7b 100644
--- a/docs/api/qiskit-addon-utils/slicing-transpiler-passes.mdx
+++ b/docs/api/qiskit-addon-utils/slicing-transpiler-passes.mdx
@@ -16,9 +16,9 @@ python_api_name: qiskit_addon_utils.slicing.transpiler.passes
A submodule with transpilation passes for slicing.
-| | |
-| ---------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
-| [`CollectOpColor`](slicing-transpiler-passes-collect-op-color "qiskit_addon_utils.slicing.transpiler.passes.CollectOpColor") | Collects blocks of operations which act on the provided edges. |
-| [`CollectOpSize`](slicing-transpiler-passes-collect-op-size "qiskit_addon_utils.slicing.transpiler.passes.CollectOpSize") | Collects blocks of the specified size and replaces them by a single block instruction. |
-| [`CollectOpType`](slicing-transpiler-passes-collect-op-type "qiskit_addon_utils.slicing.transpiler.passes.CollectOpType") | Collects blocks of the specified operation and replaces them by a single block instruction. |
+| | |
+| --------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
+| [`CollectOpColor`](/docs/api/qiskit-addon-utils/slicing-transpiler-passes-collect-op-color "qiskit_addon_utils.slicing.transpiler.passes.CollectOpColor") | Collects blocks of operations which act on the provided edges. |
+| [`CollectOpSize`](/docs/api/qiskit-addon-utils/slicing-transpiler-passes-collect-op-size "qiskit_addon_utils.slicing.transpiler.passes.CollectOpSize") | Collects blocks of the specified size and replaces them by a single block instruction. |
+| [`CollectOpType`](/docs/api/qiskit-addon-utils/slicing-transpiler-passes-collect-op-type "qiskit_addon_utils.slicing.transpiler.passes.CollectOpType") | Collects blocks of the specified operation and replaces them by a single block instruction. |
diff --git a/docs/api/qiskit-addon-utils/slicing.mdx b/docs/api/qiskit-addon-utils/slicing.mdx
index 80d109c14e69..ddf93443992c 100644
--- a/docs/api/qiskit-addon-utils/slicing.mdx
+++ b/docs/api/qiskit-addon-utils/slicing.mdx
@@ -20,7 +20,7 @@ For more information, check out the [how-to guide](https://qiskit.github.io/qisk
### combine\_slices
-
+
Combine N-qubit slices of a circuit into a single circuit.
**Parameters**
@@ -43,7 +43,7 @@ For more information, check out the [how-to guide](https://qiskit.github.io/qisk
### slice\_by\_barriers
-
+
Split a `QuantumCircuit` into slices around full-circuit barriers.
Barriers which do not act on all circuit qubits will be treated as normal operations and included in the slices. Barriers which act on all qubits will be interpreted as slice locations and will not be included in the output slices.
@@ -63,10 +63,10 @@ For more information, check out the [how-to guide](https://qiskit.github.io/qisk
### slice\_by\_coloring
-
+
Split a `QuantumCircuit` into slices using the provided edge coloring.
- Two-qubit gates acting on identically colored qubit connections (edges) will be grouped greedily into slices using [`CollectOpColor`](slicing-transpiler-passes-collect-op-color "qiskit_addon_utils.slicing.transpiler.passes.CollectOpColor"). This will be done in order of increasing color value (the integer values which each edge is mapped to).
+ Two-qubit gates acting on identically colored qubit connections (edges) will be grouped greedily into slices using [`CollectOpColor`](/docs/api/qiskit-addon-utils/slicing-transpiler-passes-collect-op-color "qiskit_addon_utils.slicing.transpiler.passes.CollectOpColor"). This will be done in order of increasing color value (the integer values which each edge is mapped to).
Note, that this does *not* mean that low valued color slices are guaranteed to be left-most in your circuit. Below is an example to emphasize this.
@@ -114,7 +114,7 @@ For more information, check out the [how-to guide](https://qiskit.github.io/qisk
└───┘ ░
```
- Single-qubit gates will be collected into a single slice using [`CollectOpSize`](slicing-transpiler-passes-collect-op-size "qiskit_addon_utils.slicing.transpiler.passes.CollectOpSize").
+ Single-qubit gates will be collected into a single slice using [`CollectOpSize`](/docs/api/qiskit-addon-utils/slicing-transpiler-passes-collect-op-size "qiskit_addon_utils.slicing.transpiler.passes.CollectOpSize").
**Parameters**
@@ -137,7 +137,7 @@ For more information, check out the [how-to guide](https://qiskit.github.io/qisk
### slice\_by\_depth
-
+
Split a `QuantumCircuit` into slices based on depth.
This function transforms the input circuit into a [`DAGCircuit`](/docs/api/qiskit/qiskit.dagcircuit.DAGCircuit) and batches the sequence of depth-1 layers output from [`layers()`](/docs/api/qiskit/qiskit.dagcircuit.DAGCircuit#layers) into slices of depth not exceeding `max_slice_depth`. This is achieved by composing layers into slices until the max slice depth is reached and then starting a new slice with the next layer. The final slice may be composed of fewer than `max_slice_depth` layers.
@@ -158,7 +158,7 @@ For more information, check out the [how-to guide](https://qiskit.github.io/qisk
### slice\_by\_gate\_types
-
+
Split a `QuantumCircuit` into depth-1 slices of operations of the same type.
diff --git a/public/docs/api/qiskit-addon-utils/0.3/objects.inv b/public/docs/api/qiskit-addon-utils/0.3/objects.inv
new file mode 100644
index 000000000000..fbd2841d0946
Binary files /dev/null and b/public/docs/api/qiskit-addon-utils/0.3/objects.inv differ
diff --git a/public/docs/api/qiskit-addon-utils/objects.inv b/public/docs/api/qiskit-addon-utils/objects.inv
index b4ff59622be0..bb6b7497ee42 100644
Binary files a/public/docs/api/qiskit-addon-utils/objects.inv and b/public/docs/api/qiskit-addon-utils/objects.inv differ
diff --git a/public/docs/images/api/qiskit-addon-utils/0.3/qiskit_addon_utils-problem_generators-1.avif b/public/docs/images/api/qiskit-addon-utils/0.3/qiskit_addon_utils-problem_generators-1.avif
new file mode 100644
index 000000000000..7b18ec134a37
Binary files /dev/null and b/public/docs/images/api/qiskit-addon-utils/0.3/qiskit_addon_utils-problem_generators-1.avif differ
diff --git a/scripts/config/api-html-artifacts.json b/scripts/config/api-html-artifacts.json
index d350004f8fe9..7bcef21c6f07 100644
--- a/scripts/config/api-html-artifacts.json
+++ b/scripts/config/api-html-artifacts.json
@@ -126,6 +126,7 @@
"0.2": "https://ibm.box.com/shared/static/9wxwvchyal0oqkbe46a13d9wzwxi8wxd.zip"
},
"qiskit-addon-utils": {
+ "0.4": "https://ibm.box.com/shared/static/j9qms9f2wfzo7fdfwnm2ns8rdjrhje7h.zip",
"0.3": "https://ibm.box.com/shared/static/921yb7b7162e20a9b7ojgzhc1erxhgzd.zip",
"0.2": "https://ibm.box.com/shared/static/61qpikp70xgftx1gjs8an0cxc3196ais.zip",
"0.1": "https://ibm.box.com/shared/static/6kzfxqaigskwfd8uf9dldrwqtd5yr5fd.zip"
diff --git a/scripts/config/historical-pages-to-latest.json b/scripts/config/historical-pages-to-latest.json
index 261c6da509fc..9748f52e31e7 100644
--- a/scripts/config/historical-pages-to-latest.json
+++ b/scripts/config/historical-pages-to-latest.json
@@ -1578,7 +1578,8 @@
"0.1": {},
"0.2": {
"noise-management-post-selection": "/"
- }
+ },
+ "0.3": {}
},
"qiskit-addon-paulice": {},
"qiskit-addon-pna": {}