§
    ¹³ÙgN�  ã                   ó  — d Z ddlZddlZddlZddlmZmZmZmZm	Z	m
Z
 ddlmZ ddlmZ ddlmZ ddlmZmZmZmZmZ ddlmZ  G d	„ d
¦  «        Z G d„ d¦  «        Z G d„ d¦  «        Z G d„ de¦  «        Z G d„ de¦  «        ZdS )zBackend Configuration Classes.é    N)ÚDictÚListÚAnyÚIterableÚTupleÚUnion)Údefaultdict)ÚQiskitError)ÚBackendConfigurationError)ÚAcquireChannelÚChannelÚControlChannelÚDriveChannelÚMeasureChannel)Údeprecate_funcc                   ót   — e Zd ZdZ edddd¬¦  «        	 	 	 	 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.
    ú1.2úin the 2.0 releaseá  The models in ``qiskit.providers.models`` are part of the deprecated `BackendV1` workflow  and no longer necessary for `BackendV2`. If a user workflow requires these representations it likely relies on deprecated functionality and should be updated to use `BackendV2`.é   ©ÚsinceÚremoval_timelineÚadditional_msgÚ
stacklevelNc                 ó|   — || _         || _        || _        |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           úb/granary/edev/quantum/lib/python3.11/site-packages/qiskit/providers/models/backendconfiguration.pyÚ__init__zGateConfig.__init__*   sd   € ðP ˆŒ	Ø$ˆŒØ ˆŒàð 	-Ø ,ˆ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_dict`   ó   € ð ˆ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_dictn   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   r5   ©r%   Úothers     r&   Ú__eq__zGateConfig.__eq__ƒ   ó9   € Ý�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(ú, )r!   r"   r#   r$   ú))r   r   r    r2   ÚreprÚgetattr)r%   Úout_strÚis      r&   Ú__repr__zGateConfig.__repr__‰   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   r'   Úclassmethodr.   r5   r;   rD   r*   r(   r&   r   r       s¹   € € € € € ðð ð €^ØØ-ð0ð ðñ ô ð ØØØð++ð ++ð ++ñô ð++ðZ ðð ñ „[ððð ð ð*ð ð ðð ð ð ð r(   r   c                   óh   — e Zd ZdZ eddd¬¦  «        d„ ¦   «         Zed„ ¦   «         Zd„ Zd	„ Z	d
„ Z
dS )Ú
UchannelLOz•Class representing a U Channel LO

    Attributes:
        q: Qubit that scale corresponds too.
        scale: Scale factor for qubit frequency.
    r   r   r   )r   r   r   c                 óL   — |dk     rt          d¦  «        ‚|| _        || _        dS )zöInitialize a UchannelLOSchema object

        Args:
            q (int): Qubit that scale corresponds too. Must be >= 0.
            scale (complex): Scale factor for qubit frequency.

        Raises:
            QiskitError: If q is < 0
        r   zq must be >=0N)r
   ÚqÚscale)r%   rN   rO   s      r&   r'   zUchannelLO.__init__š   s-   € ð$ ˆqŠ5ˆ5Ý˜oÑ.Ô.Ð.ØˆŒØˆŒ
ˆ
ˆ
r(   c                 ó   —  | di |¤ŽS )aF  Create a new UchannelLO object from a dictionary.

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

        Returns:
            UchannelLO: The UchannelLO from the input dictionary.
        r*   r*   r+   s     r&   r.   zUchannelLO.from_dict±   r/   r(   c                 ó$   — | j         | j        dœ}|S )z�Return a dictionary format representation of the UChannelLO.

        Returns:
            dict: The dictionary form of the UChannelLO.
        ©rN   rO   rR   r3   s     r&   r5   zUchannelLO.to_dict¿   s!   € ð ”Ø”Zð
ð 
ˆð ˆr(   c                 óˆ   — t          |t          ¦  «        r,|                      ¦   «         |                     ¦   «         k    rdS dS r7   )r8   rL   r5   r9   s     r&   r;   zUchannelLO.__eq__Ë   r<   r(   c                 ó(   — d| j         › d| j        › d�S )NzUchannelLO(r>   r?   rR   ©r%   s    r&   rD   zUchannelLO.__repr__Ñ   s   € Ø4˜TœVÐ4Ð4 t¤zÐ4Ð4Ð4Ð4r(   NrE   r*   r(   r&   rL   rL   ’   s    € € € € € ðð ð €^ØØ-ð0ðñ ô ðð ñô ðð ðð ñ „[ðð
ð 
ð 
ðð ð ð5ð 5ð 5ð 5ð 5r(   rL   c                   ó°   — e Zd ZdZi Z edddd¬¦  «        	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd	„¦   «         Zd
„ Zed„ ¦   «         Z	d„ Z
ed„ ¦   «         Zd„ Zd„ ZdS )ÚQasmBackendConfigurationai  Class representing an OpenQASM 2.0 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.
        local: backend is local or remote.
        simulator: backend is a simulator.
        conditional: backend supports conditional operations.
        open_pulse: backend supports open pulse.
        memory: backend supports memory.
        max_shots: maximum number of shots supported.
    r   r   á  The models in ``qiskit.providers.models`` are part of the deprecated `BackendV1` workflow and no longer necessary for `BackendV2`. If a user workflow requires these representations it likely relies on deprecated functionality and should be updated to use `BackendV2`.r   r   NFc                 óì  — i | _         || _        || _        || _        || _        || _        || _        || _        || _        |	| _	        |
| _
        || _        || _        |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 )ue  Initialize a QasmBackendConfiguration 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
            local (bool): True if the backend is local or False if remote
            simulator (bool): True if the backend is a simulator
            conditional (bool): True if the backend supports conditional
                operations
            open_pulse (bool): True if the backend supports OpenPulse
            memory (bool): True if the backend supports memory
            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.
            parametric_pulses (list): A list of pulse shapes which are supported on the backend.
                For example: ``['gaussian', 'constant']``

            **kwargs: optional fields
        c                 ó   — g | ]}|d z  ‘ŒS ©ç�íµ ÷Æ°>r*   ©Ú.0Ú_rds     r&   ú
<listcomp>z5QasmBackendConfiguration.__init__.<locals>.<listcomp>^  s   € Ð#JÐ#JÐ#J°3 C¨$¡JÐ#JÐ#JÐ#Jr(   Nr\   é   ç•Ö&è.>Úqubit_lo_rangec                 ó(   — g | ]\  }}|d z  |d z  g‘ŒS ©ç    eÍÍAr*   ©r^   Ú	min_rangeÚ	max_ranges      r&   r`   z5QasmBackendConfiguration.__init__.<locals>.<listcomp>†  s9   € ð (ð (ð (á*�Y 	ð ˜S‘ )¨c¡/Ð2ð(ð (ð (r(   Úmeas_lo_rangec                 ó(   — g | ]\  }}|d z  |d z  g‘ŒS re   r*   rg   s      r&   r`   z5QasmBackendConfiguration.__init__.<locals>.<listcomp>Œ  s9   € ð 'ð 'ð 'á*�Y 	ð ˜S‘ )¨c¡/Ð2ð'ð 'ð 'r(   Ú	rep_timesc                 ó   — g | ]}|d z  ‘ŒS r[   r*   ©r^   Ú_rts     r&   r`   z5QasmBackendConfiguration.__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Úparametric_pulsesÚupdate) r%   rq   rr   rs   rt   ru   rv   rw   r#   rx   ry   rz   r!   r{   r|   r}   r~   r   r€   r�   r‚   rƒ   r„   r…   r†   r$   r‡   rˆ   r‰   rŠ   r‹   Úkwargss                                    r&   r'   z!QasmBackendConfiguration.__init__è   s3  € ðF ˆŒ
à(ˆÔØ.ˆÔØ ˆŒØ&ˆÔØˆŒ
ØˆŒ
Ø"ˆŒØ&ˆÔØ$ˆŒØˆŒØ"ˆŒØ(ˆÔØ!ð 	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ÔØÐ(Ø%6ˆ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)rp   ÚKeyErrorÚAttributeError)r%   r   Úexs      r&   Ú__getattr__z$QasmBackendConfiguration.__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.   ©r^   Úxs     r&   r`   z6QasmBackendConfiguration.from_dict.<locals>.<listcomp>©  ó&   € ÐGÐGÐG¨Q•×%Ò% aÑ(Ô(ÐGÐGÐGr(   ru   r*   )ÚcopyÚpop)r,   r-   Úin_dataru   s       r&   r.   z"QasmBackendConfiguration.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        | 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 )r1   c                 ó6   — g | ]}|                      ¦   «         ‘ŒS r*   )r5   r–   s     r&   r`   z4QasmBackendConfiguration.to_dict.<locals>.<listcomp>¸  s    € Ð6Ð6Ð6 a�a—i’i‘k”kÐ6Ð6Ð6r(   )rq   rr   rs   rt   ru   rv   rw   r#   rx   ry   rz   r!   r|   r{   r}   c                 ó   — g | ]}|d z  ‘ŒS ©ç    €„.Ar*   r]   s     r&   r`   z4QasmBackendConfiguration.to_dict.<locals>.<listcomp>Ç  s   € Ð*UÐ*UÐ*U¸¨3°©9Ð*UÐ*UÐ*Ur(   r~   r    )r   r€   r�   r‚   rƒ   r„   r…   r†   r$   r‡   rˆ   r‰   rŠ   r‹   rˆ   rf   r‰   rc   c                 ó(   — g | ]\  }}|d z  |d z  g‘ŒS ©rb   r*   rg   s      r&   r`   z4QasmBackendConfiguration.to_dict.<locals>.<listcomp>ç  ó;   € ð *ð *ð *á*�Y 	ð ˜TÑ! 9¨tÑ#3Ð4ð*ð *ð *r(   rj   c                 ó(   — g | ]\  }}|d z  |d z  g‘ŒS r¢   r*   rg   s      r&   r`   z4QasmBackendConfiguration.to_dict.<locals>.<listcomp>í  ó;   € ð )ð )ð )á*�Y 	ð ˜TÑ! 9¨tÑ#3Ð4ð)ð )ð )r(   )rq   rr   rs   rt   ru   rv   rw   r#   rx   ry   rz   r!   r|   r2   r{   r}   r~   rA   rŒ   rp   )r%   r4   Úkwargs      r&   r5   z QasmBackendConfiguration.to_dict­  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.
        )rs   rU   s    r&   Ú
num_qubitsz#QasmBackendConfiguration.num_qubitsô  s   € ð Œ}Ðr(   c                 óˆ   — t          |t          ¦  «        r,|                      ¦   «         |                     ¦   «         k    rdS dS r7   ©r8   rW   r5   r9   s     r&   r;   zQasmBackendConfiguration.__eq__þ  ó:   € Ý�eÕ5Ñ6Ô6ð 	Ø�|Š|‰~Œ~ §¢¡¤Ò0Ð0Ø�tØˆur(   c                 ó   — || j         v S ©N)Ú__dict__)r%   Úitems     r&   Ú__contains__z%QasmBackendConfiguration.__contains__  s   € Ø�t”}Ð$Ð$r(   )NFNNNNNNNNNNNNNNNN)rF   rG   rH   rI   rp   r   r'   r’   rJ   r.   r5   Úpropertyr¨   r;   r°   r*   r(   r&   rW   rW   Õ   s  € € € € € ðð ð  €Eà€^ØØ-ð0ð ðñ ô ð.  $Ø %ØØØØØØØØØØØØØØØØð?d"ð d"ð d"ñô ðd"ðLMð Mð Mð ðð ñ „[ððEð Eð EðN ðð ñ „Xððð ð ð%ð %ð %ð %ð %r(   rW   c                   óL   ‡ — e Zd ZdZ edddd¬¦  «        ˆ fd„¦   «         Zˆ xZS )ÚBackendConfigurationzLBackwards compatibility shim representing an abstract backend configuration.r   r   rX   r   r   c                 ó:   •—  t          ¦   «         j        |i |¤Ž d S r­   )Úsuperr'   )r%   Úargsr�   Ú	__class__s      €r&   r'   zBackendConfiguration.__init__  s'   ø€ ð 	�‰ŒÔ˜$Ð) &Ð)Ð)Ð)Ð)Ð)r(   )rF   rG   rH   rI   r   r'   Ú__classcell__©r·   s   @r&   r³   r³     sl   ø€ € € € € ØVÐVà€^ØØ-ð0ð ðñ ô ð*ð *ð *ð *ñô ð*ð *ð *ð *ð *r(   r³   c            2       óü  ‡ — e Zd ZdZ edddd¬¦  «        	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d3ded	ed
edee         dede	de	de	de	de	dededeee
                  dee         deee                  deee                  dededee         dee         dee         deeef         deeef         f.ˆ fd„¦   «         Zed „ ¦   «         Zˆ fd!„Zd"„ Zed#efd$„¦   «         Zed#eeed%f         ef         fd&„¦   «         Zd'ed#efd(„Zd'ed#efd)„Zd'ed#efd*„Zd4d+ee         d#ee         fd,„Zd-e d#ee         fd.„Z!d'e"eee         f         d#ee          fd/„Z#d-ed#eee$f         fd0„Z%dee&ef         d#eeef         fd1„Z'd-ed#efd2„Z(ˆ xZ)S )5ÚPulseBackendConfigurationz¯Static configuration state for an OpenPulse enabled backend. This contains information
    about the set up of the device which can be useful for building Pulse programs.
    r   r   r   r   r   Nrq   rr   rs   rt   ru   rv   rw   r#   rx   ry   rz   Ún_uchannelsÚu_channel_loÚmeas_levelsrc   rj   rˆ   r‰   rl   Úmeas_kernelsÚdiscriminatorsÚhamiltonianÚchannelsc'                 ó"  •— || _         || _        || _        d„ |D ¦   «         | _        d„ |D ¦   «         | _        || _        || _        || _        |�Et          |¦  «        | _        d„ | j        d          	                    ¦   «         D ¦   «         | j        d<   d„ |D ¦   «         | _
        |dz  | _        |dz  | _        |&�1|&| _        |                      |&¬¦  «        \  | _        | _        | _        nt%          t&          ¦  «        | _        |�d	„ |D ¦   «         | _        |�|| _        |�|| _        |�|| _         t1          ¦   «         j        d i d
|“d|“d|“d|“d|“d|“d|“d|“d|	“d|
“d|“d|“d|“d|“d|“d|“d| “d|!“d|"“d|#“d|$“d|%“|'¤Ž dS )!u  
        Initialize a backend configuration that contains all the extra configuration that is made
        available for OpenPulse backends.

        Args:
            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.
            local: backend is local or remote.
            simulator: backend is a simulator.
            conditional: backend supports conditional operations.
            open_pulse: backend supports open pulse.
            memory: backend supports memory.
            max_shots: maximum number of shots supported.
            coupling_map (list): The coupling map for the device
            n_uchannels: Number of u-channels.
            u_channel_lo: U-channel relationship on device los.
            meas_levels: Supported measurement levels.
            qubit_lo_range: Qubit lo ranges for each qubit with form (min, max) in GHz.
            meas_lo_range: Measurement lo ranges for each qubit with form (min, max) in GHz.
            dt: Qubit drive channel timestep in nanoseconds.
            dtm: Measurement drive channel timestep in nanoseconds.
            rep_times: Supported repetition times (program execution time) for backend in Î¼s.
            meas_kernels: Supported measurement kernels.
            discriminators: Supported discriminators.
            hamiltonian: An optional dictionary with fields characterizing the system hamiltonian.
            channel_bandwidth (list): Bandwidth of all channels
                (qubit, measurement, and U)
            acquisition_latency (list): Array of dimension
                n_qubits x n_registers. Latency (in units of dt) to write a
                measurement result from qubit n into register slot m.
            conditional_latency (list): Array of dimension n_channels
                [d->u->m] x n_registers. Latency (in units of dt) to do a
                conditional operation on channel n from register slot m
            meas_map (list): Grouping of measurement which are multiplexed
            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
            channels: An optional dictionary containing information of each channel -- their
                purpose, type, and qubits operated on.
            **kwargs: Optional fields.
        c                 ó(   — g | ]\  }}|d z  |d z  g‘ŒS re   r*   rg   s      r&   r`   z6PulseBackendConfiguration.__init__.<locals>.<listcomp>�  s6   € ð 
ð 
ð 
Ù3I°I¸yˆY˜‰_˜i¨#™oÐ.ð
ð 
ð 
r(   c                 ó(   — g | ]\  }}|d z  |d z  g‘ŒS re   r*   rg   s      r&   r`   z6PulseBackendConfiguration.__init__.<locals>.<listcomp>�  s6   € ð 
ð 
ð 
Ù3I°I¸yˆY˜‰_˜i¨#™oÐ.ð
ð 
ð 
r(   Nc                 óX   — i | ]'\  }}|t          |t          j        ¦  «        r|d z  n|“Œ(S re   ©r8   ÚnumbersÚNumber©r^   ÚkÚvs      r&   ú
<dictcomp>z6PulseBackendConfiguration.__init__.<locals>.<dictcomp>™  sG   € ð (ð (ð (á�A�qð �j¨­G¬NÑ;Ô;ÐB�1�s‘7�7Àð(ð (ð (r(   Úvarsc                 ó   — g | ]}|d z  ‘ŒS r[   r*   rn   s     r&   r`   z6PulseBackendConfiguration.__init__.<locals>.<listcomp>ž  s   € Ð:Ð:Ð:¨˜# ™*Ð:Ð:Ð:r(   rb   )rÂ   c                 ó(   — g | ]\  }}|d z  |d z  g‘ŒS re   r*   rg   s      r&   r`   z6PulseBackendConfiguration.__init__.<locals>.<listcomp>¯  s6   € ð &ð &ð &Ù7M¸	À9�˜S‘ )¨c¡/Ð2ð&ð &ð &r(   rq   rr   rs   rt   ru   rv   rw   r#   rx   ry   rz   r!   r   r€   r�   r‚   rƒ   r„   r…   r†   r$   r‡   r*   )r¼   r½   r¾   rc   rj   r¿   rÀ   rÁ   ÚdictÚitemsrl   rˆ   r‰   rÂ   Ú_parse_channelsÚ_qubit_channel_mapÚ_channel_qubit_mapÚ_control_channelsr	   ÚlistÚchannel_bandwidthÚacquisition_latencyÚconditional_latencyÚmeas_maprµ   r'   ))r%   rq   rr   rs   rt   ru   rv   rw   r#   rx   ry   rz   r!   r¼   r½   r¾   rc   rj   rˆ   r‰   rl   r¿   rÀ   rÁ   rØ   rÙ   rÚ   rÛ   r   r€   r�   r‚   rƒ   r„   r…   r†   r$   r‡   rÂ   r�   r·   s)                                           €r&   r'   z"PulseBackendConfiguration.__init__  sÏ  ø€ ðV 'ˆÔØ(ˆÔØ&ˆÔð
ð 
ØM[ð
ñ 
ô 
ˆÔð
ð 
ØMZð
ñ 
ô 
ˆÔð )ˆÔØ,ˆÔØ&ˆÔØÐ"Ý# KÑ0Ô0ˆDÔð(ð (à Ô,¨VÔ4×:Ò:Ñ<Ô<ð(ñ (ô (ˆDÔ˜VÑ$ð
 ;Ð:°	Ð:Ñ:Ô:ˆŒà�t‘)ˆŒØ˜‘:ˆŒàÐØ$ˆDŒMð ×$Ò$¨hÐ$Ñ7Ô7ñ	ØÔ'ØÔ'ØÔ&Ð&õ &1µÑ%6Ô%6ˆDÔ"àÐ(ð&ð &ØQbð&ñ &ô &ˆDÔ"ð Ð*Ø':ˆDÔ$ØÐ*Ø':ˆDÔ$ØÐØ$ˆDŒMØ�‰ŒÔð 	
ð 	
ð 	
Ø%˜ð	
à+˜Oð	
ð �Xð	
ð $˜ð		
ð
 �%ð	
ð �%ð	
ð  �ið	
ð $˜ð	
ð "�zð	
ð �6ð	
ð  �ið	
ð &˜ð	
ð ,˜Oð	
ð $˜ð	
ð $˜ð	
ð  &˜ð!	
ð" &˜ð#	
ð$ .Ð-ð%	
ð& $˜ð'	
ð( &˜ð)	
ð* $˜ð+	
ð, �Øð/	
ð 	
ð 	
ð 	
ð 	
r(   c                 ó  — t          j         |¦  «        }d„ |                     d¦  «        D ¦   «         }||d<   |                     d¦  «        }g }|D ]!}|                     d„ |D ¦   «         ¦  «         Œ"||d<    | di |¤ŽS )a6  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–   s     r&   r`   z7PulseBackendConfiguration.from_dict.<locals>.<listcomp>Þ  r˜   r(   ru   r½   c                 óB   — g | ]}t                                |¦  «        ‘ŒS r*   )rL   r.   r–   s     r&   r`   z7PulseBackendConfiguration.from_dict.<locals>.<listcomp>ã  s&   € ÐHÐHÐH¸1�z×3Ò3°AÑ6Ô6ÐHÐHÐHr(   r*   )r™   rš   Úappend)r,   r-   r›   ru   Úinput_uchannelsÚ
u_channelsÚchannels          r&   r.   z#PulseBackendConfiguration.from_dictÒ  s£   € õ ”)˜D‘/”/ˆØGÐG°'·+²+¸gÑ2FÔ2FÐGÑGÔGˆØ ˆ�ÑØ!Ÿ+š+ nÑ5Ô5ˆØˆ
Ø&ð 	Jð 	JˆGØ×ÒÐHÐHÀÐHÑHÔHÑIÔIÐIÐIØ",ˆ�ÑØˆsˆ~ˆ~�Wˆ~ˆ~Ðr(   c                 óÌ  •— t          ¦   «                              ¦   «         }g }| j        D ]E}g }|D ])}|                     |                     ¦   «         ¦  «         Œ*|                     |¦  «         ŒF|                     | j        || j        | j        | j        | j	        | j
        | j        | j        | j        dœ
¦  «         t          | d¦  «        r
| j        |d<   t          | d¦  «        r
| j        |d<   t          | d¦  «        r
| j        |d<   t          | d¦  «        r
| j        |d<   d|v r?|                     d¦  «         |                     d¦  «         |                     d	¦  «         | j        rd
„ | j        D ¦   «         |d<   | j        rd„ | j        D ¦   «         |d<   | j        rd„ | j        D ¦   «         |d<   |dxx         dz  cc<   |dxx         dz  cc<   t          | d¦  «        rd„ | j        D ¦   «         |d<   | j        rEt+          j        | j        ¦  «        }d„ |d                              ¦   «         D ¦   «         |d<   ||d<   t          | d¦  «        r
| j        |d<   |S )r1   )
r¼   r½   r¾   rc   rj   r¿   rÀ   rl   rˆ   r‰   rØ   rÛ   rÙ   rÚ   rÂ   rÔ   rÕ   rÖ   c                 ó(   — g | ]\  }}|d z  |d z  g‘ŒS r¢   r*   rg   s      r&   r`   z5PulseBackendConfiguration.to_dict.<locals>.<listcomp>  r£   r(   rc   c                 ó(   — g | ]\  }}|d z  |d z  g‘ŒS r¢   r*   rg   s      r&   r`   z5PulseBackendConfiguration.to_dict.<locals>.<listcomp>  r¥   r(   rj   c                 ó   — g | ]}|d z  ‘ŒS rŸ   r*   rn   s     r&   r`   z5PulseBackendConfiguration.to_dict.<locals>.<listcomp>  s   € Ð$IÐ$IÐ$I°3 S¨3¡YÐ$IÐ$IÐ$Ir(   rl   rˆ   rf   r‰   c                 ó(   — g | ]\  }}|d z  |d z  g‘ŒS r¢   r*   rg   s      r&   r`   z5PulseBackendConfiguration.to_dict.<locals>.<listcomp>$  s;   € ð -ð -ð -á*�Y 	ð ˜TÑ! 9¨tÑ#3Ð4ð-ð -ð -r(   c                 óX   — i | ]'\  }}|t          |t          j        ¦  «        r|d z  n|“Œ(S r¢   rÇ   rÊ   s      r&   rÍ   z5PulseBackendConfiguration.to_dict.<locals>.<dictcomp>+  sG   € ð #ð #ð #á�A�qð �z¨!­W¬^Ñ<Ô<ÐC�1�t‘8�8À!ð#ð #ð #r(   rÎ   rÁ   )rµ   r5   r½   rß   rŒ   r¼   r¾   rc   rj   r¿   rÀ   rl   rˆ   r‰   r2   rØ   rÛ   rÙ   rÚ   rš   rÁ   r™   ÚdeepcopyrÒ   rÂ   )r%   r4   r½   r—   râ   ÚyrÁ   r·   s          €r&   r5   z!PulseBackendConfiguration.to_dictç  s  ø€ õ ‘7”7—?’?Ñ$Ô$ˆØˆØÔ"ð 	)ð 	)ˆAØˆGØð ,ð ,�Ø—’˜qŸyšy™{œ{Ñ+Ô+Ð+Ð+Ø×Ò Ñ(Ô(Ð(Ð(Ø�Šà#Ô/Ø ,Ø#Ô/Ø"&Ô"5Ø!%Ô!3Ø $Ô 1Ø"&Ô"5Ø!œ^Ø”gØ”xðð ñ	
ô 	
ð 	
õ �4Ð,Ñ-Ô-ð 	CØ,0Ô,BˆHÐ(Ñ)Ý�4˜Ñ$Ô$ð 	1Ø#'¤=ˆH�ZÑ Ý�4Ð.Ñ/Ô/ð 	GØ.2Ô.FˆHÐ*Ñ+Ý�4Ð.Ñ/Ô/ð 	GØ.2Ô.FˆHÐ*Ñ+Ø˜Ð!Ð!Ø�LŠLÐ-Ñ.Ô.Ð.Ø�LŠLÐ-Ñ.Ô.Ð.Ø�LŠLÐ,Ñ-Ô-Ð-ð Ôð 	ð*ð *à.2Ô.Að*ñ *ô *ˆHÐ%Ñ&ð
 Ôð 	ð)ð )à.2Ô.@ð)ñ )ô )ˆH�_Ñ%ð
 Œ>ð 	JØ$IÐ$I¸$¼.Ð$IÑ$IÔ$IˆH�[Ñ!à�ˆˆŒ˜#Ñˆˆ‰Ø�ˆˆŒ˜3Ñˆˆ‰å�4Ð,Ñ-Ô-ð 	ð-ð -à.2Ô.Dð-ñ -ô -ˆHÐ(Ñ)ð
 Ôð 	2Ýœ-¨Ô(8Ñ9Ô9ˆKð#ð #à'¨Ô/×5Ò5Ñ7Ô7ð#ñ #ô #ˆK˜Ñð '2ˆH�]Ñ#å�4˜Ñ$Ô$ð 	1Ø#'¤=ˆH�ZÑ àˆr(   c                 óˆ   — t          |t          ¦  «        r,|                      ¦   «         |                     ¦   «         k    rdS dS r7   rª   r9   s     r&   r;   z PulseBackendConfiguration.__eq__6  r«   r(   Úreturnc                 ó   — d| j         z  S )z0Sample rate of the signal channels in Hz (1/dt).g      ð?)rˆ   rU   s    r&   Úsample_ratez%PulseBackendConfiguration.sample_rate<  s   € ð �T”W‰}Ðr(   .c                 ó   — | j         S )zReturn the control channels)rÖ   rU   s    r&   Úcontrol_channelsz*PulseBackendConfiguration.control_channelsA  s   € ð Ô%Ð%r(   Úqubitc                 ón   — d|cxk    r| j         k     sn t          d|› d�¦  «        ‚t          |¦  «        S )zÔ
        Return the drive channel for the given qubit.

        Raises:
            BackendConfigurationError: If the qubit is not a part of the system.

        Returns:
            Qubit drive channel.
        r   úInvalid index for ú-qubit system.)rs   r   r   ©r%   rñ   s     r&   ÚdrivezPulseBackendConfiguration.driveF  sM   € ð �EÐ)Ð)Ò)Ð)˜DœMÒ)Ð)Ð)Ð)Ý+Ð,VÀÐ,VÐ,VÐ,VÑWÔWÐWÝ˜EÑ"Ô"Ð"r(   c                 ón   — d|cxk    r| j         k     sn t          d|› d�¦  «        ‚t          |¦  «        S )zê
        Return the measure stimulus channel for the given qubit.

        Raises:
            BackendConfigurationError: If the qubit is not a part of the system.
        Returns:
            Qubit measurement stimulus line.
        r   ró   rô   )rs   r   r   rõ   s     r&   Úmeasurez!PulseBackendConfiguration.measureT  sM   € ð �EÐ)Ð)Ò)Ð)˜DœMÒ)Ð)Ð)Ð)Ý+Ð,VÀÐ,VÐ,VÐ,VÑWÔWÐWÝ˜eÑ$Ô$Ð$r(   c                 ón   — d|cxk    r| j         k     sn t          d|› d�¦  «        ‚t          |¦  «        S )zè
        Return the acquisition channel for the given qubit.

        Raises:
            BackendConfigurationError: If the qubit is not a part of the system.
        Returns:
            Qubit measurement acquisition line.
        r   ró   z-qubit systems.)rs   r   r   rõ   s     r&   Úacquirez!PulseBackendConfiguration.acquirea  sM   € ð �EÐ)Ð)Ò)Ð)˜DœMÒ)Ð)Ð)Ð)Ý+Ð,WÀÐ,WÐ,WÐ,WÑXÔXÐXÝ˜eÑ$Ô$Ð$r(   Úqubitsc                 ó  — 	 t          |t          ¦  «        rt          |¦  «        }| j        |         S # t          $ r!}t          d|› d| j        › d�¦  «        |‚d}~wt          $ r}t          d| j        › d�¦  «        |‚d}~ww xY w)a"  
        Return the secondary drive channel for the given qubit -- typically utilized for
        controlling multiqubit interactions. This channel is derived from other channels.

        Args:
            qubits: Tuple or list of qubits of the form `(control_qubit, target_qubit)`.

        Raises:
            BackendConfigurationError: If the ``qubits`` is not a part of the system or if
                the backend does not provide `channels` information in its configuration.

        Returns:
            List of control channels.
        z5Couldn't find the ControlChannel operating on qubits z on zL-qubit system. The ControlChannel information is retrieved from the backend.NúThis backend - 'ú'' does not provide channel information.)	r8   r×   ÚtuplerÖ   r�   r   rs   r�   rq   )r%   rû   r‘   s      r&   Úcontrolz!PulseBackendConfiguration.controln  sË   € ð	Ý˜&¥$Ñ'Ô'ð 'Ý˜v™œ�ØÔ)¨&Ô1Ð1øÝð 	ð 	ð 	Ý+ð$Èð $ð $Ø”=ð$ð $ð $ñô ð ð	øøøøõ
 ð 	ð 	ð 	Ý+Ø] 4Ô#4Ð]Ð]Ð]ñô àðøøøøð	øøøs    ‚03 ³
