§
    ¹³Ùg‚  ã                   óD   — d Z ddlZddlmZ ddlmZ  G d„ d¦  «        ZdS )zClass for backend status.é    N)ÚQiskitError)Údeprecate_funcc                   ó†   — e Zd ZdZ edddd¬¦  «        deded	ed
edef
d„¦   «         Ze	d„ ¦   «         Z
d„ Zd„ Zdefd„ZdS )ÚBackendStatusz"Class representing Backend Status.z1.4zin the 2.0 releasea!  The models in ``qiskit.providers.models`` and related objects 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Ú
stacklevelÚbackend_nameÚbackend_versionÚoperationalÚpending_jobsÚ
status_msgc                 óv   — || _         || _        || _        |dk     rt          d¦  «        ‚|| _        || _        dS )a»  Initialize a BackendStatus object

        Args:
            backend_name: The backend's name
            backend_version: The backend's version of the form X.Y.Z
            operational: True if the backend is operational
            pending_jobs: The number of pending jobs on the backend
            status_msg: The status msg for the backend

        Raises:
            QiskitError: If the backend version is in an invalid format
        r   zPending jobs must be >=0N)r   r   r   r   r   r   )Úselfr   r   r   r   r   s         ú[/granary/edev/quantum/lib/python3.11/site-packages/qiskit/providers/models/backendstatus.pyÚ__init__zBackendStatus.__init__   sI   € ð: )ˆÔØ.ˆÔØ&ˆÔØ˜!ÒÐÝÐ8Ñ9Ô9Ð9Ø(ˆÔØ$ˆŒˆˆó    c                 ó   —  | di |¤ŽS )aa  Create a new BackendStatus object from a dictionary.

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

        Returns:
            BackendStatus: The BackendStatus from the input dictionary.
        © r   )ÚclsÚdatas     r   Ú	from_dictzBackendStatus.from_dict<   s   € ð ˆsˆ{ˆ{�Tˆ{ˆ{Ðr   c                 ó   — | j         S )z“Return a dictionary format representation of the BackendStatus.

        Returns:
            dict: The dictionary form of the QobjHeader.
        )Ú__dict__)r   s    r   Úto_dictzBackendStatus.to_dictJ   s   € ð Œ}Ðr   c                 óT   — t          |t          ¦  «        r| j        |j        k    rdS dS )NTF)Ú
isinstancer   r   )r   Úothers     r   Ú__eq__zBackendStatus.__eq__R   s-   € Ý�e�]Ñ+Ô+ð 	ØŒ} ¤Ò.Ð.Ø�tØˆur   Úreturnc                 óž   — |                       ¦   «         }dt          j        |¦  «        › d| j        › d| j        › d| j        › d| j        › d�}|S )z�Return html representation of the object

        Returns:
            Representation used in Jupyter notebook and other IDE's that call the method

        z<pre>z</pre><b>name</b>: z<br/><b>version</b>: z, <b>pending jobs</b>: z<br/><b>status</b>: z<br/>)Ú__repr__ÚhtmlÚescaper   r   r   r   )r   ÚrprÚ	html_codes      r   Ú_repr_html_zBackendStatus._repr_html_X   s�   € ð �mŠm‰oŒoˆð5•D”K Ñ$Ô$ð 5ð 5Ø Ô-ð5ð 5à#Ô3ð5ð 5ð &*Ô%6ð5ð 5ð #œoð	5ð 5ð 5ð 	ð Ðr   N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   ÚstrÚboolÚintr   Úclassmethodr   r   r!   r)   r   r   r   r   r      sà   € € € € € Ø,Ð,à€^ØØ-ð0ð ðñ ô ð%àð%ð ð%ð ð	%ð
 ð%ð ð%ð %ð %ñô ð%ð8 ðð ñ „[ððð ð ðð ð ð˜Sð ð ð ð ð ð r   r   )r-   r%   Úqiskit.exceptionsr   Úqiskit.utilsr   r   r   r   r   ú<module>r4      sv   ðð  Ð à €€€Ø )Ð )Ð )Ð )Ð )Ð )Ø 'Ð 'Ð 'Ð 'Ð 'Ð 'ðTð Tð Tð Tð Tñ Tô Tð Tð Tð Tr   