Skip to content

Commit

Permalink
Merge 4513d55 into e7b2850
Browse files Browse the repository at this point in the history
  • Loading branch information
rathishcholarajan committed Mar 25, 2022
2 parents e7b2850 + 4513d55 commit 3214c5b
Show file tree
Hide file tree
Showing 55 changed files with 997 additions and 531 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ jobs:
matrix:
python-version: [ 3.9 ]
os: [ "ubuntu-latest" ]
environment: [ "legacy-production", "cloud-production" ]
environment: [ "ibm-quantum-production", "ibm-cloud-production" ]
environment: ${{ matrix.environment }}
env:
QISKIT_IBM_TOKEN: ${{ secrets.QISKIT_IBM_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
matrix:
python-version: [ 3.9 ]
os: [ "ubuntu-latest" ]
environment: [ "legacy-production", "legacy-staging", "cloud-production", "cloud-staging" ]
environment: [ "ibm-quantum-production", "ibm-quantum-staging", "ibm-cloud-production", "ibm-cloud-staging" ]
environment: ${{ matrix.environment }}
env:
QISKIT_IBM_TOKEN: ${{ secrets.QISKIT_IBM_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
matrix:
python-version: [ 3.9 ]
os: [ "ubuntu-latest" ]
environment: [ "legacy-production", "legacy-staging", "cloud-production", "cloud-staging" ]
environment: [ "ibm-quantum-production", "ibm-quantum-staging", "ibm-cloud-production", "ibm-cloud-staging" ]
environment: ${{ matrix.environment }}
env:
QISKIT_IBM_TOKEN: ${{ secrets.QISKIT_IBM_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ $ make e2e-test

#### Configuration

Integration and E2E tests require an environment configuration and can either be run against IBM Quantum APIs ("Legacy") or IBM Cloud Quantum Service APIs.
Integration and E2E tests require an environment configuration and can either be run against IBM Quantum APIs ("ibm_quantum") or IBM Cloud ("ibm_cloud") Quantum Service APIs.


Sample configuration for IBM Quantum
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ IBM Cloud API key and Cloud Resource Name (CRN), which you will need for authent
### Qiskit Runtime on IBM Quantum

Prior to becoming an IBM Cloud service, Qiskit Runtime was offered on IBM Quantum. If you have an
existing IBM Quantum account, you can continue using Qiskit Runtime on IBM Quantum, which is referred to as legacy runtime.
existing IBM Quantum account, you can continue using Qiskit Runtime on IBM Quantum.

You will need your IBM Quantum API token to authenticate with the Qiskit Runtime service:

Expand All @@ -65,10 +65,10 @@ them each time. The credentials are saved in the `$HOME/.qiskit/qiskit-ibm.json`
from qiskit_ibm_runtime import IBMRuntimeService

# Save an IBM Cloud account.
IBMRuntimeService.save_account(auth="cloud", token="MY_IBM_CLOUD_API_KEY", instance="MY_IBM_CLOUD_CRN")
IBMRuntimeService.save_account(channel="ibm_cloud", token="MY_IBM_CLOUD_API_KEY", instance="MY_IBM_CLOUD_CRN")

# Save an IBM Quantum account.
IBMRuntimeService.save_account(auth="legacy", token="MY_IBM_QUANTUM_TOKEN")
IBMRuntimeService.save_account(channel="ibm_quantum", token="MY_IBM_QUANTUM_TOKEN")
```

Once the account is saved on disk, you can instantiate the service without any arguments:
Expand Down Expand Up @@ -101,10 +101,10 @@ service with your credentials.
from qiskit_ibm_runtime import IBMRuntimeService

# For an IBM Cloud account.
cloud_service = IBMRuntimeService(auth="cloud", token="MY_IBM_CLOUD_API_KEY", instance="MY_IBM_CLOUD_CRN")
ibm_cloud_service = IBMRuntimeService(channel="ibm_cloud", token="MY_IBM_CLOUD_API_KEY", instance="MY_IBM_CLOUD_CRN")

# For an IBM Quantum account.
legacy_service = IBMRuntimeService(auth="legacy", token="MY_IBM_QUANTUM_TOKEN")
ibm_quantum_service = IBMRuntimeService(channel="ibm_quantum", token="MY_IBM_QUANTUM_TOKEN")
```

## Accessing Qiskit Runtime Programs
Expand Down
8 changes: 4 additions & 4 deletions docs/max_time.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ status as `Cancelled - Ran too long`. The maximum execution time is the
smaller of 1) the system limit and 2) the ``max_execution_time`` defined by the program.
The system limit is defined below:

Qiskit Runtime on IBM Cloud
---------------------------
Qiskit Runtime on IBM Cloud (ibm_cloud)
---------------------------------------

The system limit on the job execution time is 3 hours for a job running on a simulator
and 8 hours for a job running on a physical system.

Qiskit Runtime on IBM Quantum (legacy)
--------------------------------------
Qiskit Runtime on IBM Quantum (ibm_quantum)
-------------------------------------------

The system limit on the job execution time is

Expand Down
1 change: 0 additions & 1 deletion docs/release_notes.rst
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
.. release-notes:: Release Notes
:version: 0.2.0, 0.1.0, 0.1.0rc2, 0.1.0rc1
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
"from qiskit_ibm_runtime import IBMRuntimeService\n",
"\n",
"# Save account on disk.\n",
"# IBMRuntimeService.save_account(auth=\"cloud\", token=<IBM Cloud API key>, instance=<IBM Cloud CRN> or <IBM Cloud service name>)\n",
"# IBMRuntimeService.save_account(channel=\"ibm_cloud\", token=<IBM Cloud API key>, instance=<IBM Cloud CRN> or <IBM Cloud service name>)\n",
"\n",
"service = IBMRuntimeService()"
]
Expand Down Expand Up @@ -689,11 +689,11 @@
"source": [
"There are additional tutorials in this directory:\n",
"\n",
"- [02_introduction_legacy_runtime.ipynb](02_introduction_legacy_runtime.ipynb) is the corresponding tutorial on using legacy Qiskit Runtime. You can skip this tutorial if you don't plan on using legacy runtime.\n",
"- [02_introduction_ibm_quantum_runtime.ipynb](02_introduction_ibm_quantum_runtime.ipynb) is the corresponding tutorial on using Qiskit Runtime on IBM Quantum. You can skip this tutorial if you don't plan on using Qiskit Runtime on IBM Quantum.\n",
"- [03_backends.ipynb](03_backends.ipynb) describes how to find a target backend for the Qiskit Runtime program you want to invoke. \n",
"- [04_account_management.ipynb](04_account_management.ipynb) describes how to save, load, and delete your account credentials on disk.\n",
"- [qiskit_runtime_vqe_program.ipynb](sample_vqe_program/qiskit_runtime_vqe_program.ipynb) goes into more details on uploading a real-world program (VQE). \n",
"- [qka.ipynb](qka.ipynb), [vqe.ipynb](vqe.ipynb), and [qiskit_runtime_expval_program.ipynb](sample_expval_program/qiskit_runtime_expval_program.ipynb) describe how to use the public programs `qka`, `vqe`, and `sample-expval`, respectively. These programs are currently only available on legacy Qiskit Runtime."
"- [qka.ipynb](qka.ipynb), [vqe.ipynb](vqe.ipynb), and [qiskit_runtime_expval_program.ipynb](sample_expval_program/qiskit_runtime_expval_program.ipynb) describe how to use the public programs `qka`, `vqe`, and `sample-expval`, respectively. These programs are currently only available in Qiskit Runtime on IBM Quantum."
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@
"id": "1de4634b",
"metadata": {},
"source": [
"# Legacy Qiskit Runtime"
"# Qiskit Runtime on IBM Quantum"
]
},
{
"cell_type": "markdown",
"id": "5affe56b",
"metadata": {},
"source": [
"Prior to becoming an IBM Cloud service, Qiskit Runtime was offered on IBM Quantum. If you have an existing IBM Quantum account, you can continue using Qiskit Runtime on IBM Quantum, which is referred to as _legacy runtime_. \n"
"Prior to becoming an IBM Cloud service, Qiskit Runtime was offered on IBM Quantum. If you have an existing IBM Quantum account, you can continue using Qiskit Runtime on IBM Quantum. \n"
]
},
{
Expand Down Expand Up @@ -80,7 +80,7 @@
"source": [
"Before you can start using Qiskit Runtime, you need to initialize your account. You can do this by calling `IBMRuntimeService` with your IBM Quantum API token, which can be found on the [IBM Quantum accounts page](https://quantum-computing.ibm.com/account).\n",
"\n",
"You can also choose to save your credentials on disk (in the `$HOME/.qiskit/qiskit-ibm.json` file). By doing so, you only need to use `IBMRuntimeService(auth=\"legacy\")` in the future to initialize your account.\n",
"You can also choose to save your credentials on disk (in the `$HOME/.qiskit/qiskit-ibm.json` file). By doing so, you only need to use `IBMRuntimeService(channel=\"ibm_quantum\")` in the future to initialize your account.\n",
"\n",
"For more information about account management, such as how to delete or view an account, see [04_account_management.ipynb](04_account_management.ipynb)."
]
Expand All @@ -95,10 +95,10 @@
"from qiskit_ibm_runtime import IBMRuntimeService\n",
"\n",
"# Save account on disk.\n",
"# IBMRuntimeService.save_account(auth=\"legacy\", token=<IBM Quantun API token>)\n",
"# IBMRuntimeService.save_account(channel=\"ibm_quantum\", token=<IBM Quantun API token>)\n",
"\n",
"# The \"auth\" keyword is not needed if you have only 1 type (legacy or cloud) of account saved.\n",
"service = IBMRuntimeService(auth=\"legacy\")"
"# The \"channel\" keyword is not needed if you have only 1 type (ibm_quantum or ibm_cloud) of account saved.\n",
"service = IBMRuntimeService(channel=\"ibm_quantum\")"
]
},
{
Expand Down Expand Up @@ -417,7 +417,7 @@
"metadata": {},
"source": [
"<div class=\"alert alert-block alert-info\">\n",
"<b>Note:</b> To ensure fairness, there is a maximum execution time for each Qiskit Runtime job. Refer to <a href=\"https://qiskit.org/documentation/partners/qiskit_ibm_runtime/max_time.html#qiskit-runtime-on-ibm-quantum-legacy\">this documentation</a> on what the time limit is.\n",
"<b>Note:</b> To ensure fairness, there is a maximum execution time for each Qiskit Runtime job. Refer to <a href=\"https://qiskit.org/documentation/partners/qiskit_ibm_runtime/max_time.html#qiskit-runtime-on-ibm-quantum-ibm-quantum\">this documentation</a> on what the time limit is.\n",
"</div>"
]
},
Expand Down Expand Up @@ -535,7 +535,7 @@
"- [04_account_management.ipynb](04_account_management.ipynb) describes how to save, load, and delete your account credentials on disk.\n",
"- [05_uploading_program.ipynb](05_uploading_program.ipynb) is an introduction on uploading your custom Qiskit Runtime program.\n",
"- [qiskit_runtime_vqe_program.ipynb](sample_vqe_program/qiskit_runtime_vqe_program.ipynb) goes into more details on uploading a real-world program (VQE). \n",
"- [qka.ipynb](qka.ipynb), [vqe.ipynb](vqe.ipynb), and [qiskit_runtime_expval_program.ipynb](sample_expval_program/qiskit_runtime_expval_program.ipynb) describe how to use the public programs `qka`, `vqe`, and `sample-expval`, respectively. These programs are currently only available on legacy Qiskit Runtime."
"- [qka.ipynb](qka.ipynb), [vqe.ipynb](vqe.ipynb), and [qiskit_runtime_expval_program.ipynb](sample_expval_program/qiskit_runtime_expval_program.ipynb) describe how to use the public programs `qka`, `vqe`, and `sample-expval`, respectively. These programs are currently only available on Qiskit Runtime on IBM Quantum."
]
},
{
Expand Down
7 changes: 3 additions & 4 deletions docs/tutorials/03_backends.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,8 @@
}
],
"source": [
"# This program currently is only available on legacy Qiskit Runtime.\n",
"legacy_service = IBMRuntimeService(auth=\"legacy\")\n",
"program = legacy_service.program(\"hello-world\")\n",
"ibm_quantum_service = IBMRuntimeService(channel=\"ibm_quantum\")\n",
"program = ibm_quantum_service.program(\"hello-world\")\n",
"print(program.backend_requirements)"
]
},
Expand Down Expand Up @@ -269,7 +268,7 @@
}
],
"source": [
"legacy_service.backends(min_num_qubits=5)"
"ibm_quantum_service.backends(min_num_qubits=5)"
]
},
{
Expand Down
14 changes: 7 additions & 7 deletions docs/tutorials/04_account_management.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"id": "c22a29f4",
"metadata": {},
"source": [
"Qiskit Runtime is available on both IBM Cloud and IBM Quantum. The former requires an IBM Cloud account and the latter an IBM Quantum account. If you don't have these accounts, please refer to [01_introduction_cloud_runtime.ipynb](01_introduction_cloud_runtime.ipynb) or [02_introduction_legacy_runtime.ipynb](02_introduction_legacy_runtime.ipynb) on how to set one up.\n",
"Qiskit Runtime is available on both IBM Cloud and IBM Quantum. The former requires an IBM Cloud account and the latter an IBM Quantum account. If you don't have these accounts, please refer to [01_introduction_ibm_cloud_runtime.ipynb](01_introduction_ibm_cloud_runtime.ipynb) or [02_introduction_ibm_quantum_runtime.ipynb](02_introduction_ibm_quantum_runtime.ipynb) on how to set one up.\n",
"\n"
]
},
Expand Down Expand Up @@ -74,7 +74,7 @@
"id": "bfb828ec",
"metadata": {},
"source": [
"Below are examples of saving an IBM Cloud and an IBM Quantum accounts. The `auth` parameter indicates the authentication type of the account. If you are saving multiple account, consider using the `name` parameter to differentiate them.\n"
"Below are examples of saving an IBM Cloud and an IBM Quantum accounts. The `channel` parameter indicates the authentication type of the account. If you are saving multiple account, consider using the `name` parameter to differentiate them.\n"
]
},
{
Expand All @@ -87,10 +87,10 @@
"from qiskit_ibm_runtime import IBMRuntimeService\n",
"\n",
"# Save an IBM Cloud account on disk.\n",
"# IBMRuntimeService.save_account(auth=\"cloud\", token=<IBM Cloud API key>, instance=<IBM Cloud CRN> or <IBM Cloud service name>)\n",
"# IBMRuntimeService.save_account(channel=\"ibm_cloud\", token=<IBM Cloud API key>, instance=<IBM Cloud CRN> or <IBM Cloud service name>)\n",
"\n",
"# Save an IBM Quantum account on disk.\n",
"# IBMRuntimeService.save_account(auth=\"legacy\", token=<IBM Quantum API token>)"
"# IBMRuntimeService.save_account(channel=\"ibm_quantum\", token=<IBM Quantum API token>)"
]
},
{
Expand Down Expand Up @@ -125,7 +125,7 @@
"id": "9a4504f8",
"metadata": {},
"source": [
"If you have both an IBM Cloud and an IBM Quantum accounts saved, `IBMRuntimeService()` by default will load the IBM Cloud account. To load the IBM Quantum account, you can specify `IBMRuntimeService(auth=\"legacy\")` instead.\n",
"If you have both an IBM Cloud and an IBM Quantum accounts saved, `IBMRuntimeService()` by default will load the IBM Cloud account. To load the IBM Quantum account, you can specify `IBMRuntimeService(channel=\"ibm_quantum\")` instead.\n",
"\n",
"Alternatively, if you specified a `name` for your account when saving it, you can also specify the name of the account to load."
]
Expand All @@ -138,7 +138,7 @@
"outputs": [],
"source": [
"# Save an IBM Cloud account on disk and give it a name.\n",
"# IBMRuntimeService.save_account(auth=\"cloud\", token=<IBM Cloud API key>, instance=<IBM Cloud CRN>, name=\"prod\")\n",
"# IBMRuntimeService.save_account(channel=\"ibm_cloud\", token=<IBM Cloud API key>, instance=<IBM Cloud CRN>, name=\"prod\")\n",
"\n",
"# service = IBMRuntimeService(name=\"prod\")"
]
Expand All @@ -159,7 +159,7 @@
"outputs": [],
"source": [
"# Initialize an IBM Cloud account without saving it.\n",
"# service = IBMRuntimeService(auth=\"cloud\", token=<IBM Cloud API key>, instance=<IBM Cloud CRN>)"
"# service = IBMRuntimeService(channel=\"ibm_cloud\", token=<IBM Cloud API key>, instance=<IBM Cloud CRN>)"
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions docs/tutorials/qka.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"source": [
"# Load your account and get the quantum backend\n",
"\n",
"We'll be using the 27-qubit device `ibmq_montreal` for this tutorial on legacy Qiskit Runtime."
"We'll be using the 27-qubit device `ibmq_montreal` for this tutorial in Qiskit Runtime on IBM Quantum."
]
},
{
Expand All @@ -104,7 +104,7 @@
"\n",
"from qiskit_ibm_runtime import IBMRuntimeService\n",
"\n",
"service = IBMRuntimeService(auth=\"legacy\")\n",
"service = IBMRuntimeService(channel=\"ibm_quantum\")\n",
"backend = service.backend(\"ibmq_montreal\")"
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@
"source": [
"from qiskit_ibm_runtime import IBMRuntimeService\n",
"\n",
"service = IBMRuntimeService(auth=\"legacy\")"
"service = IBMRuntimeService(channel=\"ibm_quantum\")"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/vqe.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@
"source": [
"from qiskit_ibm_runtime import IBMRuntimeService\n",
"\n",
"service = IBMRuntimeService(auth=\"legacy\")"
"service = IBMRuntimeService(channel=\"ibm_quantum\")"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion qiskit_ibm_runtime/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
on disk.
Qiskit Runtime is available on both IBM Cloud and IBM Quantum, and you can specify
``auth="cloud"`` for IBM Cloud and ``auth="legacy"`` for IBM Quantum. The default
``channel="ibm_cloud"`` for IBM Cloud and ``channel="ibm_quantum"`` for IBM Quantum. The default
is IBM Cloud.
Listing runtime programs
Expand Down
2 changes: 1 addition & 1 deletion qiskit_ibm_runtime/accounts/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
Account management functionality related to the IBM Runtime Services.
"""

from .account import Account, AccountType
from .account import Account, AccountType, ChannelType
from .management import AccountManager
from .exceptions import (
AccountNotFoundError,
Expand Down
Loading

0 comments on commit 3214c5b

Please sign in to comment.