B½AÁBÁ&A?Á?Brâ   c                 ó´   — 	 | j         |         S # t          $ r}t          d|› �¦  «        |‚d}~wt          $ r}t          d| j        › d�¦  «        |‚d}~ww xY w)aw  
        Return a list of indices for qubits which are operated on directly by the given ``channel``.

        Raises:
            BackendConfigurationError: If ``channel`` is not a found or if
                the backend does not provide `channels` information in its configuration.

        Returns:
            List of qubits operated on my the given ``channel``.
        zCouldn't find the Channel - Nrý   rþ   )rÕ   r�   r   r�   rq   )r%   râ   r‘   s      r&   Úget_channel_qubitsz,PulseBackendConfiguration.get_channel_qubitsŒ  s�   € ð	ØÔ*¨7Ô3Ð3øÝð 	^ð 	^ð 	^Ý+Ð,TÈ7Ð,TÐ,TÑUÔUÐ[]Ð]øøøøÝð 	ð 	ð 	Ý+Ø] 4Ô#4Ð]Ð]Ð]ñô àðøøøøð	øøøs   ‚ �
A™,¬A¹AÁAc                 ó˜  — t          ¦   «         }	 t          |t          ¦  «        rS| j                             ¦   «         D ]\  }}||v r|                     |¦  «         Œt          |¦  «        dk    rt          ‚nzt          |t          ¦  «        r0t          |¦  «        }|                     | j        |         ¦  «         n5t          |t          ¦  «        r |                     | j        |         ¦  «         t          |¦  «        S # t          $ r}t          d|› �¦  «        |‚d}~wt          $ r}t          d| j        › d�¦  «        |‚d}~ww xY w)aT  Return a list of channels which operate on the given ``qubit``.

        Raises:
            BackendConfigurationError: If ``qubit`` is not a found or if
                the backend does not provide `channels` information in its configuration.

        Returns:
            List of ``Channel``\s operated on my the given ``qubit``.
        r   zCouldn't find the qubit - Nrý   rþ   )Úsetr8   ÚintrÔ   rÒ   rŒ   Úlenr�   r×   rÿ   r   r�   rq   )r%   rñ   rÂ   ÚkeyÚvaluer‘   s         r&   Úget_qubit_channelsz,PulseBackendConfiguration.get_qubit_channels   sj  € õ ‘5”5ˆð	Ý˜%¥Ñ%Ô%ð 
