§
    º³ÙgnE  ã                  óˆ   — d Z ddlmZ ddlZddlmZ ddlZddlm	Z	 ddl
mZ ddlmZ ddlmZ dd	lmZ  G d
„ d¦  «        ZdS )z
Abstract QuantumState class.
é    )ÚannotationsN)Úabstractmethod)ÚBaseOperator)ÚQuantumChannel)ÚOpShape)ÚOperator)ÚCountsc                  ó8  — e Zd ZdZdAdBd„ZdZd„ Zed„ ¦   «         Zed	„ ¦   «         Z	ed
„ ¦   «         Z
dAd„Zd„ ZdAd„ZedCd„¦   «         Zed„ ¦   «         Zed„ ¦   «         Zed„ ¦   «         Zed„ ¦   «         ZedDd„¦   «         ZedDd„¦   «         Zd„ Zd„ ZedAdEd„¦   «         ZedAdFd!„¦   «         ZedCdGd%„¦   «         ZdCdHd'„ZdAdId*„ZdAdJd,„ZdAdKd.„Ze	 dLdMd4„¦   «         Z edNd5„¦   «         Z!edNd6„¦   «         Z"e	 dAdOd8„¦   «         Z#d9„ Z$d:„ Z%d;„ Z&d<„ Z'd=„ Z(d>„ Z)d?„ Z*d@„ Z+dS )PÚQuantumStatez!Abstract quantum state base classNÚop_shapeúOpShape | Nonec                ó"   — || _         d| _        dS )zþInitialize a QuantumState object.

        Args:
            op_shape (OpShape): Optional, an OpShape object for state dimensions.

        .. note::

            If `op_shape`` is specified it will take precedence over other
            kwargs.
        N)Ú	_op_shapeÚ_rng_generator)Úselfr   s     ú^/granary/edev/quantum/lib/python3.11/site-packages/qiskit/quantum_info/states/quantum_state.pyÚ__init__zQuantumState.__init__!   s   € ð "ˆŒà"ˆÔÐÐó    é   c                ó€   — t          || j        ¦  «        o)|                      ¦   «         |                     ¦   «         k    S ©N)Ú
isinstanceÚ	__class__Údims©r   Úothers     r   Ú__eq__zQuantumState.__eq__3   s.   € Ý˜% ¤Ñ0Ô0ÐP°T·Y²Y±[´[ÀEÇJÂJÁLÄLÒ5PÐPr   c                ó&   — | j         j        d         S )zReturn total state dimension.r   )r   Úshape©r   s    r   ÚdimzQuantumState.dim6   s   € ð Œ~Ô# AÔ&Ð&r   c                ó   — | j         j        S )zAReturn the number of qubits if a N-qubit state or None otherwise.)r   Ú
num_qubitsr    s    r   r#   zQuantumState.num_qubits;   s   € ð Œ~Ô(Ð(r   c                óZ   — | j         €t          j                             ¦   «         S | j         S r   )r   ÚnpÚrandomÚdefault_rngr    s    r   Ú_rngzQuantumState._rng@   s(   € àÔÐ&Ý”9×(Ò(Ñ*Ô*Ð*ØÔ"Ð"r   c                ó6   — | j                              |¦  «        S )z9Return tuple of input dimension for specified subsystems.)r   Údims_l)r   Úqargss     r   r   zQuantumState.dimsF   s   € àŒ~×$Ò$ UÑ+Ô+Ð+r   c                ó*   — t          j        | ¦  «        S )z Make a copy of current operator.)ÚcopyÚdeepcopyr    s    r   r-   zQuantumState.copyJ   s   € åŒ}˜TÑ"Ô"Ð"r   c                ó´   — |€	d| _         dS t          |t          j        j        ¦  «        r	|| _         dS t          j                             |¦  «        | _         dS )z'Set the seed for the quantum state RNG.N)r   r   r%   r&   Ú	Generatorr'   )r   Úvalues     r   ÚseedzQuantumState.seedN   sX   € àˆ=Ø"&ˆDÔÐÐÝ˜�rœyÔ2Ñ3Ô3ð 	?Ø"'ˆDÔÐÐå"$¤)×"7Ò"7¸Ñ">Ô">ˆDÔÐÐr   c                ó   — dS )z%Return True if a valid quantum state.N© )r   ÚatolÚrtols      r   Úis_validzQuantumState.is_validW   ó	   € ð 	ˆr   c                ó   — dS )z&Convert state to matrix operator classNr4   r    s    r   Úto_operatorzQuantumState.to_operator\   r8   r   c                ó   — dS )z%Return the conjugate of the operator.Nr4   r    s    r   Ú	conjugatezQuantumState.conjugatea   r8   r   c                ó   — dS )z:Return the trace of the quantum state as a density matrix.Nr4   r    s    r   ÚtracezQuantumState.tracef   r8   r   c                ó   — dS )z'Return the purity of the quantum state.Nr4   r    s    r   ÚpurityzQuantumState.purityk   r8   r   r   Úreturnc                ó   — dS )u$  Return the tensor product state self âŠ— other.

        Args:
            other (QuantumState): a quantum state object.

        Returns:
            QuantumState: the tensor product operator self âŠ— other.

        Raises:
            QiskitError: if other is not a quantum state.
        Nr4   r   s     r   ÚtensorzQuantumState.tensorp   ó	   € ð 	ˆr   c                ó   — dS )u!  Return the tensor product state other âŠ— self.

        Args:
            other (QuantumState): a quantum state object.

        Returns:
            QuantumState: the tensor product state other âŠ— self.

        Raises:
            QiskitError: if other is not a quantum state.
        Nr4   r   s     r   ÚexpandzQuantumState.expand   rD   r   c                ó@   — t          t          | ¦  «        › d�¦  «        ‚)a  Return the linear combination self + other.

        Args:
            other (QuantumState): a state object.

        Returns:
            QuantumState: the linear combination self + other.

        Raises:
            NotImplementedError: if subclass does not support addition.
        z does not support addition©ÚNotImplementedErrorÚtyper   s     r   Ú_addzQuantumState._addŽ   s!   € õ "¥T¨$¡Z¤ZÐ"KÐ"KÐ"KÑLÔLÐLr   c                ó@   — t          t          | ¦  «        › d�¦  «        ‚)aQ  Return the scalar multipled state other * self.

        Args:
            other (complex): a complex number.

        Returns:
            QuantumState: the scalar multipled state other * self.

        Raises:
            NotImplementedError: if subclass does not support scala
                                 multiplication.
        z' does not support scalar multiplicationrH   r   s     r   Ú	_multiplyzQuantumState._multiplyœ   s!   € õ "¥T¨$¡Z¤ZÐ"XÐ"XÐ"XÑYÔYÐYr   úOperator | QuantumChannelr+   úlist | Nonec                ó   — dS )aç  Evolve a quantum state by the operator.

        Args:
            other (Operator or QuantumChannel): The operator to evolve by.
            qargs (list): a list of QuantumState subsystem positions to apply
                           the operator on.

        Returns:
            QuantumState: the output quantum state.

        Raises:
            QiskitError: if the operator dimension does not match the
                         specified QuantumState subsystem dimensions.
        Nr4   )r   r   r+   s      r   ÚevolvezQuantumState.evolve«   ó	   € ð  	ˆr   Úoperr   úNone | listÚcomplexc                ó   — dS )a  Compute the expectation value of an operator.

        Args:
            oper (BaseOperator): an operator to evaluate expval.
            qargs (None or list): subsystems to apply the operator on.

        Returns:
            complex: the expectation value.
        Nr4   )r   rS   r+   s      r   Úexpectation_valuezQuantumState.expectation_value½   s	   € ð 	ˆr   Údecimalsú
None | intú
np.ndarrayc                ó   — dS )a)  Return the subsystem measurement probability vector.

        Measurement probabilities are with respect to measurement in the
        computation (diagonal) basis.

        Args:
            qargs (None or list): subsystems to return probabilities for,
                if None return for all subsystems (Default: None).
            decimals (None or int): the number of decimal places to round
                values. If None no rounding is done (Default: None).

        Returns:
            np.array: The Numpy vector array of probabilities.
        Nr4   ©r   r+   rX   s      r   ÚprobabilitieszQuantumState.probabilitiesÊ   rR   r   Údictc                ó‚   — |                       |                      ||¬¦  «        |                      |¦  «        d¬¦  «        S )aa  Return the subsystem measurement probability dictionary.

        Measurement probabilities are with respect to measurement in the
        computation (diagonal) basis.

        This dictionary representation uses a Ket-like notation where the
        dictionary keys are qudit strings for the subsystem basis vectors.
        If any subsystem has a dimension greater than 10 comma delimiters are
        inserted between integers so that subsystems can be distinguished.

        Args:
            qargs (None or list): subsystems to return probabilities for,
                if None return for all subsystems (Default: None).
            decimals (None or int): the number of decimal places to round
                values. If None no rounding is done (Default: None).

        Returns:
            dict: The measurement probabilities in dict (ket) form.
        )r+   rX   T©Ústring_labels)Ú_vector_to_dictr]   r   r\   s      r   Úprobabilities_dictzQuantumState.probabilities_dictÜ   sI   € ð( ×#Ò#Ø×Ò U°XÐÑ>Ô>Ø�IŠI�eÑÔØð $ñ 
ô 
ð 	
r   ÚshotsÚintc                óú   — |                       |¦  «        }|                      t          j        t	          |¦  «        ¦  «        |                      |¦  «        d¬¦  «        }| j                             |||¬¦  «        S )af  Sample a list of qubit measurement outcomes in the computational basis.

        Args:
            shots (int): number of samples to generate.
            qargs (None or list): subsystems to sample measurements for,
                                if None sample measurement of all
                                subsystems (Default: None).

        Returns:
            np.array: list of sampled counts if the order sampled.

        Additional Information:

            This function *samples* measurement outcomes using the measure
            :meth:`probabilities` for the current state and `qargs`. It does
            not actually implement the measurement so the current state is
            not modified.

            The seed for random number generator used for sampling can be
            set to a fixed value by using the stats :meth:`seed` method.
        Tr`   ©ÚpÚsize)r]   Ú_index_to_ket_arrayr%   ÚarangeÚlenr   r(   Úchoice)r   rd   r+   ÚprobsÚlabelss        r   Úsample_memoryzQuantumState.sample_memoryö   su   € ð. ×"Ò" 5Ñ)Ô)ˆð ×)Ò)ÝŒI•c˜%‘j”jÑ!Ô! 4§9¢9¨UÑ#3Ô#3À4ð *ñ 
