{"payload":{"allShortcutsEnabled":false,"fileTree":{"qiskit/providers/models":{"items":[{"name":"__init__.py","path":"qiskit/providers/models/__init__.py","contentType":"file"},{"name":"backendconfiguration.py","path":"qiskit/providers/models/backendconfiguration.py","contentType":"file"},{"name":"backendproperties.py","path":"qiskit/providers/models/backendproperties.py","contentType":"file"},{"name":"backendstatus.py","path":"qiskit/providers/models/backendstatus.py","contentType":"file"},{"name":"jobstatus.py","path":"qiskit/providers/models/jobstatus.py","contentType":"file"},{"name":"pulsedefaults.py","path":"qiskit/providers/models/pulsedefaults.py","contentType":"file"}],"totalCount":6},"qiskit/providers":{"items":[{"name":"basic_provider","path":"qiskit/providers/basic_provider","contentType":"directory"},{"name":"fake_provider","path":"qiskit/providers/fake_provider","contentType":"directory"},{"name":"models","path":"qiskit/providers/models","contentType":"directory"},{"name":"__init__.py","path":"qiskit/providers/__init__.py","contentType":"file"},{"name":"backend.py","path":"qiskit/providers/backend.py","contentType":"file"},{"name":"backend_compat.py","path":"qiskit/providers/backend_compat.py","contentType":"file"},{"name":"exceptions.py","path":"qiskit/providers/exceptions.py","contentType":"file"},{"name":"job.py","path":"qiskit/providers/job.py","contentType":"file"},{"name":"jobstatus.py","path":"qiskit/providers/jobstatus.py","contentType":"file"},{"name":"options.py","path":"qiskit/providers/options.py","contentType":"file"},{"name":"provider.py","path":"qiskit/providers/provider.py","contentType":"file"},{"name":"providerutils.py","path":"qiskit/providers/providerutils.py","contentType":"file"}],"totalCount":12},"qiskit":{"items":[{"name":"assembler","path":"qiskit/assembler","contentType":"directory"},{"name":"circuit","path":"qiskit/circuit","contentType":"directory"},{"name":"compiler","path":"qiskit/compiler","contentType":"directory"},{"name":"converters","path":"qiskit/converters","contentType":"directory"},{"name":"dagcircuit","path":"qiskit/dagcircuit","contentType":"directory"},{"name":"passmanager","path":"qiskit/passmanager","contentType":"directory"},{"name":"primitives","path":"qiskit/primitives","contentType":"directory"},{"name":"providers","path":"qiskit/providers","contentType":"directory"},{"name":"pulse","path":"qiskit/pulse","contentType":"directory"},{"name":"qasm","path":"qiskit/qasm","contentType":"directory"},{"name":"qasm2","path":"qiskit/qasm2","contentType":"directory"},{"name":"qasm3","path":"qiskit/qasm3","contentType":"directory"},{"name":"qobj","path":"qiskit/qobj","contentType":"directory"},{"name":"qpy","path":"qiskit/qpy","contentType":"directory"},{"name":"quantum_info","path":"qiskit/quantum_info","contentType":"directory"},{"name":"result","path":"qiskit/result","contentType":"directory"},{"name":"scheduler","path":"qiskit/scheduler","contentType":"directory"},{"name":"synthesis","path":"qiskit/synthesis","contentType":"directory"},{"name":"transpiler","path":"qiskit/transpiler","contentType":"directory"},{"name":"utils","path":"qiskit/utils","contentType":"directory"},{"name":"visualization","path":"qiskit/visualization","contentType":"directory"},{"name":"VERSION.txt","path":"qiskit/VERSION.txt","contentType":"file"},{"name":"__init__.py","path":"qiskit/__init__.py","contentType":"file"},{"name":"exceptions.py","path":"qiskit/exceptions.py","contentType":"file"},{"name":"user_config.py","path":"qiskit/user_config.py","contentType":"file"},{"name":"version.py","path":"qiskit/version.py","contentType":"file"}],"totalCount":26},"":{"items":[{"name":".azure","path":".azure","contentType":"directory"},{"name":".binder","path":".binder","contentType":"directory"},{"name":".cargo","path":".cargo","contentType":"directory"},{"name":".github","path":".github","contentType":"directory"},{"name":"crates","path":"crates","contentType":"directory"},{"name":"docs","path":"docs","contentType":"directory"},{"name":"examples","path":"examples","contentType":"directory"},{"name":"qiskit","path":"qiskit","contentType":"directory"},{"name":"releasenotes","path":"releasenotes","contentType":"directory"},{"name":"test","path":"test","contentType":"directory"},{"name":"tools","path":"tools","contentType":"directory"},{"name":".editorconfig","path":".editorconfig","contentType":"file"},{"name":".git-blame-ignore-revs","path":".git-blame-ignore-revs","contentType":"file"},{"name":".gitignore","path":".gitignore","contentType":"file"},{"name":".local-spellings","path":".local-spellings","contentType":"file"},{"name":".mailmap","path":".mailmap","contentType":"file"},{"name":".mergify.yml","path":".mergify.yml","contentType":"file"},{"name":".stestr.conf","path":".stestr.conf","contentType":"file"},{"name":"CITATION.bib","path":"CITATION.bib","contentType":"file"},{"name":"CODE_OF_CONDUCT.md","path":"CODE_OF_CONDUCT.md","contentType":"file"},{"name":"CONTRIBUTING.md","path":"CONTRIBUTING.md","contentType":"file"},{"name":"Cargo.lock","path":"Cargo.lock","contentType":"file"},{"name":"Cargo.toml","path":"Cargo.toml","contentType":"file"},{"name":"DEPRECATION.md","path":"DEPRECATION.md","contentType":"file"},{"name":"LICENSE.txt","path":"LICENSE.txt","contentType":"file"},{"name":"MAINTAINING.md","path":"MAINTAINING.md","contentType":"file"},{"name":"MANIFEST.in","path":"MANIFEST.in","contentType":"file"},{"name":"Makefile","path":"Makefile","contentType":"file"},{"name":"README.md","path":"README.md","contentType":"file"},{"name":"SECURITY.md","path":"SECURITY.md","contentType":"file"},{"name":"asv.conf.json","path":"asv.conf.json","contentType":"file"},{"name":"azure-pipelines.yml","path":"azure-pipelines.yml","contentType":"file"},{"name":"constraints.txt","path":"constraints.txt","contentType":"file"},{"name":"pyproject.toml","path":"pyproject.toml","contentType":"file"},{"name":"qiskit_bot.yaml","path":"qiskit_bot.yaml","contentType":"file"},{"name":"requirements-dev.txt","path":"requirements-dev.txt","contentType":"file"},{"name":"requirements-optional.txt","path":"requirements-optional.txt","contentType":"file"},{"name":"requirements.txt","path":"requirements.txt","contentType":"file"},{"name":"rust-toolchain.toml","path":"rust-toolchain.toml","contentType":"file"},{"name":"setup.py","path":"setup.py","contentType":"file"},{"name":"tox.ini","path":"tox.ini","contentType":"file"}],"totalCount":41}},"fileTreeProcessingTime":22.864693,"foldersToFetch":[],"repo":{"id":83821669,"defaultBranch":"main","name":"qiskit","ownerLogin":"Qiskit","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2017-03-03T17:02:42.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/30696987?v=4","public":true,"private":false,"isOrgOwned":true},"symbolsExpanded":false,"treeExpanded":true,"refInfo":{"name":"main","listCacheKey":"v0:1710785011.0","canEdit":false,"refType":"branch","currentOid":"43381ae1b159c01b55159d2dc1e8a65970b72746"},"path":"qiskit/providers/models/backendstatus.py","currentUser":null,"blob":{"rawLines":["# This code is part of Qiskit.","#","# (C) Copyright IBM 2020.","#","# This code is licensed under the Apache License, Version 2.0. You may","# obtain a copy of this license in the LICENSE.txt file in the root directory","# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.","#","# Any modifications or derivative works of this code must retain this","# copyright notice, and modified files need to carry a notice indicating","# that they have been altered from the originals.","","\"\"\"Class for backend status.\"\"\"","","import html","from qiskit.exceptions import QiskitError","","","class BackendStatus:"," \"\"\"Class representing Backend Status.\"\"\"",""," def __init__("," self,"," backend_name: str,"," backend_version: str,"," operational: bool,"," pending_jobs: int,"," status_msg: str,"," ):"," \"\"\"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"," \"\"\""," self.backend_name = backend_name"," self.backend_version = backend_version"," self.operational = operational"," if pending_jobs < 0:"," raise QiskitError(\"Pending jobs must be >=0\")"," self.pending_jobs = pending_jobs"," self.status_msg = status_msg",""," @classmethod"," def from_dict(cls, data):"," \"\"\"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."," \"\"\""," return cls(**data)",""," def to_dict(self):"," \"\"\"Return a dictionary format representation of the BackendStatus.",""," Returns:"," dict: The dictionary form of the QobjHeader."," \"\"\""," return self.__dict__",""," def __eq__(self, other):"," if isinstance(other, BackendStatus):"," if self.__dict__ == other.__dict__:"," return True"," return False",""," def _repr_html_(self) -> str:"," \"\"\"Return html representation of the object",""," Returns:"," Representation used in Jupyter notebook and other IDE's that call the method",""," \"\"\""," rpr = self.__repr__()"," html_code = ("," f\"
{html.escape(rpr)}\""," f\"name: {self.backend_name}