@Ø"&Ô"9×"?Ò"?Ñ"AÔ"Að /ð /‘J�C˜Ø �|�|Ø Ÿš¨Ñ.Ô.Ð.øÝ�x‘=”= AÒ%Ð%Ý"�Nð &å˜E¥4Ñ(Ô(ð @Ý˜e™œ�Ø—’ Ô 7¸Ô >Ñ?Ô?Ð?Ð?Ý˜E¥5Ñ)Ô)ð @Ø—’ Ô 7¸Ô >Ñ?Ô?Ð?Ý˜‘>”>Ð!øÝð 	Zð 	Zð 	ZÝ+Ð,PÈÐ,PÐ,PÑQÔQÐWYÐYøøøøÝð 	ð 	ð 	Ý+Ø] 4Ô#4Ð]Ð]Ð]ñô àðøøøøð	øøøs$   �C0D Ä
E	ÄDÄE	Ä+EÅE	c                 ó´   — t          |t          ¦  «        st          d¦  «        ‚i }| j        |j                 D ]}|j        |t          |j        ¦  «        <   Œ|S )a4  
        Return a basic description of the channel dependency. Derived channels are given weights
        which describe how their frames are linked to other frames.
        For instance, the backend could be configured with this setting::

            u_channel_lo = [
                [UchannelLO(q=0, scale=1. + 0.j)],
                [UchannelLO(q=0, scale=-1. + 0.j), UchannelLO(q=1, scale=1. + 0.j)]
            ]

        Then, this method can be used as follows::

            backend.configuration().describe(ControlChannel(1))
            >>> {DriveChannel(0): -1, DriveChannel(1): 1}

        Args:
            channel: The derived channel to describe.
        Raises:
            BackendConfigurationError: If channel is not a ControlChannel.
        Returns:
            Control channel derivations.
        z"Can only describe ControlChannels.)r8   r   r   r½   ÚindexrO   r   rN   )r%   râ   ÚresultÚ	u_chan_los       r&   Údescribez"PulseBackendConfiguration.describe¿  sd   € õ. ˜'¥>Ñ2Ô2ð 	RÝ+Ð,PÑQÔQÐQØˆØÔ*¨7¬=Ô9ð 	@ð 	@ˆIØ09´ˆF•< 	¤Ñ,Ô,Ñ-Ð-Øˆr(   c                 ó  — t          t          ¦  «        }t          t          ¦  «        }t          t          ¦  «        }t          j        t          t          j        t          t
          j        t
          dt          i}|                     ¦   «         D ]Í\  }}|                      |¦  «        \  }}	||         }
