
    i                         S r SSKJrJr  SSKJrJr  SSKJrJ	r	  SSK
Jr  SSKJr  SSKJrJrJr  \ " S	 S
\5      5       rg)zNoiseLearner options.    )ListUnion)ValidationInfofield_validator   )Unset	UnsetType)TwirlingStrategyType)	OptionsV2)primitive_dataclassmake_constraint_validatorskip_unset_validationc            
       &   \ rS rSr% Sr\r\\\	S4   \
S'    \r\\\	4   \
S'    \r\\\	4   \
S'    \r\\\\	   4   \
S'    \r\\\4   \
S'    \r\\\4   \
S	'    \" SS
S9r\" SSSS9r\" SSS9\\S\\	   S\S\\	   4S j5       5       5       rSrg)NoiseLearnerOptions   u8  
Options for :class:`.NoiseLearner`.

.. note::

    The total number of unique circuits implemented to learn the noise of a single layer
    depends solely on :attr:`~layer_pair_depths` and :attr:`~num_randomizations`. For example,
    if ``layer_pair_depths`` contains six depths and ``num_randomizations`` is set to ``32``,
    the noise learning stage executes a total of ``6 * 9`` unique circuits per layer, each
    one with ``32`` randomizations (at :attr:`~shots_per_randomization` each).

    The number ``9`` above is the number of unique circuits that need to be implemented to
    learn the noise for all the two-qubit subsystem in the given layer by performing local
    measurements. Indeed, learning the noise for a single one of these subsystems requires
    measuring all the ``16`` two-qubit Paulis on that subsystem. Taking advantage of
    commutation relations to measure more than one of these Paulis (for example, ``XI``,
    ``IX``, and ``XX``) with a single circuit, it is possible to measure all these ``16``
    Paulis by implementing only ``9`` circuits. Parallelizing these measurement tasks in the
    optimal way allows then measuring the ``16`` Paulis for all of the layer's two-qubit
    subsystems with only ``9`` circuits. More details in Ref. [1].

References:
    1. E. van den Berg, Z. Minev, A. Kandala, K. Temme, *Probabilistic error
       cancellation with sparse Pauli–Lindblad models on noisy quantum processors*,
       Nature Physics volume 19, pages 1116–1121 (2023).
       `arXiv:2201.09866 [quant-ph] <https://arxiv.org/abs/2201.09866>`_
Nmax_layers_to_learnshots_per_randomizationnum_randomizationslayer_pair_depthstwirling_strategyexperimentalr   )ger   after)modevalueinforeturnc                     [        S U 5       5      (       a&  [        SU R                   SUR                   S35      eU$ )Nc              3   *   #    U  H	  oS :  v   M     g7f)r   N ).0is     j/home/james-whalen/.local/lib/python3.13/site-packages/qiskit_ibm_runtime/options/noise_learner_options.py	<genexpr>8NoiseLearnerOptions._nonnegative_list.<locals>.<genexpr>z   s     $e1ues   `.z` option value must all be >= 0)any
ValueError__name__
field_name)clsr   r   s      r#   _nonnegative_list%NoiseLearnerOptions._nonnegative_listv   s>     $e$$$qa/@@_`aa    r    )r*   
__module____qualname____firstlineno____doc__r   r   r   r	   int__annotations__r   r   r   r   r   r
   r   dictr   _gt0_ge0r   classmethodr   r   r-   __static_attributes__r    r/   r#   r   r      s   8 8=y#t34< 6;U9c>2: 16in-5 6;uYS	12: AFuY(<<=E" ,1L%	4(0
 %%:qAD$%>@TYZ[D(w7d3i ~ $s)    8r/   r   N)r3   typingr   r   pydanticr   r   utilsr   r	   twirling_optionsr
   optionsr   r   r   r   r   r    r/   r#   <module>r@      s=      4 # 2  X X b) b br/   