Skip to content

Commit

Permalink
Changed naming from Quantum Serverless to Qiskit Serverless (#1292)
Browse files Browse the repository at this point in the history
## Background

As Serverless is integrating into the Qiskit stack, we want to rebrand
Quantum Serverless --> Qiskit Serverless to match. This specific PR
changes naming only, but we have a later PR to adjust how we talk about
Serverless and Patterns, common configuration elements like dependency
management, etc.

## Merge Date

**Do not merge yet**

We have to finish the [Github / PyPi side of things for Qiskit
Serverless](Qiskit/qiskit-serverless#1307)
before this PR is merged. We expect everything to be merged latest by
**May 20th**

## Stakeholders

@Eric-Arellano, we'd need a redirect since the page URL is changing

---------

Co-authored-by: abbycross <across@us.ibm.com>
  • Loading branch information
pandasa123 and abbycross authored May 14, 2024
1 parent 3737830 commit f4bf88a
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion docs/run-new/_toc.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
]
},
{
"title": "Quantum Serverless workloads",
"title": "Qiskit Serverless workloads",
"url": "/run/quantum-serverless"
},
{
Expand Down
2 changes: 1 addition & 1 deletion docs/run-new/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ Step 3 in Qiskit Patterns, "Execute on target hardware," centers around the [Qis

In addition to detailed information on primitives, you can read about the available execution modes in this section. While you can always submit a single job at a time, you can also use Runtime Primitives to run jobs in a [session](/run/sessions) or in [batch mode](/run/run-jobs-batch). These execution modes assist your utility-scale jobs to run efficiently.

This section also includes a page about our [processor types](/run/processor-types), how to [monitor jobs](/run/monitor-job) and [get information about our systems with the Qiskit SDK](/run/get-backend-information), details about [Quantum Serverless](/run/quantum-serverless), and more.
This section also includes a page about our [processor types](/run/processor-types), how to [monitor jobs](/run/monitor-job) and [get information about our systems with the Qiskit SDK](/run/get-backend-information), details about [Qiskit Serverless](/run/quantum-serverless), and more.

[^1]: Median 2Q gate errors measured over all accessible Eagle processors from July 20 to September 20, 2023.
2 changes: 1 addition & 1 deletion docs/run/_toc.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
"url": "/run/visualize-results"
},
{
"title": "Quantum Serverless workloads",
"title": "Qiskit Serverless workloads",
"url": "/run/quantum-serverless"
},
{
Expand Down
42 changes: 21 additions & 21 deletions docs/run/quantum-serverless.mdx
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
---
title: Run workloads remotely with Quantum Serverless
description: How to run quantum computing workloads remotely using Quantum Serverless.
title: Run workloads remotely with Qiskit Serverless
description: How to run quantum computing workloads remotely using Qiskit Serverless on IBM Quantum.
---

# Run workloads remotely with Quantum Serverless
# Run workloads remotely with Qiskit Serverless

Premium users can build, deploy, and run their workloads remotely on classical compute made available through the IBM Quantum&trade; Platform.

Try out the tutorials in [IBM Quantum Learning](https://learning.quantum.ibm.com/catalog/tutorials?topics=qiskit-patterns) (note: these are accessible in the Premium Plan once you have logged into your IBM Quantum account) and explore more of the features of Quantum Serverless in the [documentation](https://qiskit.github.io/qiskit-serverless/).
Try out the tutorials in [IBM Quantum Learning](https://learning.quantum.ibm.com/catalog/tutorials?topics=qiskit-patterns) (note: these are accessible in the Premium Plan once you have logged into your IBM Quantum account) and explore more of the features of Qiskit Serverless in the [documentation](https://qiskit.github.io/qiskit-serverless/).


<Admonition type="note">
This is an experimental feature, subject to change.
</Admonition>

## Qiskit Patterns with Quantum Serverless
## Building Qiskit Patterns with Qiskit Serverless

Creating utility-scale quantum applications generally requires a variety of compute resource requirements. You can use Quantum Serverless to easily submit quantum workflows for remote, managed execution. These quantum workflows can typically be implemented within a common pattern, called a Qiskit Pattern. A Qiskit Pattern is an intuitive, repeatable set of steps for implementing a quantum computing workflow.
Creating utility-scale quantum applications generally requires a variety of compute resource requirements. You can use Qiskit Serverless to easily submit quantum workflows for remote, managed execution on IBM Quantum Platform. These quantum workflows can typically be implemented within a common pattern, called a Qiskit Pattern. A Qiskit Pattern is an intuitive, repeatable set of steps for implementing a quantum computing workflow.

Steps in a Qiskit Pattern:

Expand All @@ -25,11 +25,11 @@ Steps in a Qiskit Pattern:
3. Execute using Qiskit Runtime primitives
4. Post-process, return result in classical format

Once you have built a Qiskit Pattern, you can use Quantum Serverless to deploy it and submit it for managed execution. Overall, the process of creating quantum software and submitting it for managed execution on a remote cluster can be broken down into three steps:
Once you have built a Qiskit Pattern, you can use Qiskit Serverless to deploy it and submit it for managed execution. Overall, the process of creating quantum software and submitting it for managed execution on a remote cluster can be broken down into three steps:

1. Build the Qiskit Pattern
2. Deploy to the Quantum Serverless
3. Run remotely on Quantum Serverless
2. Deploy to the Qiskit Serverless
3. Run remotely on Qiskit Serverless

## Build a Qiskit Pattern

Expand All @@ -43,7 +43,7 @@ from qiskit.transpiler.preset_passmanagers import generate_preset_pass_manager
from qiskit.circuit.random import random_circuit
from qiskit.quantum_info import SparsePauliOp
from qiskit_ibm_runtime import QiskitRuntimeService
from quantum_serverless import save_result
from qiskit_serverless import save_result

service = QiskitRuntimeService()
backend = service.least_busy(simulator=False)
Expand Down Expand Up @@ -89,11 +89,11 @@ After creating a workflow, authenticate to the `IBMServerlessProvider` with your

```python
# Authenticate to the IBM serverless provider
from quantum_serverless import IBMServerlessProvider
from qiskit_serverless import IBMServerlessProvider
serverless = IBMServerlessProvider("YOUR_IBM_QUANTUM_TOKEN")

# Deploy the pattern
from quantum_serverless import QiskitPattern
from qiskit_serverless import QiskitPattern
serverless.upload(
QiskitPattern(
title="My-Qiskit-Pattern",
Expand All @@ -103,7 +103,7 @@ serverless.upload(
)
```

## Run a Qiskit Pattern remotely on Quantum Serverless
## Run a Qiskit Pattern remotely on Qiskit Serverless

Finally, the pattern is ready to run remotely.

Expand All @@ -119,15 +119,15 @@ job.result()

## Migration guide

Qiskit Runtime custom programs can be easily migrated to Quantum Serverless via this [migration guide](https://qiskit.github.io/qiskit-serverless/migration/migration_from_qiskit_runtime_programs.html).
Qiskit Runtime custom programs can be easily migrated to Qiskit Serverless via this [migration guide](https://qiskit.github.io/qiskit-serverless/migration/migration_from_qiskit_runtime_programs.html).

## Resource management (alpha)

Premium Plan users have access to an alpha release of resource management functionality through Quantum Serverless. This enables automatic selection of quantum hardware for your workloads.
Premium Plan users have access to an alpha release of resource management functionality through Qiskit Serverless. This enables automatic selection of quantum hardware for your workloads.

The example below demonstrates how to use `IBMQPUSelector` to automate the process of selecting which qubits will be used from a set of available systems. This illustrates how the selectors can be used within a four-step Qiskit Pattern.

Instead of manually selecting a system, step 2 of the Qiskit Pattern optimizes the circuits for execution by using the QPU selectors from Quantum Serverless to automatically allocate a system according to desired criteria. Here, `IBMLeastNoisyQPUSelector` finds the system, among the ones available to you through your IBM Quantum account, that yields the least-noisy qubit subgraph for the input circuit. You can also use the `IBMLeastBusyQPUSelector` to find a system that can support the circuit width but with the shortest queue.
Instead of manually selecting a system, step 2 of the Qiskit Pattern optimizes the circuits for execution by using the QPU selectors from Qiskit Serverless to automatically allocate a system according to desired criteria. Here, `IBMLeastNoisyQPUSelector` finds the system, among the ones available to you through your IBM Quantum account, that yields the least-noisy qubit subgraph for the input circuit. You can also use the `IBMLeastBusyQPUSelector` to find a system that can support the circuit width but with the shortest queue.

For each `IBMQPUSelector`, the context is set in the constructor. All `IBMQPUSelectors` require Qiskit Runtime credentials. The `IBMLeastNoisyQPUSelector` requires a circuit and transpile options specifying how the circuit should be optimized for each system when determining the most optimal QPU and qubit layout. All `IBMQPUSelector`s implement a `get_backend` method, which retrieves the optimal system with respect to the given context. The `get_backend` method also allows for additional filtering of the systems. It is implemented using the same interface as the [QiskitRuntimeService.backends method](/api/qiskit-ibm-runtime/qiskit_ibm_runtime.QiskitRuntimeService#backends).

Expand All @@ -140,7 +140,7 @@ Then, in step 3 of the pattern, you execute the target circuit on the system cho

from qiskit_ibm_runtime import QiskitRuntimeService, Session, Samplerv2 as Sampler
from qiskit.circuit.random import random_circuit
from quantum_serverless_tools.selectors import IBMLeastNoisyQPUSelector
from qiskit_serverless_tools.selectors import IBMLeastNoisyQPUSelector

service = QiskitRuntimeService()

Expand All @@ -158,7 +158,7 @@ target_circuit = selector.optimized_circuit

## Alternatively, one can automatically select a system according to most available:
# from qiskit.transpiler.preset_passmanagers import generate_preset_pass_manager
# from quantum_serverless_tools.selectors import IBMLeastBusyQPUSelector
# from qiskit_serverless_tools.selectors import IBMLeastBusyQPUSelector
#
# backend = IBMLeastBusyQPUSelector(service).get_backend(min_num_qubits=127)
# pm = generate_preset_pass_manager(optimization_level=3, backend=backend)
Expand All @@ -184,7 +184,7 @@ save_result(result)

from qiskit_ibm_runtime import QiskitRuntimeService, Session, Sampler, Options
from qiskit.circuit.random import random_circuit
from quantum_serverless_tools.selectors import IBMLeastNoisyQPUSelector
from qiskit_serverless_tools.selectors import IBMLeastNoisyQPUSelector

service = QiskitRuntimeService()

Expand All @@ -202,7 +202,7 @@ target_circuit = selector.optimized_circuit

## Alternatively, one can automatically select a system according to most available:
# from qiskit.transpiler.preset_passmanagers import generate_preset_pass_manager
# from quantum_serverless_tools.selectors import IBMLeastBusyQPUSelector
# from qiskit_serverless_tools.selectors import IBMLeastBusyQPUSelector
#
# backend = IBMLeastBusyQPUSelector(service).get_backend(min_num_qubits=127)
# pm = generate_preset_pass_manager(optimization_level=3, backend=backend)
Expand All @@ -228,4 +228,4 @@ save_result(result)
</TabItem>
</Tabs>

After creating this pattern, you can deploy and run it remotely with Quantum Serverless as described above.
After creating this pattern, you can deploy and run it remotely with Qiskit Serverless as described above.

0 comments on commit f4bf88a

Please sign in to comment.