t          |d         d         ¦  «        }||v r‰||          
                     |
|	¦  «        ¦  «         | |
|	¦  «                                      t          |¦  «        ¦  «         |t          j        k    r$||          
                     |
|	¦  «        ¦  «         ŒÎt          |¦  «        t          |¦  «        t          |¦  «        fS )a>  
        Generates a dictionaries of ``Channel``\s, and tuple of qubit(s) they operate on.

        Args:
            channels: An optional dictionary containing information of each channel -- their
                purpose, type, and qubits operated on.

        Returns:
            qubit_channel_map: Dictionary mapping tuple of qubit(s) to list of ``Channel``\s.
            channel_qubit_map: Dictionary mapping ``Channel`` to list of qubit(s).
            control_channels: Dictionary mapping tuple of qubit(s), to list of
                ``ControlChannel``\s.
        rú   Úoperatesrû   )r	   r×   r   Úprefixr   r   r   rÒ   Ú_get_channel_prefix_indexrÿ   rß   ÚextendrÑ   )r%   rÂ   Úqubit_channel_mapÚchannel_qubit_maprð   Úchannels_dictrâ   ÚconfigÚchannel_prefixr  Úchannel_typerû   s               r&   rÓ   z)PulseBackendConfiguration._parse_channelsÝ  s]  € õ (­Ñ-Ô-ÐÝ'­Ñ-Ô-ÐÝ&¥tÑ,Ô,ÐåÔ¥ÝÔ!¥>ÝÔ!¥>Ø•~ð	
ˆð  (Ÿ~š~Ñ/Ô/ð 	Ið 	I‰OˆG�VØ$(×$BÒ$BÀ7Ñ$KÔ$KÑ!ˆN˜EØ(¨Ô8ˆLÝ˜6 *Ô-¨hÔ7Ñ8Ô8ˆFØ Ð.Ð.Ø! &Ô)×0Ò0°°¸eÑ1DÔ1DÑEÔEÐEØ! < <°Ñ#6Ô#6Ô8×?Ò?ÅÀVÁÄÑMÔMÐMØ!¥^Ô%:Ò:Ð:Ø$ VÔ,×3Ò3°L°LÀÑ4GÔ4GÑHÔHÐHøÝÐ%Ñ&Ô&­Ð->Ñ(?Ô(?ÅÐFVÑAWÔAWÐWÐWr(   c                 óè   — t          j        d|¦  «        }	 |                     d¦  «        t          |                     d¦  «        ¦  «        fS # t          $ r}t          d|› d�¦  «        |‚d}~ww xY w)ae  Return channel prefix and index from the given ``channel``.

        Args:
            channel: Name of channel.

        Raises:
            BackendConfigurationError: If invalid channel name is found.

        Return:
            Channel name and index. For example, if ``channel=acquire0``, this method
            returns ``acquire`` and ``0``.
        z$(?P<channel>[a-z]+)(?P<index>[0-9]+)râ   r  zInvalid channel name - 'z' found.N)ÚreÚmatchÚgroupr  r�   r   )r%   râ   r  r‘   s       r&   r  z3PulseBackendConfiguration._get_channel_prefix_indexÿ  s‹   € õ œÐ"IÈ7ÑSÔSˆð	bØ!×'Ò'¨	Ñ2Ô2µC¸×8LÒ8LÈWÑ8UÔ8UÑ4VÔ4VÐVÐVøÝð 	bð 	bð 	bÝ+Ð,XÀwÐ,XÐ,XÐ,XÑYÔYÐ_aÐaøøøøð	bøøøs   —6A Á
A1ÁA,Á,A1)NNNNNNNNNNNNNNNNr­   )*rF   rG   rH   rI   r   Ústrr  r   r   ÚboolrL   Úfloatr   r   r'   rJ   r.   r5   r;   r±   rî   r   rð   r   rö   r   rø   r   rú   r   r   r   r   r  r   r	  Úcomplexr  r  rÓ   r  r¸   r¹   s   @r&   r»   r»     s  ø€ € € € € ðð ð €^ØØ-ð0ð ðñ ô ðB '+ØØ Ø ØØØØØØØØØØØØ#'ðOj
ð j
àðj
ð ðj
ð ð	j
ð
 ˜#”Yðj
