§
    ¹³ÙgNK  ã                  óŽ  — d Z ddlmZ ddlZddlZddlmZ ddlmZ ddl	m
Z
 ddlZddlmZmZmZ ddlmZ dd	lmZmZ dd
lmZmZ ddlmZ ddlmZmZ ddlmZ ddl m!Z!m"Z"m#Z# ddl$m%Z% ddl&m'Z'm(Z(m)Z)m*Z* ddl+m,Z, ddl-m.Z. ddl/m0Z0 e
 G d„ d¦  «        ¦   «         Z1e
 G d„ d¦  «        ¦   «         Z2 G d„ de%¦  «        Z3d d„Z4dS )!z<Estimator V2 implementation for an arbitrary Backend object.é    )ÚannotationsN)Údefaultdict)ÚIterable)Ú	dataclass)ÚClassicalRegisterÚQuantumCircuitÚQuantumRegister)ÚQiskitError)Ú	BackendV1Ú	BackendV2)ÚPauliÚ	PauliList)ÚCounts)ÚPassManagerÚPassManagerConfig)ÚOptimize1qGatesDecompositioné   )Ú_pauli_expval_with_varianceÚ_prepare_countsÚ_run_circuits)ÚBaseEstimatorV2)ÚDataBinÚEstimatorPubLikeÚPrimitiveResultÚ	PubResult)ÚBindingsArray)ÚEstimatorPub)ÚPrimitiveJobc                  óB   — e Zd ZU dZdZded<   	 dZded<   	 dZd	ed
<   dS )ÚOptionsz*Options for :class:`~.BackendEstimatorV2`.g      �?ÚfloatÚdefault_precisionTÚboolÚabelian_groupingNz
int | NoneÚseed_simulator)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r"   Ú__annotations__r$   r%   © ó    ú\/granary/edev/quantum/lib/python3.11/site-packages/qiskit/primitives/backend_estimator_v2.pyr    r    )   s_   € € € € € € à4Ð4à'ÐÐ'Ð'Ð'Ñ'ðð "ÐÐ!Ð!Ð!Ñ!ðð "&€NÐ%Ð%Ð%Ñ%ðð r,   r    c                  ó6   — e Zd ZU dZded<   	 ded<   	 ded<   dS )Ú_PreprocessedDatazKInternal data structure to store the results of the preprocessing of a pub.úlist[QuantumCircuit]Úcircuitsz
np.ndarrayÚparameter_indicesÚobservablesN)r&   r'   r(   r)   r*   r+   r,   r-   r/   r/   =   sB   € € € € € € àUÐUà"Ð"Ð"Ñ"ØTà!Ð!Ð!Ñ!ØTàÐÐÑØGÐGr,   r/   c                  óž   — e Zd ZdZddœd7d„Zed8d„¦   «         Zed9d„¦   «         Zddœd:d„Zd;d„Z	d<d„Z
d=d„Zd>d„Zd?d$„Zd@d,„ZdAd1„ZdBd6„ZdS )CÚBackendEstimatorV2a¨
  Evaluates expectation values for provided quantum circuit and observable combinations.

    The :class:`~.BackendEstimatorV2` class is a generic implementation of the
    :class:`~.BaseEstimatorV2` interface that is used to wrap a :class:`~.BackendV2`
    (or :class:`~.BackendV1`) object in the :class:`~.BaseEstimatorV2` API. It
    facilitates using backends that do not provide a native
    :class:`~.BaseEstimatorV2` implementation in places that work with
    :class:`~.BaseEstimatorV2`. However,
    if you're using a provider that has a native implementation of
    :class:`~.BaseEstimatorV2`, it is a better choice to leverage that native
    implementation as it will likely include additional optimizations and be
    a more efficient implementation. The generic nature of this class
    precludes doing any provider- or backend-specific optimizations.

    This class does not perform any measurement or gate mitigation, and, presently, is only
    compatible with Pauli-based observables. More formally, given an observable of the type
    :math:`O=\sum_{i=1}^Na_iP_i`, where :math:`a_i` is a complex number and :math:`P_i` is a
    Pauli operator, the estimator calculates the expectation :math:`\mathbb{E}(P_i)` of each
    :math:`P_i` and finally calculates the expectation value of :math:`O` as
    :math:`\mathbb{E}(O)=\sum_{i=1}^Na_i\mathbb{E}(P_i)`. The reported ``std`` is calculated
    as

    .. math::

        \frac{\sum_{i=1}^{n}|a_i|\sqrt{\textrm{Var}\big(P_i\big)}}{\sqrt{N}}\:,

    where :math:`\textrm{Var}(P_i)` is the variance of :math:`P_i`, :math:`N=O(\epsilon^{-2})` is
    the number of shots, and :math:`\epsilon` is the target precision [1].

    Each tuple of ``(circuit, observables, <optional> parameter values, <optional> precision)``,
    called an estimator primitive unified bloc (PUB), produces its own array-based result. The
    :meth:`~.BackendEstimatorV2.run` method can be given a sequence of pubs to run in one call.

    The options for :class:`~.BackendEstimatorV2` consist of the following items.

    * ``default_precision``: The default precision to use if none are specified in :meth:`~run`.
      Default: 0.015625 (1 / sqrt(4096)).

    * ``abelian_grouping``: Whether the observables should be grouped into sets of qubit-wise
      commuting observables.
      Default: True.

    * ``seed_simulator``: The seed to use in the simulator. If None, a random seed will be used.
      Default: None.

    **Reference:**

    [1] O. Crawford, B. van Straaten, D. Wang, T. Parks, E. Campbell, St. Brierley,
    Efficient quantum measurement of Pauli operators in the presence of finite sampling error.
    `Quantum 5, 385 <https://doi.org/10.22331/q-2021-01-20-385>`_
    N)ÚoptionsÚbackendúBackendV1 | BackendV2r6   údict | Nonec               ó”  — t          |t          ¦  «        s t          j        d|› d�t          d¬¦  «         || _        |rt          di |¤Žnt          ¦   «         | _        t          j	        |¦  «        j
        }t          |t          ¦  «        rt          ||j        ¬¦  «        }nt          |¬¦  «        }t          |g¦  «        | _        dS )	a„  
        .. deprecated:: 1.4
            The method ``BackendEstimatorV2.__init__`` will stop supporting inputs of type
            :class:`.BackendV1` in the `backend` parameter in a future release no
            earlier than 2.0. :class:`.BackendV1` is deprecated and implementations should
            move to :class:`.BackendV2`.

        Args:
            backend: The backend to run the primitive on.
            options: The options to control the default precision (``default_precision``),
                the operator grouping (``abelian_grouping``), and
                the random seed for the simulator (``seed_simulator``).
        z[The method `BackendEstimatorV2.__init__` will stop supporting inputs of type `BackendV1` ( z� ) in the `backend` parameter in a future release no earlier than 2.0. `BackendV1` is deprecated and implementations should move to `BackendV2`.é   )ÚcategoryÚ
