Skip to content

Commit

Permalink
"bss.seconds" deprecation in job.metrics() (#913)
Browse files Browse the repository at this point in the history
* Added deprecation message for "bss.seconds".

* Updated pricing documentation.

* Fixed lint errors.

* Fixed lint error.

* Update qiskit_ibm_runtime/runtime_job.py

Co-authored-by: Kevin Tian <kevin.tian@ibm.com>

---------

Co-authored-by: Kevin Tian <kevin.tian@ibm.com>
  • Loading branch information
raulotaolea and kt474 committed Jun 14, 2023
1 parent b4a890c commit a750d8c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/cloud/plans.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ A pay-as-you-go plan for accessing IBM Quantum systems. Build your own programs
Pricing overview
----------------

The Lite plan is free. The Standard plan charges you per *runtime second* when running on physical systems. The following diagram illustrates what is included in a runtime second. For this service, one runtime second includes quantum compute time as well as classical near-time pre- and post-processing time. Any time spent waiting for results or in the queue for the quantum computer are excluded from the classical processing time.
The Lite plan is free. The Standard plan charges you per *runtime second* when running on physical systems. The following diagram illustrates what is included in a runtime second. For this service, one runtime second includes quantum compute time. Any time spent waiting for results or in the queue for the quantum computer are excluded.

.. figure:: ../images/Runtime_Accounting_Diagram.png
:alt: This diagram shows that everything before the program starts (such as queuing) is free. After the job starts, it costs $1.60 per second.
Expand Down
1 change: 0 additions & 1 deletion qiskit_ibm_runtime/options/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ def _flexible(cls): # type: ignore
"""

def __new__(cls, *_, **kwargs): # type: ignore

all_fields = []
orig_field_names = set()

Expand Down
6 changes: 6 additions & 0 deletions qiskit_ibm_runtime/runtime_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
from .utils.converters import utc_to_local
from .api.client_parameters import ClientParameters
from .utils.utils import CallableStr
from .utils.deprecation import issue_deprecation_msg

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -394,6 +395,11 @@ def metrics(self) -> Dict[str, Any]:
IBMRuntimeError: If a network error occurred.
"""
try:
issue_deprecation_msg(
msg="The 'bss.seconds' attribute is deprecated",
version="0.11.1",
remedy="Use the 'usage.quantum_seconds' attribute instead.",
)
metadata_str = self._api_client.job_metadata(self.job_id())
return json.loads(metadata_str)
except RequestsApiError as err:
Expand Down
2 changes: 2 additions & 0 deletions test/unit/test_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,8 @@ def tearDown(self) -> None:
MOCK_PROXY_CONFIG_DICT = {
"urls": {"https": "127.0.0.1", "username_ntlm": "", "password_ntlm": ""}
}


# NamedTemporaryFiles not supported in Windows
@skipIf(os.name == "nt", "Test not supported in Windows")
class TestEnableAccount(IBMTestCase):
Expand Down

0 comments on commit a750d8c

Please sign in to comment.