Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ mypy:
mypy --module qiskit_ibm_runtime --package test

style:
black --check qiskit_ibm_runtime setup.py test docs/tutorials program_source
black --check qiskit_ibm_runtime setup.py test docs/tutorials

unit-test:
python -m unittest discover --verbose --top-level-directory . --start-directory test/unit
Expand All @@ -40,4 +40,4 @@ unit-test-coverage:
coverage lcov

black:
black qiskit_ibm_runtime setup.py test docs/tutorials program_source
black qiskit_ibm_runtime setup.py test docs/tutorials
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
# The short X.Y version
version = ''
# The full version, including alpha/beta/rc tags
release = '0.14.1'
release = '0.17.0'

docs_url_prefix = "ecosystem/ibm-runtime"

Expand Down
4 changes: 2 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#########################################
Qiskit Runtime 0.14.0 documentation
Qiskit Runtime 0.16.1 documentation
#########################################

Overview
Expand Down Expand Up @@ -32,7 +32,7 @@ This primitive takes circuits as input and returns a quasi-probability distribut

**Error suppression / mitigation**

While building a fault-tolerant quantum computation is the ultimate goal, at present, calculations performed on near-term quantum computers are susceptible to noise. Qiskit Runtime offers several methods for preventing errors before they occur (error suppression techniques) and dealing with those that do occur (error mitigation techniques).
While building a fault-tolerant quantum computation is the ultimate goal, at present, calculations performed on near-term quantum computers are susceptible to noise. Qiskit Runtime offers several methods for preventing errors before they occur (error suppression techniques) and dealing with those that do occur (error mitigation techniques).

**Session**

Expand Down
13 changes: 2 additions & 11 deletions docs/migrate/migrate-setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,9 @@ The module from which the classes are imported has changed. The following table
* - ``qiskit.providers.ibmq.runtime.RuntimeJob``
- ``qiskit_ibm_runtime.RuntimeJob``
-
* - ``qiskit.providers.ibmq.runtime.RuntimeProgram``
- ``qiskit_ibm_runtime.RuntimeProgram``
-
* - ``qiskit.providers.ibmq.runtime.UserMessenger``
- ``qiskit_ibm_runtime.program.UserMessenger``
- Notice the new location, in ``qiskit_ibm_runtime.program``
* - ``qiskit.providers.ibmq.runtime.ProgramBackend``
- ``qiskit_ibm_runtime.program.ProgramBackend``
- Notice the new location, in ``qiskit_ibm_runtime.program``
* - ``qiskit.providers.ibmq.runtime.ResultDecoder``
- ``qiskit_ibm_runtime.program.ResultDecoder``
- Notice the new location, in ``qiskit_ibm_runtime.program``
- ``qiskit_ibm_runtime.utils.ResultDecoder``
- Notice the new location, in ``qiskit_ibm_runtime.utils``
* - ``qiskit.providers.ibmq.runtime.RuntimeEncoder``
- ``qiskit_ibm_runtime.RuntimeEncoder``
-
Expand Down
23 changes: 0 additions & 23 deletions program_source/circuit_runner/circuit_runner.json

This file was deleted.

68 changes: 0 additions & 68 deletions program_source/circuit_runner/circuit_runner.py

This file was deleted.

5 changes: 0 additions & 5 deletions program_source/version.py

This file was deleted.

2 changes: 1 addition & 1 deletion qiskit_ibm_runtime/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.14.1
0.17.0
13 changes: 0 additions & 13 deletions qiskit_ibm_runtime/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,16 +143,6 @@ def result_callback(job_id, result):
job = Sampler(backend).run(ReferenceCircuits.bell(), callback=result_callback)
print(job.result())

.. dropdown:: Uploading a program
:animate: fade-in-slide-down

Authorized users can upload their custom Qiskit Runtime programs.
A Qiskit Runtime program is a piece of Python
code and its metadata that takes certain inputs, performs
quantum and maybe classical processing, and returns the results.

Files related to writing a runtime program are in the
``qiskit_ibm_runtime/program`` directory.

Classes
==========================
Expand All @@ -165,8 +155,6 @@ def result_callback(job_id, result):
Session
IBMBackend
RuntimeJob
RuntimeProgram
ParameterNamespace
RuntimeOptions
RuntimeEncoder
RuntimeDecoder
Expand All @@ -178,7 +166,6 @@ def result_callback(job_id, result):
from .qiskit_runtime_service import QiskitRuntimeService
from .ibm_backend import IBMBackend
from .runtime_job import RuntimeJob
from .runtime_program import RuntimeProgram, ParameterNamespace
from .runtime_options import RuntimeOptions
from .utils.json import RuntimeEncoder, RuntimeDecoder
from .session import Session # pylint: disable=cyclic-import
Expand Down
8 changes: 8 additions & 0 deletions qiskit_ibm_runtime/accounts/management.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@
import os
import ast
from typing import Optional, Dict