stacklevel)ÚbasisÚtarget)r>   Nr+   )Ú
isinstancer   ÚwarningsÚwarnÚDeprecationWarningÚ_backendr    Ú_optionsr   Úfrom_backendÚbasis_gatesr   r?   r   Ú_passmanager)Úselfr7   r6   r>   Úopt1qs        r-   Ú__init__zBackendEstimatorV2.__init__€   sÝ   € õ( ˜'¥9Ñ-Ô-ð 	ÝŒMð.Ø&-ð.ð .ð .õ ,Øðñ ô ð ð  ˆŒØ.5ÐD�Ð*Ð* 'Ð*Ð*Ð*½7¹9¼9ˆŒå!Ô.¨wÑ7Ô7ÔCˆÝ�g�yÑ)Ô)ð 	>Ý0°uÀWÄ^ÐTÑTÔTˆEˆEå0°uÐ=Ñ=Ô=ˆEÝ'¨¨Ñ0Ô0ˆÔÐÐr,   Úreturnr    c                ó   — | j         S )zReturn the options)rE   ©rI   s    r-   r6   zBackendEstimatorV2.options§   ó   € ð Œ}Ðr,   c                ó   — | j         S )z7Returns the backend which this sampler object based on.)rD   rN   s    r-   r7   zBackendEstimatorV2.backend¬   rO   r,   )Ú	precisionÚpubsúIterable[EstimatorPubLike]rQ   úfloat | Noneú(PrimitiveJob[PrimitiveResult[PubResult]]c               ó¼   ‡— ‰€| j         j        Šˆfd„|D ¦   «         }|                      |¦  «         t          | j        |¦  «        }|                     ¦   «          |S )Nc                ó:   •— g | ]}t          j        |‰¦  «        ‘ŒS r+   )r   Úcoerce)Ú.0ÚpubrQ   s     €r-   ú
<listcomp>z*BackendEstimatorV2.run.<locals>.<listcomp>¶   s&   ø€ ÐLÐLÐLÀ�Ô+¨C°Ñ;Ô;ÐLÐLÐLr,   )rE   r"   Ú_validate_pubsr   Ú_runÚ_submit)rI   rR   rQ   Úcoerced_pubsÚjobs     `  r-   ÚrunzBackendEstimatorV2.run±   se   ø€ ð ÐØœÔ7ˆIØLÐLÐLÐLÀtÐLÑLÔLˆØ×Ò˜LÑ)Ô)Ð)Ý˜4œ9 lÑ3Ô3ˆØ�Š‰ŒˆØˆ
r,   úlist[EstimatorPub]c                ó~   — t          |¦  «        D ],\  }}|j        dk    rt          d|› d|j        › d�d¦  «        ‚Œ-d S )Ng        zThe z/-th pub has precision less than or equal to 0 (z). z&But precision should be larger than 0.)Ú	enumeraterQ   Ú
ValueError)rI   rR   ÚirZ   s       r-   r\   z!BackendEstimatorV2._validate_pubs¼   sd   € Ý ‘o”oð 	ð 	‰FˆAˆsØŒ} Ò#Ð#Ý Ø_˜1Ð_Ð_ÈSÌ]Ð_Ð_Ð_Ø<ñô ð ð $ð	ð 	r,   úPrimitiveResult[PubResult]c                óÞ  ‡— t          t          ¦  «        }t          ‰¦  «        D ]L\  }}t          t	          j        d|j        dz  z  ¦  «        ¦  «        }||                              |¦  «         ŒMd gt          ‰¦  «        z  }| 	                    ¦   «         D ]B\  }}|  
                    ˆfd„|D ¦   «         |¦  «        }t          ||¦  «        D ]
