§
    ²Ûgø9  ã                   óF   — d Z ddlZ G d„ d¦  «        Z G d„ d¦  «        ZdS )z
Aer backend configuration
é    Nc                   óJ   — e Zd ZdZ	 	 	 	 dd„Zed„ ¦   «         Zd„ Zd„ Zd„ Z	dS )	Ú
GateConfiga-  Class representing a Gate Configuration

    Attributes:
        name: the gate name as it will be referred to in OpenQASM.
        parameters: variable names for the gate parameters (if any).
        qasm_def: definition of this gate in terms of OpenQASM 2 primitives U
                  and CX.
    Nc                 ó|   — || _         || _        || _        |r|| _        |r|| _        |�|| _        |�	|| _        dS dS )aÏ  Initialize a GateConfig object

        Args:
            name (str): the gate name as it will be referred to in OpenQASM.
            parameters (list): variable names for the gate parameters (if any)
                               as a list of strings.
            qasm_def (str): definition of this gate in terms of OpenQASM 2 primitives U and CX.
            coupling_map (list): An optional coupling map for the gate. In
                the form of a list of lists of integers representing the qubit
                groupings which are coupled by this gate.
            latency_map (list): An optional map of latency for the gate. In the
                the form of a list of lists of integers of either 0 or 1
                representing an array of dimension
                len(coupling_map) X n_registers that specifies the register
                latency (1: fast, 0: slow) conditional operations on the gate
            conditional (bool): Optionally specify whether this gate supports
                conditional operations (true/false). If this is not specified,
                then the gate inherits the conditional property of the backend.
            description (str): Description of the gate operation
        N)ÚnameÚ
parametersÚqasm_defÚcoupling_mapÚlatency_mapÚconditionalÚdescription)Úselfr   r   r   r	   r
   r   r   s           ú^/granary/edev/quantum/lib/python3.11/site-packages/qiskit_aer/backends/backendconfiguration.pyÚ__init__zGateConfig.__init__   sc   € ð> ˆŒ	Ø$ˆŒØ ˆŒàð 	-Ø ,ˆDÔàð 	+Ø*ˆDÔØÐ"Ø*ˆDÔØÐ"Ø*ˆDÔÐÐð #Ð"ó    c                 ó   —  | di |¤ŽS )aX  Create a new GateConfig object from a dictionary.

        Args:
            data (dict): A dictionary representing the GateConfig to create.
                         It will be in the same format as output by
                         :func:`to_dict`.

        Returns:
            GateConfig: The GateConfig from the input dictionary.
        © r   )ÚclsÚdatas     r   Ú	from_dictzGateConfig.from_dictI   s   € ð ˆsˆ{ˆ{�Tˆ{ˆ{Ðr   c                 ó   — | j         | j        | j        dœ}t          | d¦  «        r
| j        |d<   t          | d¦  «        r
| j        |d<   t          | d¦  «        r
| j        |d<   t          | d¦  «        r
| j        |d<   |S )ú�Return a dictionary format representation of the GateConfig.

        Returns:
            dict: The dictionary form of the GateConfig.
        )r   r   r   r	   r
   r   r   )r   r   r   Úhasattrr	   r
   r   r   )r   Úout_dicts     r   Úto_dictzGateConfig.to_dictW   s¢   € ð ”IØœ/Øœð