ô 
ˆð Œy×Ò ¨%°eÐÑ<Ô<Ð<r   r	   c                óœ   — |                       ||¬¦  «        }t          j        |d¬¦  «        \  }}t          t	          ||¦  «        ¦  «        S )aR  Sample a dict of qubit measurement outcomes in the computational basis.

        Args:
            shots (int): number of samples to generate.
            qargs (None or list): subsystems to sample measurements for,
                                if None sample measurement of all
                                subsystems (Default: None).

        Returns:
            Counts: sampled counts dictionary.

        Additional Information:

            This function *samples* measurement outcomes using the measure
            :meth:`probabilities` for the current state and `qargs`. It does
            not actually implement the measurement so the current state is
            not modified.

            The seed for random number generator used for sampling can be
            set to a fixed value by using the stats :meth:`seed` method.
        ©r+   T)Úreturn_counts)rp   r%   Úuniquer	   Úzip)r   rd   r+   ÚsamplesÚindsÚcountss         r   Úsample_countszQuantumState.sample_counts  sN   € ð. ×$Ò$ U°%Ð$Ñ8Ô8ˆõ ”y ¸Ð=Ñ=Ô=‰ˆˆfÝ•c˜$ Ñ'Ô'Ñ(Ô(Ð(r   Útuplec                ó  — |                       |¦  «        }|                      |¦  «        }| j                             t	          |¦  «        |d¬¦  «        }|                      ||                       |¦  «        d¬¦  «        d         }t          j        t	          |¦  «        t          ¬¦  «        }dt          j	        ||         ¦  «        z  ||<   |  
                    t          t          j        |¦  «        ||¬¦  «        |¬¦  «        }||fS )	aò  Measure subsystems and return outcome and post-measure state.

        Note that this function uses the QuantumStates internal random
        number generator for sampling the measurement outcome. The RNG
        seed can be set using the :meth:`seed` method.

        Args:
            qargs (list or None): subsystems to sample measurements for,
                                  if None sample measurement of all
                                  subsystems (Default: None).

        Returns:
            tuple: the pair ``(outcome, state)`` where ``outcome`` is the
                   measurement outcome string label, and ``state`` is the
                   collapsed post-measurement state for the corresponding
                   outcome.
        é   rg   Tr`   r   ©Údtype)Ú
input_dimsÚoutput_dimsrr   )r   r]   r(   rm   rl   rj   r%   ÚzerosrU   ÚsqrtrQ   r   Údiag)r   r+   r   rn   ÚsampleÚoutcomeÚprojÚrets           r   ÚmeasurezQuantumState.measure2  sê   € ð& �yŠy˜ÑÔˆØ×"Ò" 5Ñ)Ô)ˆØ”×!Ò!¥# e¡*¤*°¸AÐ!Ñ>Ô>ˆð ×*Ò*¨6°4·9²9¸UÑ3CÔ3CÐSWÐ*ÑXÔXÐYZÔ[ˆõ Œx�˜E™
œ
­'Ð2Ñ2Ô2ˆØ�2œ7 5¨¤=Ñ1Ô1Ñ1ˆˆV‰ð
 �kŠk�(¥2¤7¨4¡=¤=¸TÈtÐTÑTÔTÐ\aˆkÑbÔbˆà˜ˆ|Ðr   Frw   r   ra   Úboolc                óð  ‡ — dg}|dd…         D ] }|                      |d         |z  ¦  «         Œ!t          j        ˆ fd„t          ||¦  «        D ¦   «         ¦  «        }|r‘t	          |¦  «        }t          j        |t          j        ¬¦  «        }|d         }|dd…         D ]H}	|dk    r t          j                             d|¦  «        }t          j                             |	|¦  «        }ŒI|j	        S |j	        S )	aÐ  Convert an index array into a ket array.

        Args:
            inds (np.array): an integer index array.
            dims (tuple): a list of subsystem dimensions.
            string_labels (bool): return ket as string if True, otherwise
                                  return as index array (Default: False).

        Returns:
            np.array: an array of ket strings if string_label=True, otherwise
                      an array of ket lists.
        r|   Néÿÿÿÿc                ó&   •— g | ]\  }}‰|z  |z  ‘ŒS r4   r4   )Ú.0r!   Úshiftrw   s      €r   ú
<listcomp>z4QuantumState._index_to_ket_array.<locals>.<listcomp>j  s&   ø€ ÐSÐSÐS±:°3¸˜$ %™-¨3Ñ.ÐSÐSÐSr   r}   r   é
   ú,)
Úappendr%   Úarrayru   ÚmaxÚasarrayÚstr_ÚcharÚaddÚT)
rw   r   ra   Úshiftsr!   ÚketsÚmax_dimÚ	char_ketsÚstr_ketsÚrows
   `         r   rj   z QuantumState._index_to_ket_arrayW  sü   ø€ ð  �ˆØ˜˜˜”9ð 	,ð 	,ˆCØ�MŠM˜& œ* sÑ*Ñ+Ô+Ð+Ð+ÝŒxÐSÐSÐSÐSÅÀTÈ6ÑARÔARÐSÑSÔSÑTÔTˆàð 	Ý˜$‘i”iˆGÝœ
 4­r¬wÐ7Ñ7Ô7ˆIØ  ”|ˆHØ    ”}ð 6ð 6�Ø˜R’<�<Ý!œwŸ{š{¨3°Ñ9Ô9�HÝœ7Ÿ;š; s¨HÑ5Ô5��Ø”:ÐàŒvˆr   c                ó&  — |€| n|                       |¬¦  «        }|                     ¦   «         \  }t                               |||¬¦  «        }|r#t	          t          || |         ¦  «        ¦  «        S d„ t          |||         ¦  «        D ¦   «         S )a–  Convert a vector to a ket dictionary.

        This representation will not show zero values in the output dict.

        Args:
            vec (array): a Numpy vector array.
            dims (tuple): subsystem dimensions.
            decimals (None or int): number of decimal places to round to.
                                    (See Numpy.round), if None no rounding
                                    is done (Default: None).
            string_labels (bool): return ket as string if True, otherwise
                                  return as index array (Default: False).

        Returns:
            dict: the vector in dictionary `ket` form.
        N©rX   r`   c                ó4   — i | ]\  }}t          |¦  «        |“ŒS r4   ©rz   )r�   ÚketÚvals      r   ú
<dictcomp>z0QuantumState._vector_to_dict.<locals>.<dictcomp>•  s$   € ÐFÐFÐF¡H C¨•�c‘
”
˜CÐFÐFÐFr   )ÚroundÚnonzeror   rj   r^   ru   )Úvecr   rX   ra   Úvalsrw   r›   s          r   rb   zQuantumState._vector_to_dictx  s“   € ð& Ð&ˆsˆs¨C¯IªI¸x¨IÑ,HÔ,HˆØ—,’,‘.”.‰ˆõ ×/Ò/°°dÈ-Ð/ÑXÔXˆð ð 	.Ý�˜D # d¤)Ñ,Ô,Ñ-Ô-Ð-àFÐFµ°D¸$¸t¼*Ñ0EÔ0EÐFÑFÔFÐFr   c                óh  — |€| n|                       |¬¦  «        }|                     ¦   «         \  }}t                               |||¬¦  «        }t                               |||¬¦  «        }|r#d„ t	          |||||f         ¦  «        D ¦   «         S d„ t	          |||||f         ¦  «        D ¦   «         S )a–  Convert a matrix to a ket dictionary.

        This representation will not show zero values in the output dict.

        Args:
            mat (array): a Numpy matrix array.
            dims (tuple): subsystem dimensions.
            decimals (None or int): number of decimal places to round to.
                                    (See Numpy.round), if None no rounding
                                    is done (Default: None).
            string_labels (bool): return ket as string if True, otherwise
                                  return as index array (Default: False).

        Returns:
            dict: the matrix in dictionary `ket` form.
        Nr¡   r`   c                ó&   — i | ]\  }}}|› d |› �|“ŒS )ú|r4   ©r�   r¤   Úbrar¥   s       r   r¦   z0QuantumState._matrix_to_dict.<locals>.<dictcomp>¶  s7   € ð ð ð Ù(5¨¨S°#�3��˜�� ðð ð r   c                óT   — i | ]%\  }}}t          |¦  «        t          |¦  «        f|“Œ&S r4   r£   r®   s       r   r¦   z0QuantumState._matrix_to_dict.<locals>.<dictcomp>º  sA   € ð 
ð 
ð 
á��S˜#õ �3‰ZŒZ�˜s™œÐ$ cð
ð 
ð 
r   )r§   r¨   r   rj   ru   )	Úmatr   rX   ra   rª   Úinds_rowÚinds_colÚbrasr›   s	            r   Ú_matrix_to_dictzQuantumState._matrix_to_dict—  sç   € ð& Ð&ˆsˆs¨C¯IªI¸x¨IÑ,HÔ,Hˆð �LŠL‰NŒNñ	
ØØõ ×/Ò/°¸$ÈmÐ/Ñ\Ô\ˆÝ×/Ò/°¸$ÈmÐ/Ñ\Ô\ˆð ð 	ðð Ý9<¸TÀ4ÈÈhÐX`ÐN`ÔIaÑ9bÔ9bðñ ô ð ð
ð 
å!$ T¨4°°hÀÐ6HÔ1IÑ!JÔ!Jð
ñ 
ô 
ð 	
r   rn   c                óâ  ‡‡— |€| S t          j        | t          t          |¦  «        ¦  «        ¦  «        }|j        Šˆfd„t          |¦  «        D ¦   «         Št          ˆfd„t          ‰¦  «        D ¦   «         ¦  «        }|r<t          j        ||¬¦  «        }t          j        t          j        ‰¦  «        ¦  «        Št          j	        |‰¬¦  «        }t          j        ||j
        f¦  «        }|S )aù  Marginalize a probability vector according to subsystems.

        Args:
            probs (np.array): a probability vector Numpy array.
            dims (tuple): subsystem dimensions.
            qargs (None or list): a list of subsystems to return
                marginalized probabilities for. If None return all
                probabilities (Default: None).

        Returns:
            np.array: the marginalized probability vector flattened
                      for the specified qargs.
        Nc                ó    •— g | ]
}‰d z
  |z
  ‘ŒS )r|   r4   )r�   ÚiÚndims     €r   r�   z9QuantumState._subsystem_probabilities.<locals>.<listcomp>Õ  s!   ø€ Ð<Ð<Ð< q�d˜Q‘h ‘lÐ<Ð<Ð<r   c              3  ó$   •K  — | ]
}|‰v¯|V — Œd S r   r4   )r�   r¸   Ú
qargs_axess     €r   ú	<genexpr>z8QuantumState._subsystem_probabilities.<locals>.<genexpr>×  s-   øè è € ÐGÐG˜q°1¸JÐ3FÐ3F˜Ð3FÐ3FÐ3FÐ3FÐGÐGr   )Úaxis)Úaxes)r%   ÚreshapeÚlistÚreversedr¹   rz   ÚrangeÚsumÚargsortÚ	transposeri   )rn   r   r+   Ú
probs_tensÚsum_axisÚ	new_probsr¹   r»   s         @@r   Ú_subsystem_probabilitiesz%QuantumState._subsystem_probabilities¿  sâ   øø€ ð" ˆ=ØˆLå”Z ¥t­H°T©N¬NÑ';Ô';Ñ<Ô<ˆ
ØŒˆØ<Ð<Ð<Ð<­H°U©O¬OÐ<Ñ<Ô<ˆ
åÐGÐGÐGÐG¥E¨$¡K¤KÐGÑGÔGÑGÔGˆØð 	<Ýœ 
°Ð:Ñ:Ô:ˆJÝœ¥B¤J¨zÑ$:Ô$:Ñ;Ô;ˆJå”\ *°:Ð>Ñ>Ô>ˆ
Ý”J˜z¨J¬OÐ+=Ñ>Ô>ˆ	ØÐr   c                ó,   — |                       |¦  «        S r   )rQ   r   s     r   Ú__and__zQuantumState.__and__á  ó   € Ø�{Š{˜5Ñ!Ô!Ð!r   c                ó,   — |                       |¦  «        S r   )rC   r   s     r   Ú__xor__zQuantumState.__xor__ä  rÌ   r   c                ó,   — |                       |¦  «        S r   ©rM   r   s     r   Ú__mul__zQuantumState.__mul__ç  s   € Ø�~Š~˜eÑ$Ô$Ð$r   c                ó2   — |                       d|z  ¦  «        S )Nr|   rÐ   r   s     r   Ú__truediv__zQuantumState.__truediv__ê  s   € Ø�~Š~˜a %™iÑ(Ô(Ð(r   c                ó,   — |                       |¦  «        S r   )rÑ   r   s     r   Ú__rmul__zQuantumState.__rmul__í  s   € Ø�|Š|˜EÑ"Ô"Ð"r   c                ó,   — |                       |¦  «        S r   ©rK   r   s     r   Ú__add__zQuantumState.__add__ð  s   € Ø�yŠy˜ÑÔÐr   c                ó.   — |                       | ¦  «        S r   r×   r   s     r   Ú__sub__zQuantumState.__sub__ó  s   € Ø�yŠy˜%˜Ñ Ô Ð r   c                ó,   — |                       d¦  «        S )Nr‹   rÐ   r    s    r   Ú__neg__zQuantumState.__neg__ö  s   € Ø�~Š~˜bÑ!Ô!Ð!r   r   )r   r   )NN)r   r   rA   r   )r   rN   r+   rO   rA   r   )rS   r   r+   rT   rA   rU   )r+   rT   rX   rY   rA   rZ   )r+   rT   rX   rY   rA   r^   )rd   re   r+   rT   rA   rZ   )rd   re   r+   rT   rA   r	   )r+   rO   rA   rz   )F)rw   rZ   r   rz   ra   r‰   rA   rZ   )NF)rn   rZ   r   rz   r+   rT   rA   rZ   ),Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   Ú__array_priority__r   Úpropertyr!   r#   r(   r   r-   r2   r   r7   r:   r<   r>   r@   rC   rF   rK   rM   rQ   rW   r]   rc   rp   ry   rˆ   Ústaticmethodrj   rb   rµ   rÉ   rË   rÎ   rÑ   rÓ   rÕ   rØ   rÚ   rÜ   r4   r   r   r   r      s¨  € € € € € Ø+Ð+ð#ð #ð #ð #ð #ð  ÐðQð Qð Qð ð'ð 'ñ „Xð'ð ð)ð )ñ „Xð)ð ð#ð #ñ „Xð#ð
,ð ,ð ,ð ,ð#ð #ð #ð?ð ?ð ?ð ?ð ðð ð ñ „^ðð ðð ñ „^ðð ðð ñ „^ðð ðð ñ „^ðð ðð ñ „^ðð ðð ð ñ „^ðð ðð ð ñ „^ððMð Mð MðZð Zð Zð ðð ð ð ñ „^ðð" ð
ð 
ð 
ð 
ñ „^ð
ð ðð ð ð ñ „^ðð"
ð 
ð 
ð 
ð 
ð4=ð =ð =ð =ð =ð>)ð )ð )ð )ð )ð:#ð #ð #ð #ð #ðJ à=Bðð ð ð ñ „\ðð@ ðGð Gð Gñ „\ðGð< ð%
ð %
ð %
ñ „\ð%
ðN à=Aðð ð ð ñ „\ððB"ð "ð "ð"ð "ð "ð%ð %ð %ð)ð )ð )ð#ð #ð #ð ð  ð  ð!ð !ð !ð"ð "ð "ð "ð "r   r   )rà   Ú
__future__r   r-   Úabcr   Únumpyr%   Ú+qiskit.quantum_info.operators.base_operatorr   Ú5qiskit.quantum_info.operators.channel.quantum_channelr   Ú&qiskit.quantum_info.operators.op_shaper   Ú&qiskit.quantum_info.operators.operatorr   Úqiskit.result.countsr	   r   r4   r   r   ú<module>rì      sà   ððð ð #Ð "Ð "Ð "Ð "Ð "Ø €€€Ø Ð Ð Ð Ð Ð à Ð Ð Ð à DÐ DÐ DÐ DÐ DÐ DØ PÐ PÐ PÐ PÐ PÐ PØ :Ð :Ð :Ð :Ð :Ð :Ø ;Ð ;Ð ;Ð ;Ð ;Ð ;Ø 'Ð 'Ð 'Ð 'Ð 'Ð 'ðY"ð Y"ð Y"ð Y"ð Y"ñ Y"ô Y"ð Y"ð Y"ð Y"r   