from qiskit_ibm_provider.proxies import ProxyConfiguration

from qiskit_ibm_runtime.utils.deprecation import issue_deprecation_msg
from .exceptions import AccountNotFoundError
from .account import Account, ChannelType
from .storage import save_config, read_config, delete_config, read_qiskitrc
Expand Down Expand Up @@ -195,6 +197,12 @@ def get(
return Account.from_saved_format(all_config[account_name])

if os.path.isfile(_QISKITRC_CONFIG_FILE):
issue_deprecation_msg(
msg="Use of the ~/.qiskit/qiskitrc.json file is deprecated.",
version="0.15.0",
remedy="Please use the ~/.qiskit/qiskit-ibm.json file instead.",
period="1 month",
)
return cls._from_qiskitrc_file()

raise AccountNotFoundError("Unable to find account.")
Expand Down
110 changes: 2 additions & 108 deletions qiskit_ibm_runtime/api/clients/runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,74 +47,6 @@ def __init__(
)
self._api = Runtime(self._session)

def list_programs(self, limit: int = None, skip: int = None) -> Dict[str, Any]:
"""Return a list of runtime programs.

Args:
limit: The number of programs to return.
skip: The number of programs to skip.

Returns:
A list of runtime programs.
"""
return self._api.list_programs(limit, skip)

def program_create(
self,
program_data: str,
name: str,
description: str,
max_execution_time: int,
is_public: Optional[bool] = False,
spec: Optional[Dict] = None,
) -> Dict:
"""Create a new program.

Args:
name: Name of the program.
program_data: Program data (base64 encoded).
description: Program description.
max_execution_time: Maximum execution time.
is_public: Whether the program should be public.
spec: Backend requirements, parameters, interim results, return values, etc.

Returns:
Server response.
"""
return self._api.create_program(
program_data=program_data,
name=name,
description=description,
max_execution_time=max_execution_time,
is_public=is_public,
spec=spec,
)

def program_get(self, program_id: str) -> Dict:
"""Return a specific program.

Args:
program_id: Program ID.

Returns:
Program information.
"""
return self._api.program(program_id).get()

def set_program_visibility(self, program_id: str, public: bool) -> None:
"""Sets a program's visibility.

Args:
program_id: Program ID.
public: If ``True``, make the program visible to all.
If ``False``, make the program visible to just your account.

"""
if public:
self._api.program(program_id).make_public()
else:
self._api.program(program_id).make_private()

def program_run(
self,
program_id: str,
Expand Down Expand Up @@ -168,44 +100,6 @@ def program_run(
**hgp_dict,
)

def program_delete(self, program_id: str) -> None:
"""Delete the specified program.

Args:
program_id: Program ID.
"""
self._api.program(program_id).delete()

def program_update(
self,
program_id: str,
program_data: str = None,
name: str = None,
description: str = None,
max_execution_time: int = None,
spec: Optional[Dict] = None,
) -> None:
"""Update a program.

Args:
program_id: Program ID.
program_data: Program data (base64 encoded).
name: Name of the program.
description: Program description.
max_execution_time: Maximum execution time.
spec: Backend requirements, parameters, interim results, return values, etc.
"""
if program_data:
self._api.program(program_id).update_data(program_data)

if any([name, description, max_execution_time, spec]):
self._api.program(program_id).update_metadata(
name=name,
description=description,
max_execution_time=max_execution_time,
spec=spec,
)

def job_get(self, job_id: str, exclude_params: bool = None) -> Dict:
"""Get job data.

Expand Down Expand Up @@ -374,13 +268,13 @@ def list_backends(
"""
return self._api.backends(hgp=hgp, channel_strategy=channel_strategy)["devices"]

def cloud_instance(self) -> bool:
def is_qctrl_enabled(self) -> bool:
"""Returns a boolean of whether or not the instance has q-ctrl enabled.

Returns:
Boolean value.
"""
return self._api.cloud_instance()
return self._api.is_qctrl_enabled()

def backend_configuration(self, backend_name: str) -> Dict[str, Any]:
"""Return the configuration of the IBM backend.
Expand Down
Loading