ð 
ˆõ
 �4˜Ñ(Ô(ð 	9Ø'+Ô'8ˆH�^Ñ$Ý�4˜Ñ'Ô'ð 	7Ø&*Ô&6ˆH�]Ñ#Ý�4˜Ñ'Ô'ð 	7Ø&*Ô&6ˆH�]Ñ#Ý�4˜Ñ'Ô'ð 	7Ø&*Ô&6ˆH�]Ñ#Øˆr   c                 óˆ   — t          |t          ¦  «        r,|                      ¦   «         |                     ¦   «         k    rdS dS ©NTF)Ú
isinstancer   r   ©r   Úothers     r   Ú__eq__zGateConfig.__eq__l   s9   € Ý�e�ZÑ(Ô(ð 	Ø�|Š|‰~Œ~ §¢¡¤Ò0Ð0Ø�tØˆur   c           	      ó´   — d| j         › d| j        › d| j        › �}dD ]5}t          | |¦  «        r#|dt	          t          | |¦  «        ¦  «        z   z  }Œ6|dz  }|S )NzGateConfig(z, )r	   r
   r   r   ú))r   r   r   r   ÚreprÚgetattr)r   Úout_strÚis      r   Ú__repr__zGateConfig.__repr__r   sv   € ØO ¤	ÐOÐO¨T¬_ÐOÐOÀÄÐOÐOˆØNð 	9ð 	9ˆAÝ�t˜QÑÔð 9Ø˜4¥$¥w¨t°QÑ'7Ô'7Ñ"8Ô"8Ñ8Ñ8�øØ�3‰ˆØˆr   )NNNN)
Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   Úclassmethodr   r   r    r'   r   r   r   r   r      s‰   € € € € € ðð ð ØØØð++ð ++ð ++ð ++ðZ ðð ñ „[ððð ð ð*ð ð ðð ð ð ð r   r   c                   ó„   — e Zd ZdZi Z	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd„Zd„ Zed„ ¦   «         Zd„ Z	e
d„ ¦   «         Zd	„ Zd
„ ZdS )ÚAerBackendConfigurationar  Class representing an Aer Backend Configuration.

    Attributes:
        backend_name: backend name.
        backend_version: backend version in the form X.Y.Z.
        n_qubits: number of qubits.
        basis_gates: list of basis gates names on the backend.
        gates: list of basis gates on the backend.
        max_shots: maximum number of shots supported.
    NFc                 óÚ  — i | _         || _        || _        || _        || _        || _        d| _        d| _        d| _        d| _	        d| _
        || _        || _        |r|| _        |	| _        |
rd„ |
D ¦   «         | _        |�
|dz  | _        |r|| _        |�|| _        |rd| _        |r|| _        |�|| _        |�|| _        |�|| _        |�|| _        |�|| _        |�|| _        |�
|dz  | _        |�
|dz  | _        |�|| _        d|v rd	„ |d         D ¦   «         |d<   d
|v rd„ |d
         D ¦   «         |d
<   d|v rd„ |d         D ¦   «         |d<   | j                              |¦  «         dS )uU  Initialize a AerBackendConfiguration Object

        Args:
            backend_name (str): The backend name
            backend_version (str): The backend version in the form X.Y.Z
            n_qubits (int): the number of qubits for the backend
            basis_gates (list): The list of strings for the basis gates of the
                backends
            gates (list): The list of GateConfig objects for the basis gates of
                the backend
            max_shots (int): The maximum number of shots allowed on the backend
            coupling_map (list): The coupling map for the device
            supported_instructions (List[str]): Instructions supported by the backend.
            dynamic_reprate_enabled (bool): whether delay between programs can be set dynamically
                (ie via ``rep_delay``). Defaults to False.
            rep_delay_range (List[float]): 2d list defining supported range of repetition
                delays for backend in Î¼s. First entry is lower end of the range, second entry is
                higher end of the range. Optional, but will be specified when
                ``dynamic_reprate_enabled=True``.
            default_rep_delay (float): Value of ``rep_delay`` if not specified by user and
                ``dynamic_reprate_enabled=True``.
            max_experiments (int): The maximum number of experiments per job
            sample_name (str): Sample name for the backend
            n_registers (int): Number of register slots available for feedback
                (if conditional is True)
            register_map (list): An array of dimension n_qubits X
                n_registers that specifies whether a qubit can store a
                measurement in a certain register slot.
            configurable (bool): True if the backend is configurable, if the
                backend is a simulator
            credits_required (bool): True if backend requires credits to run a
                job.
            online_date (datetime.datetime): The date that the device went online
            display_name (str): Alternate name field for the backend
            description (str): A description for the backend
            tags (list): A list of string tags to describe the backend
            dt (float): Qubit drive channel timestep in nanoseconds.
            dtm (float): Measurement drive channel timestep in nanoseconds.
            processor_type (dict): Processor type for this backend. A dictionary of the
                form ``{"family": <str>, "revision": <str>, segment: <str>}`` such as
                ``{"family": "Canary", "revision": "1.0", segment: "A"}``.

                - family: Processor family of this backend.
                - revision: Revision version of this processor.
                - segment: Segment this processor belongs to within a larger chip.

            **kwargs: optional fields
        TFc                 ó   — g | ]}|d z  ‘ŒS ©ç�íµ ÷Æ°>r   ©Ú.0Ú_rds     r   ú