ð ðj
ð ðj
ð ðj
ð ðj
ð ðj
ð ðj
ð ðj
ð ðj
ð ˜4 
Ô+Ô,ðj
ð  ˜#”Yð!j
ð" ˜T %œ[Ô)ð#j
ð$ ˜D œKÔ(ð%j
ð& ð'j
ð( ð)j
ð* ˜”;ð+j
ð, ˜3”ið-j
ð. ˜Sœ	ð/j
ð0 ˜#˜s˜(”^ð1j
ðN �s˜C�x”.ðOj
ð j
ð j
ð j
ð j
ñô ðj
ðX ðð ñ „[ðð(Mð Mð Mð Mð Mð^ð ð ð ð˜Uð ð ð ñ „Xðð ð& $ u¨S°#¨X¤¸Ð'<Ô"=ð &ð &ð &ñ „Xð&ð#˜3ð # <ð #ð #ð #ð #ð%˜Sð % ^ð %ð %ð %ð %ð%˜Sð % ^ð %ð %ð %ð %ðð ˜h sœmð °t¸NÔ7Kð ð ð ð ð<¨'ð °d¸3´ið ð ð ð ð(¨¨c°8¸C´=Ð.@Ô(Að ÀdÈ7Ämð ð ð ð ð> ð °4¸ÀgÐ8MÔ3Nð ð ð ð ð< X¨¨S°#¨X¬ð  X¸4ÀÀSÀ¼>ð  Xð  Xð  Xð  XðDb°ð b¸ð bð bð bð bð bð bð bð br(   r»   )rI   r  r™   rÈ   Útypingr   r   r   r   r   r   Úcollectionsr	   Úqiskit.exceptionsr
   Úqiskit.providers.exceptionsr   Úqiskit.pulse.channelsr   r   r   r   r   Úqiskit.utilsr   r   rL   rW   r³   r»   r*   r(   r&   ú<module>r(     sï  ðð %Ð $Ø 	€	€	€	Ø €€€Ø €€€Ø :Ð :Ð :Ð :Ð :Ð :Ð :Ð :Ð :Ð :Ð :Ð :Ð :Ð :Ð :Ð :Ø #Ð #Ð #Ð #Ð #Ð #à )Ð )Ð )Ð )Ð )Ð )Ø AÐ AÐ AÐ AÐ AÐ Aðð ð ð ð ð ð ð ð ð ð ð ð ð ð (Ð 'Ð 'Ð 'Ð 'Ð 'ðoð oð oð oð oñ oô oð oðd@5ð @5ð @5ð @5ð @5ñ @5ô @5ð @5ðFp%ð p%ð p%ð p%ð p%ñ p%ô p%ð p%ðf	*ð *ð *ð *ð *Ð3ñ *ô *ð *ð xbð xbð xbð xbð xbÐ 8ñ xbô xbð xbð xbð xbr(   