\  }}	|	||<   ŒŒCt          |ddi¬¦  «        S )Ng      ð?r;   c                ó    •— g | ]
}‰|         ‘ŒS r+   r+   )rY   rf   rR   s     €r-   r[   z+BackendEstimatorV2._run.<locals>.<listcomp>Î   s   ø€ Ð)?Ð)?Ð)?°a¨$¨q¬'Ð)?Ð)?Ð)?r,   Úversion©Úmetadata)r   Úlistrd   ÚintÚmathÚceilrQ   ÚappendÚlenÚitemsÚ	_run_pubsÚzipr   )
rI   rR   Úpub_dictrf   rZ   ÚshotsÚresultsÚlstÚpub_resultsÚ
pub_results
    `        r-   r]   zBackendEstimatorV2._runÄ   s  ø€ Ý�tÑ$Ô$ˆå ‘o”oð 	&ð 	&‰FˆAˆsÝ�œ	 #¨¬°qÑ(8Ñ"8Ñ9Ô9Ñ:Ô:ˆEØ�UŒO×"Ò" 1Ñ%Ô%Ð%Ð%à�&�3˜t™9œ9Ñ$ˆØ"Ÿ.š.Ñ*Ô*ð 	(ð 	(‰JˆE�3àŸ.š.Ð)?Ð)?Ð)?Ð)?¸3Ð)?Ñ)?Ô)?ÀÑGÔGˆKå!$ S¨+Ñ!6Ô!6ð (ð (‘��:Ø'�˜‘
�
ð(å˜w°)¸Q°Ð@Ñ@Ô@Ð@r,   rw   rn   úlist[PubResult]c           	     ó  — g }g }|D ]F}|                       |¦  «        }|                     |¦  «         |                     |j        ¦  «         ŒGt	          || j        || j        j        ¬¦  «        \  }}t          |¦  «        }	g }
d}t          ||¦  «        D ]o\  }}|t          |j        ¦  «        z   }|                      |	||…         |||…         ¦  «        }|}|
                     |                      ||||¦  «        ¦  «         Œp|
S )zFCompute results for pubs that all require the same value of ``shots``.)rw   r%   r   )Ú_preprocess_pubrq   Úextendr1   r   rD   rE   r%   r   ru   rr   Ú_calc_expval_mapÚ_postprocess_pub)rI   rR   rw   Úpreprocessed_dataÚflat_circuitsrZ   ÚdataÚ
run_resultrl   Úcountsrx   ÚstartÚendÚ
expval_maps                 r-   rt   zBackendEstimatorV2._run_pubsÔ   s-  € àÐØˆØð 	0ð 	0ˆCØ×'Ò'¨Ñ,Ô,ˆDØ×$Ò$ TÑ*Ô*Ð*Ø× Ò  ¤Ñ/Ô/Ð/Ð/å,Ø˜4œ=°ÀdÄmÔFbð 
ñ  
ô  
Ñˆ
�Hõ ! Ñ,Ô,ˆàˆØˆÝ˜TÐ#4Ñ5Ô5ð 	Pð 	P‰IˆC�Ø�#˜dœmÑ,Ô,Ñ,ˆCØ×.Ò.¨v°e¸C°iÔ/@À(È5ÐQTÈ9ÔBUÑVÔVˆJØˆEØ�NŠN˜4×0Ò0°°jÀ$ÈÑNÔNÑOÔOÐOÐOØˆr,   rZ   r   r/   c                óà  — |j         }|j        }|j        }|j        }t	          j        t	          j        |¦  «        t          ¬¦  «                             |¦  «        }t	          j	        ||¦  «        \  }}t          t          ¦  «        }	t	          j        |j        Ž D ]+}
||
         }|	|                              ||
         ¦  «         Œ,|                      |||	¦  «        }t          |||¦  «        S )ae  Converts a pub into a list of bound circuits necessary to estimate all its observables.

        The circuits contain metadata explaining which bindings array index they are with respect to,
        and which measurement basis they are measuring.

        Args:
            pub: The pub to preprocess.

        Returns:
            The values ``(circuits, bc_param_ind, bc_obs)`` where ``circuits`` are the circuits to
            execute on the backend, ``bc_param_ind`` are indices of the pub's bindings array and
            ``bc_obs`` is the observables array, both broadcast to the shape of the pub.
        ©Údtype)Úcircuitr3   Úparameter_valuesÚshapeÚnpÚfromiterÚndindexÚobjectÚreshapeÚbroadcast_arraysr   ÚsetÚupdateÚ_bind_and_add_measurementsr/   )rI   rZ   r�   r3   rŽ   Úparam_shapeÚparam_indicesÚbc_param_indÚbc_obsÚparam_obs_mapÚindexÚparam_indexÚbound_circuitss                r-   r~   z"BackendEstimatorV2._preprocess_pubë   sä   € ð ”+ˆØ”oˆØÔ/Ðð 'Ô,ˆÝœ¥B¤J¨{Ñ$;Ô$;Å6ÐJÑJÔJ×RÒRÐS^Ñ_Ô_ˆÝ!Ô2°=À+ÑNÔNÑˆ�få#¥CÑ(Ô(ˆÝ”Z Ô!3Ð4ð 	=ð 	=ˆEØ& uÔ-ˆKØ˜+Ô&×-Ò-¨f°U¬mÑ<Ô<Ð<Ð<à×8Ò8¸ÐBRÐTaÑbÔbˆÝ  °¸vÑFÔFÐFr,   r‰   Údictr„   r   c                ó:  — |j         }|j        }t          j        |t          ¬¦  «        }t          j        |t          ¬¦  «        }t          j        |j        Ž D ]r}	||	         }
||	                              ¦   «         D ]M\  }}||
|f         \  }}||	xx         ||z  z  cc<   ||	xx         t          j        |¦  «        |dz  z  z  cc<   ŒNŒs|t          j	        |¦  «        z  }t          |||j        ¬¦  «        }t          ||j        ||j        j        dœ¬¦  «        S )ax  Computes expectation values (evs) and standard errors (stds).

        The values are stored in arrays broadcast to the shape of the pub.

        Args:
            pub: The pub to postprocess.
            expval_map: The map
            data: The result data of the preprocessing.
            shots: The number of shots.

        Returns:
            The pub result.
        r‹   g      à?)ÚevsÚstdsr�   )Útarget_precisionrw   Úcircuit_metadatark   )r2   r3   r�   Ú
zeros_liker!   r’   r�   rs   ÚabsÚsqrtr   r   rQ   r�   rl   )rI   rZ   r‰   r„   rw   r›   rœ   r£   Ú	variancesrž   rŸ   ÚpauliÚcoeffÚexpvalÚvariancer¤   Údata_bins                    r-   r�   z#BackendEstimatorV2._postprocess_pub
  sH  € ð  Ô-ˆØÔ!ˆÝŒm˜LµÐ6Ñ6Ô6ˆÝ”M ,µeÐ<Ñ<Ô<ˆ	Ý”Z Ô!3Ð4ð 	Bð 	BˆEØ& uÔ-ˆKØ & u¤× 3Ò 3Ñ 5Ô 5ð Bð B‘��uØ#-¨k¸5Ð.@Ô#AÑ �˜Ø�E�
�
”
˜f u™nÑ,�
�
‘
Ø˜%Ð Ð Ô ¥B¤F¨5¡M¤M°H¸c±MÑ$AÑAÐ Ð Ñ Ð ðBð �2œ7 5™>œ>Ñ)ˆÝ˜s¨°S´YÐ?Ñ?Ô?ˆÝØà$'¤MØØ$'¤KÔ$8ðð ð
ñ 
ô 
ð 	
r,   r�   r   rŽ   r   r�   údict[tuple[int, ...], set[str]]r0   c                óú   — g }|                      ¦   «         D ]c\  }}|                     ||¦  «        }t          t          |¦  «        ¦  «        }|                      |||¦  «        }	|                     |	¦  «         Œd|S )aÚ  Bind the given circuit against each parameter value set, and add necessary measurements
        to each.

        Args:
            circuit: The (possibly parametric) circuit of interest.
            parameter_values: An array of parameter value sets that can be applied to the circuit.
            param_obs_map: A mapping from locations in ``parameter_values`` to a sets of
                Pauli terms whose expectation values are required in those locations.

        Returns:
            A flat list of circuits sufficient to measure all Pauli terms in the ``param_obs_map``
            values at the corresponding ``parameter_values`` location, where requisite
            book-keeping is stored as circuit metadata.
        )rs   Úbindr   ÚsortedÚ_create_measurement_circuitsr   )
rI   r�   rŽ   r�   r1   rŸ   Úpauli_stringsÚbound_circuitÚmeas_paulisÚnew_circuitss
             r-   r˜   z-BackendEstimatorV2._bind_and_add_measurements/  s‹   € ð( ˆØ*7×*=Ò*=Ñ*?Ô*?ð 	*ð 	*Ñ&ˆK˜Ø,×1Ò1°'¸;ÑGÔGˆMå#¥F¨=Ñ$9Ô$9Ñ:Ô:ˆKØ×<Ò<Ø˜{¨Kñô ˆLð �OŠO˜LÑ)Ô)Ð)Ð)Øˆr,   r†   úlist[Counts]rl   ú6dict[tuple[tuple[int, ...], str], tuple[float, float]]c                óò   — i }t          ||¦  «        D ]c\  }}|d         }|d         }|d         }t          ||¦  «        \  }	}
t          ||	|
¦  «        D ]!\  }}}||f|||                     ¦   «         f<   Œ"Œd|S )aÎ  Computes the map of expectation values.

        Args:
            counts: The counts data.
            metadata: The metadata.

        Returns:
            The map of expectation values takes a pair of an index of the bindings array and
            a pauli string as a key and returns the expectation value of the pauli string
            with the the pub's circuit bound against the parameter value set in the index of
            the bindings array.
        Úorig_paulisr·   rŸ   )ru   r   Úto_label)rI   r†   rl   r‰   ÚcountÚmetar¼   r·   rŸ   Úexpvalsrª   r«   r­   r®   s                 r-   r€   z#BackendEstimatorV2._calc_expval_mapN  s­   € ð" NPˆ
Ý˜v xÑ0Ô0ð 	Oð 	O‰KˆE�4Ø˜}Ô-ˆKØ˜}Ô-ˆKØ˜}Ô-ˆKÝ!<¸UÀKÑ!PÔ!PÑˆG�YÝ+.¨{¸GÀYÑ+OÔ+Oð Oð OÑ'��v˜xØ=CÀXÐ<N�
˜;¨¯ªÑ(8Ô(8Ð8Ñ9Ð9ðOàÐr,   Ú
observabler   rŸ   útuple[int, ...]c                óf  — g }| j         j        rà|                     d¬¦  «        D ]È}t          t          j                             |j        ¦  «        t          j                             |j        ¦  «        f¦  «        }t          |j
        |¦  «        \  }}t          j        |j        dd…|f         |j        dd…|f         |j        ¦  «        }	||	|dœ|_        |                     |¦  «         ŒÉn…|D ]‚}t          |j
        |¦  «        \  }}t          |¦  «        }t          j        |j        dd…|f         |j        dd…|f         |j        ¦  «        }	||	|dœ|_        |                     |¦  «         Œƒ| j                             |¦  «        }g }
|D ]ž}|                     ¦   «         }|j        d         }|j        D ]%}|j        |j        k    rt+          d|› d�¦  «        ‚Œ&|                     |¦  «         |                     ||d¬¦  «         |j        |_        |
                     |¦  «         ŒŸ|
S )	ap  Generate a list of circuits sufficient to estimate each of the given Paulis.

        Paulis are divided into qubitwise-commuting subsets to reduce the total circuit count.
        Metadata is attached to circuits in order to remember what each one measures, and
        where it belongs in the output.

        Args:
            circuit: The circuit of interest.
            observable: Which Pauli terms we would like to observe.
            param_index: Where to put the data we estimate (only passed to metadata).

        Returns:
            A list of circuits sufficient to estimate each of the given Paulis.
        T)Ú
qubit_wiseN)r¼   r·   rŸ   r   zNClassical register for measurements conflict with those of the input circuit: z9. Recommended to avoid register names starting with '__'.)ÚclbitsÚinplace)rE   r$   Úgroup_commutingr   r�   Ú
logical_orÚreduceÚzÚxÚ_measurement_circuitÚ
num_qubitsr   Úfrom_symplecticÚphaserl   rq   rH   ra   ÚcopyÚcregsÚnamer
   Úadd_registerÚcompose)rI   r�   rÁ   rŸ   Úmeas_circuitsÚobsr>   Úmeas_circuitÚindicesÚpaulisÚpreprocessed_circuitsÚcircuit_copyrÅ   Úcregs                 r-   r´   z/BackendEstimatorV2._create_measurement_circuitsi  s”  € ð" /1ˆØŒ=Ô)ð 	3Ø!×1Ò1¸TÐ1ÑBÔBð 3ð 3�Ý�rœ}×3Ò3°C´EÑ:Ô:½B¼M×<PÒ<PÐQTÔQVÑ<WÔ<WÐXÑYÔY�Ý(<¸WÔ=OÐQVÑ(WÔ(WÑ%�˜gÝ"Ô2Ø”E˜!˜!˜!˜W˜*Ô%Ø”E˜!˜!˜!˜W˜*Ô%Ø”Iñô �ð $'Ø#)Ø#.ð)ð )�Ô%ð
 ×$Ò$ \Ñ2Ô2Ð2Ð2ð3ð $ð 3ð 3�Ý(<¸WÔ=OÐQVÑ(WÔ(WÑ%�˜gÝ Ñ&Ô&�Ý"Ô2Ø”E˜!˜!˜!˜W˜*Ô%Ø”E˜!˜!˜!˜W˜*Ô%Ø”Iñô �ð $'Ø#)Ø#.ð)ð )�Ô%ð
 ×$Ò$ \Ñ2Ô2Ð2Ð2ð Ô)×-Ò-¨mÑ<Ô<ˆð !#ÐØ)ð 	7ð 	7ˆLØ"Ÿ<š<™>œ>ˆLð "Ô'¨Ô*ˆFØ$Ô*ð ð �Ø”; $¤)Ò+Ð+Ý%ðRØ$*ðRð Rð Rñô ð ð ,ð ×%Ò% fÑ-Ô-Ð-Ø× Ò  °fÀdÐ ÑKÔKÐKØ$0Ô$9ˆLÔ!Ø!×(Ò(¨Ñ6Ô6Ð6Ð6Ø$Ð$r,   )r7   r8   r6   r9   )rL   r    )rL   r8   )rR   rS   rQ   rT   rL   rU   )rR   rb   )rR   rb   rL   rg   )rR   rb   rw   rn   rL   r|   )rZ   r   rL   r/   )
rZ   r   r‰   r¡   r„   r/   rw   rn   rL   r   )r�   r   rŽ   r   r�   r°   rL   r0   )r†   r¹   rl   r¡   rL   rº   )r�   r   rÁ   r   rŸ   rÂ   rL   r0   )r&   r'   r(   r)   rK   Úpropertyr6   r7   ra   r\   r]   rt   r~   r�   r˜   r€   r´   r+   r,   r-   r5   r5   K   sW  € € € € € ð2ð 2ðp  $ð	%1ð %1ð %1ð %1ð %1ð %1ðN ðð ð ñ „Xðð ðð ð ñ „Xðð
 NRð	ð 	ð 	ð 	ð 	ð 	ðð ð ð ðAð Að Að Að ð ð ð ð.Gð Gð Gð Gð>#
ð #
ð #
ð #
ðJð ð ð ð>ð ð ð ð6F%ð F%ð F%ð F%ð F%ð F%r,   r5   rÍ   rn   r«   r   c                óæ  — t          j        |j        ¦  «        |j        |j        z           }t          j        |¦  «        sdg}t          t          | d¦  «        t          t          |¦  «        d|› �¦  «        ¦  «        }t          |¦  «        D ]_\  }}|j        |         r7|j        |         r|                     |¦  «         |                     |¦  «         |                     ||¦  «         Œ`||fS )Nr   ÚqÚ__c_)r�   ÚarangerÍ   rÊ   rË   Úanyr   r	   r   rr   rd   ÚsdgÚhÚmeasure)rÍ   r«   Úqubit_indicesr×   Úclbitrf   s         r-   rÌ   rÌ   ²  sû   € õ
 ”I˜eÔ.Ñ/Ô/°´¸%¼'Ñ0AÔB€MÝŒ6�-Ñ Ô ð Ø˜ˆÝ!Ý˜
 CÑ(Ô(Õ*;½CÀÑ<NÔ<NÐP^ÐW\ÐP^ÐP^Ñ*_Ô*_ñô €Lõ ˜mÑ,Ô,ð 'ð '‰ˆˆqØŒ7�1Œ:ð 	ØŒw�qŒzð $Ø× Ò  Ñ#Ô#Ð#Ø�NŠN˜1ÑÔÐØ×Ò˜Q Ñ&Ô&Ð&Ð&Ø˜Ð&Ð&r,   )rÍ   rn   r«   r   )5r)   Ú
__future__r   ro   rA   Úcollectionsr   Úcollections.abcr   Údataclassesr   Únumpyr�   Úqiskit.circuitr   r   r	   Úqiskit.exceptionsr
   Úqiskit.providersr   r   Úqiskit.quantum_infor   r   Úqiskit.resultr   Úqiskit.transpilerr   r   Úqiskit.transpiler.passesr   Úbackend_estimatorr   r   r   Úbaser   Ú
containersr   r   r   r   Úcontainers.bindings_arrayr   Úcontainers.estimator_pubr   Úprimitive_jobr   r    r/   r5   rÌ   r+   r,   r-   ú<module>rú      s[  ðð CÐ Bà "Ð "Ð "Ð "Ð "Ð "à €€€Ø €€€Ø #Ð #Ð #Ð #Ð #Ð #Ø $Ð $Ð $Ð $Ð $Ð $Ø !Ð !Ð !Ð !Ð !Ð !à Ð Ð Ð à MÐ MÐ MÐ MÐ MÐ MÐ MÐ MÐ MÐ MØ )Ð )Ð )Ð )Ð )Ð )Ø 1Ð 1Ð 1Ð 1Ð 1Ð 1Ð 1Ð 1Ø 0Ð 0Ð 0Ð 0Ð 0Ð 0Ð 0Ð 0Ø  Ð  Ð  Ð  Ð  Ð  Ø <Ð <Ð <Ð <Ð <Ð <Ð <Ð <Ø AÐ AÐ AÐ AÐ AÐ Aà ZÐ ZÐ ZÐ ZÐ ZÐ ZÐ ZÐ ZÐ ZÐ ZØ !Ð !Ð !Ð !Ð !Ð !Ø MÐ MÐ MÐ MÐ MÐ MÐ MÐ MÐ MÐ MÐ MÐ MØ 4Ð 4Ð 4Ð 4Ð 4Ð 4Ø 2Ð 2Ð 2Ð 2Ð 2Ð 2Ø 'Ð 'Ð 'Ð 'Ð 'Ð 'ð ðð ð ð ð ñ ô ñ „ðð& ð
Hð 
Hð 
Hð 
Hð 
Hñ 
Hô 
Hñ „ð
Hðd%ð d%ð d%ð d%ð d%˜ñ d%ô d%ð d%ðN'ð 'ð 'ð 'ð 'ð 'r,   