<listcomp>z4AerBackendConfiguration.__init__.<locals>.<listcomp>è   s   € Ð#JÐ#JÐ#J°3 C¨$¡JÐ#JÐ#JÐ#Jr   Nr2   é   ç•Ö&è.>Úqubit_lo_rangec                 ó(   — g | ]\  }}|d z  |d z  g‘ŒS ©ç    eÍÍAr   ©r4   Ú	min_rangeÚ	max_ranges      r   r6   z4AerBackendConfiguration.__init__.<locals>.<listcomp>  s9   € ð (ð (ð (á*�Y 	ð ˜S‘ )¨c¡/Ð2ð(ð (ð (r   Úmeas_lo_rangec                 ó(   — g | ]\  }}|d z  |d z  g‘ŒS r;   r   r=   s      r   r6   z4AerBackendConfiguration.__init__.<locals>.<listcomp>  s9   € ð 'ð 'ð 'á*�Y 	ð ˜S‘ )¨c¡/Ð2ð'ð 'ð 'r   Ú	rep_timesc                 ó   — g | ]}|d z  ‘ŒS r1   r   )r4   Ú_rts     r   r6   z4AerBackendConfiguration.__init__.<locals>.<listcomp>  s   € Ð"MÐ"MÐ"M°# 3¨¡:Ð"MÐ"MÐ"Mr   )Ú_dataÚbackend_nameÚbackend_versionÚn_qubitsÚbasis_gatesÚgatesÚlocalÚ	simulatorr   Ú
open_pulseÚmemoryÚ	max_shotsr	   Úsupported_instructionsÚdynamic_reprate_enabledÚrep_delay_rangeÚdefault_rep_delayÚmax_experimentsÚsample_nameÚn_registersÚregister_mapÚconfigurableÚcredits_requiredÚonline_dateÚdisplay_namer   ÚtagsÚdtÚdtmÚprocessor_typeÚupdate)r   rF   rG   rH   rI   rJ   rO   r	   rP   rQ   rR   rS   rT   rU   rV   rW   rX   rY   rZ   r[   r   r\   r]   r^   r_   Úkwargss                             r   r   z AerBackendConfiguration.__init__‰   s%  € ðX ˆŒ
à(ˆÔØ.ˆÔØ ˆŒØ&ˆÔØˆŒ
ØˆŒ
ØˆŒØˆÔØˆŒØˆŒØ"ˆŒØ(ˆÔØ!ð 	AØ*@ˆDÔ'à'>ˆÔ$Øð 	KØ#JÐ#J¸/Ð#JÑ#JÔ#JˆDÔ ØÐ(Ø%6¸Ñ%=ˆDÔ"ð ð 	3Ø#2ˆDÔ ØÐ"Ø*ˆDÔàð 	!Ø ˆDÔàð 	-Ø ,ˆDÔØÐ#Ø ,ˆDÔØÐ'Ø$4ˆDÔ!ØÐ"Ø*ˆDÔØÐ#Ø ,ˆDÔØÐ"Ø*ˆDÔØÐØˆDŒIð ˆ>Ø˜4‘iˆDŒGØˆ?Ø˜T‘zˆDŒHØÐ%Ø"0ˆDÔð ˜vÐ%Ð%ð(ð (à.4Ð5EÔ.Fð(ñ (ô (ˆFÐ#Ñ$ð
 ˜fÐ$Ð$ð'ð 'à.4°_Ô.Eð'ñ 'ô 'ˆF�?Ñ#ð ˜&Ð Ð Ø"MÐ"M¸ÀÔ9LÐ"MÑ"MÔ"MˆF�;ÑàŒ
×Ò˜&Ñ!Ô!Ð!Ð!Ð!r   c                 ój   — 	 | j         |         S # t          $ r}t          d|› d�¦  «        |‚d }~ww xY w)Nz
Attribute z is not defined)rE   ÚKeyErrorÚAttributeError)r   r   Úexs      r   Ú__getattr__z#AerBackendConfiguration.__getattr__  sT   € ð	MØ”:˜dÔ#Ð#øÝð 	Mð 	Mð 	MÝ Ð!C¨dÐ!CÐ!CÐ!CÑDÔDÈ"ÐLøøøøð	Møøøs   ‚ �
2™-­2c                 ó‚   — t          j         |¦  «        }d„ |                     d¦  «        D ¦   «         }||d<    | di |¤ŽS )aW  Create a new GateConfig object from a dictionary.

        Args:
            data (dict): A dictionary representing the GateConfig to create.
                         It will be in the same format as output by
                         :func:`to_dict`.
        Returns:
            GateConfig: The GateConfig from the input dictionary.
        c                 óB   — g | ]}t                                |¦  «        ‘ŒS r   )r   r   ©r4   Úxs     r   r6   z5AerBackendConfiguration.from_dict.<locals>.<listcomp>1  s&   € ÐGÐGÐG¨Q•×%Ò% aÑ(Ô(ÐGÐGÐGr   rJ   r   )ÚcopyÚpop)r   r   Úin_datarJ   s       r   r   z!AerBackendConfiguration.from_dict%  sL   € õ ”)˜D‘/”/ˆØGÐG°'·+²+¸gÑ2FÔ2FÐGÑGÔGˆØ ˆ�ÑØˆsˆ~ˆ~�Wˆ~ˆ~Ðr   c                 óž  — | j         | j        | j        | j        d„ | j        D ¦   «         | j        | j        | j        | j        | j	        | j
        | j        dœ}t          | d¦  «        r
| j        |d<   t          | d¦  «        rd„ | j        D ¦   «         |d<   t          | d¦  «        r| j        dz  |d<   dD ]%}t          | |¦  «        rt!          | |¦  «        ||<   Œ&|                     | j        ¦  «         d	|v r|d	xx         d
z  cc<   d|v r|dxx         d
z  cc<   d|v rd„ |d         D ¦   «         |d<   d|v rd„ |d         D ¦   «         |d<   |S )r   c                 ó6   — g | ]}|                      ¦   «         ‘ŒS r   )r   ri   s     r   r6   z3AerBackendConfiguration.to_dict.<locals>.<listcomp>@  s    € Ð6Ð6Ð6 a�a—i’i‘k”kÐ6Ð6Ð6r   )rF   rG   rH   rI   rJ   rK   rL   r   rN   rO   r	   rQ   rP   rR   c                 ó   — g | ]}|d z  ‘ŒS )ç    €„.Ar   r3   s     r   r6   z3AerBackendConfiguration.to_dict.<locals>.<listcomp>N  s   € Ð*UÐ*UÐ*U¸¨3°©9Ð*UÐ*UÐ*Ur   rS   rq   )rT   rU   rV   rW   rX   rY   rZ   r[   r   r\   r]   r^   r_   r]   r<   r^   r9   c                 ó(   — g | ]\  }}|d z  |d z  g‘ŒS ©r8   r   r=   s      r   r6   z3AerBackendConfiguration.to_dict.<locals>.<listcomp>m  s;   € ð *ð *ð *á*�Y 	ð ˜TÑ! 9¨tÑ#3Ð4ð*ð *ð *r   r@   c                 ó(   — g | ]\  }}|d z  |d z  g‘ŒS rs   r   r=   s      r   r6   z3AerBackendConfiguration.to_dict.<locals>.<listcomp>s  s;   € ð )ð )ð )á*�Y 	ð ˜TÑ! 9¨tÑ#3Ð4ð)ð )ð )r   )rF   rG   rH   rI   rJ   rK   rL   r   rN   rO   r	   rQ   r   rP   rR   rS   r$   r`   rE   )r   r   Úkwargs      r   r   zAerBackendConfiguration.to_dict5  sÝ  € ð !Ô-Ø#Ô3ØœØÔ+Ø6Ð6¨4¬:Ð6Ñ6Ô6Ø”ZØœØÔ+Ø”kØœØ Ô-Ø'+Ô'Cð
ð 
ˆõ �4Ð1Ñ2Ô2ð 	MØ15Ô1LˆHÐ-Ñ.å�4Ð*Ñ+Ô+ð 	VØ*UÐ*UÀÔ@TÐ*UÑ*UÔ*UˆHÐ&Ñ'Ý�4Ð,Ñ-Ô-ð 	IØ,0Ô,BÀSÑ,HˆHÐ(Ñ)ð
ð 	7ð 	7ˆEõ �t˜UÑ#Ô#ð 7Ý")¨$°Ñ"6Ô"6�˜‘øà�Š˜œ
Ñ#Ô#Ð#à�8ÐÐØ�TˆNˆNŒN˜cÑ!ˆNˆN‰NØ�HÐÐØ�UˆOˆOŒO˜sÑ"ˆOˆO‰Oð ˜xÐ'Ð'ð*ð *à.6Ð7GÔ.Hð*ñ *ô *ˆHÐ%Ñ&ð
 ˜hÐ&Ð&ð)ð )à.6°Ô.Gð)ñ )ô )ˆH�_Ñ%ð
 ˆr   c                 ó   — | j         S )zùReturns the number of qubits.

        In future, `n_qubits` should be replaced in favor of `num_qubits` for consistent use
        throughout Qiskit. Until this is properly refactored, this property serves as intermediate
        solution.
        )rH   )r   s    r   Ú
num_qubitsz"AerBackendConfiguration.num_qubitsz  s   € ð Œ}Ðr   c                 óˆ   — t          |t          ¦  «        r,|                      ¦   «         |                     ¦   «         k    rdS dS r   )r   r.   r   r   s     r   r    zAerBackendConfiguration.__eq__„  s:   € Ý�eÕ4Ñ5Ô5ð 	Ø�|Š|‰~Œ~ §¢¡¤Ò0Ð0Ø�tØˆur   c                 ó   — || j         v S )N)Ú__dict__)r   Úitems     r   Ú__contains__z$AerBackendConfiguration.__contains__Š  s   € Ø�t”}Ð$Ð$r   )NFNNNNNNNNNNNNNNN)r(   r)   r*   r+   rE   r   rf   r,   r   r   Úpropertyrw   r    r|   r   r   r   r.   r.   {   sì   € € € € € ð	ð 	ð €Eð  $Ø %ØØØØØØØØØØØØØØØð3T"ð T"ð T"ð T"ðlMð Mð Mð ðð ñ „[ððCð Cð CðJ ðð ñ „Xððð ð ð%ð %ð %ð %ð %r   r.   )r+   rk   r   r.   r   r   r   ú<module>r~      s‡   ððð ð €€€ðfð fð fð fð fñ fô fð fðRP%ð P%ð P%ð P%ð P%ñ P%ô P%ð P%ð P%ð P%r   