Sync Functions from closed source (#1947)

Note that we do not test the notebooks in CI.
This commit is contained in:
Eric Arellano 2024-09-16 09:28:23 -04:00 committed by GitHub
parent f49316ed93
commit 3d5c6a3a37
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
33 changed files with 4951 additions and 38 deletions

View File

@ -43,6 +43,31 @@
"title": "Hello world",
"url": "/guides/hello-world"
},
{
"title": "Development workflow",
"children": [
{
"title": "Introduction to Qiskit patterns",
"url": "/guides/intro-to-patterns"
},
{
"title": "Map problem to circuits",
"url": "/guides/map-problem-to-circuits"
},
{
"title": "Optimize for hardware",
"url": "/guides/optimize-for-hardware"
},
{
"title": "Execute on hardware",
"url": "/guides/execute-on-hardware"
},
{
"title": "Post-process results",
"url": "/guides/post-process-results"
}
]
},
{
"title": "Latest updates",
"url": "/guides/latest-updates"
@ -51,27 +76,45 @@
"collapsible": false
},
{
"title": "Workflow",
"title": "Qiskit Functions",
"children": [
{
"title": "Introduction to Qiskit patterns",
"url": "/guides/intro-to-patterns"
"title": "Introduction to Qiskit Functions",
"url": "/guides/functions"
},
{
"title": "Map problem to circuits",
"url": "/guides/map-problem-to-circuits"
"title": "Circuit functions",
"children": [
{
"title": "IBM Circuit function",
"url": "/guides/ibm-circuit-function"
},
{
"title": "Algorithmiq Tensor Error Mitigation",
"url": "/guides/algorithmiq-tem"
},
{
"title": "Q-CTRL Performance Management",
"url": "/guides/q-ctrl-performance-management"
},
{
"title": "QEDMA QESEM",
"url": "/guides/qedma-qesem"
}
]
},
{
"title": "Optimize for hardware",
"url": "/guides/optimize-for-hardware"
},
{
"title": "Execute on hardware",
"url": "/guides/execute-on-hardware"
},
{
"title": "Post-process results",
"url": "/guides/post-process-results"
"title": "Application functions",
"children": [
{
"title": "Q-CTRL Optimization Solver",
"url": "/guides/q-ctrl-optimization-solver"
},
{
"title": "QunaSys QURI Chemistry",
"url": "/guides/qunasys-quri-chemistry"
}
]
}
],
"collapsible": false
@ -477,6 +520,10 @@
}
]
},
{
"title": "Qiskit addons",
"url": "/guides/addons"
},
{
"title": "Qiskit Code Assistant",
"children": [
@ -498,4 +545,4 @@
"collapsible": false
}
]
}
}

42
docs/guides/addons.mdx Normal file
View File

@ -0,0 +1,42 @@
---
title: Qiskit addons
description: Understand the Qiskit addon tools, which help you build utility-grade quantum workflows.
---
# Qiskit addons
Qiskit addons are a collection of research capabilities for enabling algorithm discovery at the utility scale. These capabilities build on Qiskit's performant foundation of tools for creating and running quantum algorithms. They are provided as modular software components that can plug into a [workflow](/guides/intro-to-patterns) to scale or design new quantum algorithms.
## Addons for mapping
### Multi-product formulas
Multi-product formulas (MPF) reduce the Trotter error of Hamiltonian dynamics through a weighted combination of several circuit executions.
- Visit the [GitHub repository.](https://github.com/Qiskit/qiskit-addon-mpf)
- Read the [documentation.](https://qiskit.github.io/qiskit-addon-mpf)
## Addons for optimizing
### Operator backpropagation
Operator backpropagation (OBP) reduces circuit depth by trimming operations from the end at the cost of more operator measurements.
- Visit the [GitHub repository.](https://github.com/Qiskit/qiskit-addon-obp)
- Read the [documentation.](https://qiskit.github.io/qiskit-addon-obp)
### Circuit cutting
Circuit cutting reduces the depth of transpiled circuits by decomposing entangling gates between non-adjacent qubits.
- Visit the [GitHub repository.](https://github.com/Qiskit/qiskit-addon-cutting)
- Read the [documentation.](https://qiskit.github.io/qiskit-addon-cutting)
## Addons for post-processing
### Sample-based quantum diagonalization
Sample-based quantum diagonalization (SQD) classically post-processes noisy quantum samples to yield more accurate eigenvalue estimations of quantum system Hamiltonians, for example in chemistry applications.
- Visit the [GitHub repository.](https://github.com/Qiskit/qiskit-addon-sqd)
- Read the [documentation.](https://qiskit.github.io/qiskit-addon-sqd)

View File

@ -0,0 +1,285 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "f7d9993f",
"metadata": {},
"source": [
"{/* cspell:ignore POVM, mathbf, Filippov, Lindblad, Leahy, Rossi, García, Pérez */}"
]
},
{
"cell_type": "markdown",
"id": "dde95705",
"metadata": {},
"source": [
"# Tensor Error Mitigation (TEM): A Qiskit Function by Algorithmiq\n",
"\n",
"## Overview\n",
"\n",
"The Tensor Error Mitigation (TEM) function computes expectation values of quantum circuits and observables by post-processing noise-induced errors in estimations of physical observables.\n",
"\n",
"The method consists of constructing a tensor network representing the inverse of the global noise channel affecting the state of the quantum processor, and then applying the map to informationally complete measurement outcomes obtained from the noisy state.\n",
"\n",
"As an advantage, TEM leverages informationally complete measurements to give access to a vast set of mitigated expectation values of observables and has optimal sampling\n",
"overhead on the quantum hardware [1]. TEM can also be advantageous with respect to purely classical tensor network methods, giving accurate results with a smaller computational cost than a classical-only tensor network approach.\n",
"\n",
"See reference [1] for further details.\n",
"\n",
"#### References\n",
"\n",
"1. S. Filippov, M. Leahy, M. A. C. Rossi, G. García-Pérez, Scalable tensor-network error mitigation for near-term quantum computing, [arXiv:1111.6950](https://arxiv.org/abs/2307.11740) [quant-ph]"
]
},
{
"cell_type": "markdown",
"id": "5f761442",
"metadata": {},
"source": [
"## Function description\n",
"\n",
"\n",
"The TEM function takes a noisy circuit with the noisy layers identified. The circuit is measured with an informationally complete positive operator-valued measure (IC-POVM), and the collected measurement outcomes are processed on a classical computer. This measurement is used to perform the tensor network methods and build a noise-inversion map $\\mathcal{N}^{-1}$. The function applies a map $\\mathcal{M}$ that fully inverts the whole noisy circuit using matrix product operators to represent the noisy layers.\n",
"\n",
"![TEM schematics](/images/guides/algorithmiq-tem/tem_scheme.svg \"Error-mitigated estimation of an observable O via post-processing measurement outcomes of the noisy quantum processor. U and N denote an ideal quantum operation and the associated noise map, which can be generally non-local (and extended to grey boxes). D stands for a tensor of operators that are dual to the effects in the IC measurement. The noise mitigation module M is a tensor network that is efficiently contracted from the middle out. The first iteration of the contraction is represented by the dotted purple line, the second one by the dashed line, and the third one by the solid line.\")\n",
"\n",
"To mitigate the noise, the algorithm performs a contraction that starts from the middle (where the inverted noisy circuit ends and the ideal circuit starts) and propagates outward by involving two layers on the left side and one layer on the right side at each iteration. Therefore, the noisy circuit output state $\\rho$ is reverted back to $(\\vert 0 \\rangle\\langle0\\vert)^{\\otimes N}$, which in turn is mapped to the ideal noiseless state operator $\\vert\\psi\\rangle\\langle \\psi\\vert$.\n",
"\n",
"The noise-mitigated estimation of an observable ${O}$ is then read as\n",
"$$\n",
"\\bar{O}_{\\text{n}.\\text{m}} = \\frac{1}{S} \\sum_{\\mathbf{k}} \\text{tr} [\\mathcal{M}(D_{\\mathbf{k}})O] = \\frac{1}{S} \\sum_{\\mathbf{k}} \\text{tr} [D_{\\mathbf{k}}\\mathcal{M}^{\\dagger}(O)],\n",
"$$\n",
"where $D\\mathbf{k}$ is the dual operator of the corresponding POVM associated with a measurement shot $\\mathbf{k}$ in a set of $S$ shots.\n",
"\n",
"\n",
"The algorithm is described in further detail in [Filippov et al. (2023)](https://arxiv.org/abs/2307.11740).\n",
"\n",
"\n",
"### Methods\n",
"\n",
"#### run\n",
"\n",
"`run(pubs,options)`\n",
"\n",
"\n",
"The run() method allows computing the expectation values for a primitive unified bloc (PUB) containing a circuit and a list of observables.\n",
"\n",
"**Parameters**\n",
"Name | Type | Description | Required | Example\n",
"-- | -- | -- | -- | --\n",
"pubs | Iterable[EstimatorPubLike] | An iterable of PUB-like (primitive unified bloc) objects, such as tuples `(circuit, observables)` or `(circuit, observables, parameter_values)`. See [Overview of PUBs](/guides/primitive-input-output#overview-of-pubs) for more information. The circuits dont need to be ISA circuits. | Yes | (circuit, observables, parameter_values)\n",
"instance | str | The hub/group/project to use in that format. | No | \"hub1/group1/project1\"\n",
"options | dict | Input options. See `Options` section for more details. | No | \\{\"optimization_level\": 3\\}\n",
"\n",
"**Options**\n",
"\n",
"A dictionary containing the options for the TEM. The dictionary should contain the following keys:\n",
"\n",
"Name | Type | Description | Example\n",
"-- | -- | -- | --\n",
"backend_name | str | Name of the backend to make the query.| \"ibm_fez\"\n",
"simulate_with_noise_model | bool | A Boolean flag indicating whether to simulate the noisy circuit or not.| False\n",
"max_bond_dimension | int | The maximum bond dimension to be used for MPOs. | True\n",
"tem_compression_cutoff | float | The cutoff value to be used for MPOs. | 1e-16\n",
"num_max_shots | int | The maximum number of shots. | 10_000\n",
"num_randomizations | int | The number of randomizations to be used for gate twirling. | 32\n",
"mitigate_readout_error | bool | A Boolean flag indicating whether to perform QDT readout error mitigation or not. | 24\n",
"num_readout_calibration_shots | int | The number of shots to be used for QDT readout error mitigation. | 1000\n",
"logging_level | str | The logging level to be used for the TEM runner. | \"INFO\"\n",
"\n",
"**Returns**\n",
"\n",
"A PubResult containing the TEM mitigated result:\n",
"\n",
"\n",
"Name |Type | Description\n",
"-- | -- | --\n",
"data | DataBin | A DataBin containing the TEM mitigated observable and its standard error. The DataBin has the following fields: <ul><li>`observable`: The TEM mitigated observable value.</li><li>`observable_stderr`: The standard error of the TEM mitigated observable.</li></ul>\n",
"metadadata | dict | A dictionary containing additional results. The dictionary contains the following keys: <ul><li>`\"observable_non_mitigated\"`: The observable value without error mitigation.</li><li>`\"observable_non_mitigated_stderr\"`: The standard error of the result without error mitigation.</li><li>`\"observable_simulated\"`: If its computation is enabled in the TEM options, contains the result obtained by simulating the circuit with the learned noise.</li></ul>"
]
},
{
"cell_type": "markdown",
"id": "73390a19",
"metadata": {},
"source": [
"## Get started\n",
"\n",
"Authenticate using your [IBM Quantum&trade; Platform API token](http://quantum.ibm.com/), and select the TEM as follows:"
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "95a715d2",
"metadata": {},
"outputs": [],
"source": [
"from qiskit_ibm_catalog import QiskitFunctionsCatalog\n",
"\n",
"tem_function_name = \"algorithmiq/tem\"\n",
"catalog = QiskitFunctionsCatalog(token = \"<YOUR_IQP_API_TOKEN>\")\n",
"\n",
"# Load your function\n",
"tem = catalog.load(tem_function_name)"
]
},
{
"cell_type": "markdown",
"id": "e8837f5f",
"metadata": {},
"source": [
"## Example\n",
"\n",
"\n",
"The following snippet shows an example where TEM is used to compute the expectation values of an observable given a simple quantum circuit."
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "d56e1440",
"metadata": {},
"outputs": [],
"source": [
"from qiskit import QuantumCircuit\n",
"from qiskit.quantum_info import SparsePauliOp\n",
"from qiskit_ibm_runtime import QiskitRuntimeService\n",
"\n",
"# Create a quantum circuit\n",
"qc = QuantumCircuit(3)\n",
"qc.u(0.4, 0.9, -0.3, 0)\n",
"qc.u(-0.4, 0.2, 1.3, 1)\n",
"qc.u(-1.2, -1.2, 0.3, 2)\n",
"for _ in range(2):\n",
" qc.barrier()\n",
" qc.cx(0, 1)\n",
" qc.cx(2, 1)\n",
" qc.barrier()\n",
" qc.u(0.4, 0.9, -0.3, 0)\n",
" qc.u(-0.4, 0.2, 1.3, 1)\n",
" qc.u(-1.2, -1.2, 0.3, 2)\n",
"\n",
"# Define the observables\n",
"observable = SparsePauliOp(\"YXZ\", 1.0)\n",
"\n",
"# Define the execution options\n",
"service = QiskitRuntimeService()\n",
"backend_name = service.least_busy(operational=True)\n",
"\n",
"instance = \"<IQP_HUB/IQP_GROUP/IQP_PROJECT>\"\n",
"\n",
"pub = (qc, observable)\n",
"options = {\n",
" \"backend_name\": backend_name,\n",
" \"num_max_shots\": 100,\n",
"}\n",
"job = tem.run(instance=instance, pub=pub, options=options)"
]
},
{
"cell_type": "markdown",
"id": "03998691",
"metadata": {},
"source": [
"The following code checks your Qiskit Function workload's status or return results:"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "856fe992",
"metadata": {},
"outputs": [],
"source": [
"print(job.status())\n",
"result = job.result()"
]
},
{
"cell_type": "markdown",
"id": "e2817b13",
"metadata": {},
"source": [
"## Advanced options\n",
"\n",
"You can fine-tune your calculations and get more verbose information by passing additional options to TEM."
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "c2ce65e3",
"metadata": {},
"outputs": [],
"source": [
"import logging\n",
"\n",
"options = {\n",
" \"backend_name\": backend_name,\n",
" \"num_max_shots\": 1_000,\n",
" \"simulate_with_noise_model\": True,\n",
" \"mitigate_readout_error\": True,\n",
" \"num_readout_calibration_shots\": 10_000,\n",
" \"logging_level\": logging.WARNING\n",
" }\n",
"\n",
"\n",
"job = tem.run(instance = instance, pub = pub, options = options)"
]
},
{
"cell_type": "markdown",
"id": "e9ec2e67",
"metadata": {},
"source": [
"## Get support\n",
"\n",
"Reach out to [qiskit_ibm@algorithmiq.fi](mailto:qiskit_ibm@algorithmiq.fi)\n",
"\n",
"Be sure to include the following information:\n",
"- Qiskit Function Job ID (`qiskit-ibm-catalog`), `job.job_id`\n",
"- A detailed description of the issue\n",
"- Any relevant error messages or codes\n",
"- Steps to reproduce the issue"
]
},
{
"cell_type": "markdown",
"id": "5a6a25c8",
"metadata": {},
"source": [
"## Next steps\n",
"\n",
"<Admonition type=\"tip\" title=\"Recommendations\">\n",
"\n",
"- [Request access to Algorithmiq Tensor Error Mitigation](https://quantum.ibm.com/functions?id=4b1b9d76-c18b-4788-b70b-15125111fbe6)\n",
"\n",
"</Admonition>"
]
}
],
"metadata": {
"description": "Introduction to TEM, a Qiskit Function by Algorithmiq, to compute estimations with software post-processing error mitigation using tensor networks.",
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3"
},
"title": "Tensor Error Mitigation (TEM) - A Qiskit Function by Algorithmiq"
},
"nbformat": 4,
"nbformat_minor": 5
}

320
docs/guides/functions.ipynb Normal file
View File

@ -0,0 +1,320 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "a47ac9aa-4bb9-4240-806e-9beabfd2dda2",
"metadata": {},
"source": [
"# Introduction to Qiskit Functions\n",
"\n",
"Qiskit Functions simplify and accelerate utility-scale algorithm discovery and application development, by abstracting away parts of the quantum software development workflow. In this way, Qiskit Functions free up time normally spent hand-writing code and fine-tuning experiments.\n",
"\n",
"![Overview of Qiskit Functions](/images/guides/functions/functions-overview.svg)\n",
"Functions come in two forms:\n",
"\n",
"| Type | What does it do? | Example inputs and outputs | Who is it for? |\n",
"| - | - | - | - |\n",
"| Circuit function | Simplified interface for running circuits. Abstracts transpilation, error suppression, error mitigation | **Input**: Abstract `PUB`s <br/> **Output**: Mitigated expectation values | Researchers using Qiskit to discover new algorithms and applications, without needing to focus on optimizing for hardware or handling error. Circuit functions can be used to build custom application functions. |\n",
"| Application function | Covers higher-level tasks, like exploring algorithms and domain-specific use cases. Abstracts quantum workflow to solve tasks, with classical inputs and outputs | **Input**: Molecules, graphs <br/> **Output**: Energy, cost | Researchers in non-quantum domains, integrating quantum into existing large-scale classical workflows, without needing to map classical data to quantum circuits. |"
]
},
{
"cell_type": "markdown",
"id": "df18227b-787a-4dc6-a8c7-7abd0f67110c",
"metadata": {},
"source": [
"Functions are provided by IBM&reg; and third-party partners. Each is performant for specific workload characteristics and have unique performance-tuning options. Premium Plan users can get started with IBM Qiskit Functions for free, or procure a license from one of the partners who have contributed a function to the catalog.\n",
"\n",
"## Get started with Qiskit Functions\n",
"\n",
"### Install Qiskit Functions Catalog client\n",
"\n",
"To start using Qiskit Functions, install the IBM Qiskit Functions Catalog client:\n",
"\n",
"`pip install qiskit-ibm-catalog`\n",
"\n",
"Once installed, authenticate using your [IBM Quantum&trade; Platform API token](http://quantum.ibm.com/) as follows:"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "be135691-adee-4a1c-98bf-e76deb12319f",
"metadata": {},
"outputs": [],
"source": [
"from qiskit_ibm_catalog import QiskitFunctionsCatalog\n",
"\n",
"catalog = QiskitFunctionsCatalog(token='<YOUR_IQP_API_TOKEN>')"
]
},
{
"cell_type": "markdown",
"id": "42843fcd-1779-4a74-8d6a-7d00c22e374e",
"metadata": {},
"source": [
"Optionally, you can use the `save_account()` method to save your credentials for easy access later on, before initializing the service. This saves your credentials in the same place as `QiskitRuntimeService.save_account()`, so you can skip this step if you had previously used `QiskitRuntimeService` to save your account. *Note that account credentials are saved in plain text, so only do so if you are using a trusted device.*"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "54fc48c8-3a65-478c-9bc3-ec6eb4db425a",
"metadata": {},
"outputs": [],
"source": [
"from qiskit_ibm_catalog import QiskitFunctionsCatalog\n",
"\n",
"# This can be skipped if you previously did QiskitRuntimeService.save_account()\n",
"QiskitFunctionsCatalog.save_account(token=\"<YOUR_IQP_API_TOKEN>\")"
]
},
{
"cell_type": "markdown",
"id": "5154cbea-ccfa-42ea-a9ef-c31699c3b2c0",
"metadata": {},
"source": [
"Once you have authenticated, you can list the functions from the Qiskit Functions Catalog that you have access to:"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "55b73ad8-6e3b-4b76-8ba5-ae7ea339ffcc",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[QiskitFunction(ibm/circuit-function)]\n"
]
}
],
"source": [
"catalog.list()"
]
},
{
"cell_type": "markdown",
"id": "a1c73799-30ec-44dc-b4b9-06e59d521d8c",
"metadata": {},
"source": [
"### Run enabled functions\n",
"\n",
"Once a catalog object has been instantiated, you can select a function using `catalog.load(provider/function-name)`:"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "4ac22236-2a34-46fb-890f-30d6ba70081e",
"metadata": {},
"outputs": [],
"source": [
"ibm_cf = catalog.load('ibm/circuit-function')"
]
},
{
"cell_type": "markdown",
"id": "deb844d3-051a-4db1-b0a1-4ba9801ef95e",
"metadata": {},
"source": [
"Each Qiskit Function has custom inputs, options, and outputs. Check the specific documentation pages for the function you want to run for more information. By default, all users can only run one function job at a time:"
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "9b9a7a3c-cc98-4c19-93cd-f59793515c70",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"0ede4d0f-06d6-4360-86a1-5028ca511b3f\n"
]
}
],
"source": [
"job = ibm_cf.run(\n",
" instance=...,\n",
" pubs=[],\n",
" backend=\"backend_name\"\n",
")\n",
"\n",
"job.job_id"
]
},
{
"cell_type": "markdown",
"id": "b1518e8e-04ea-4e4e-9f30-10f87dd4ee82",
"metadata": {},
"source": [
"### Check job status\n",
"\n",
"<Admonition type=\"tip\">\n",
"Currently, the IBM Quantum workloads table only reflects Qiskit Runtime workloads. Use `job.status()` to see your Qiskit Function workload's current status.\n",
"</Admonition>\n",
"\n",
"With your Qiskit Function `job_id`, you can check the status of running jobs. This includes the following statuses:\n",
"\n",
"- **`QUEUED`**: The remote program is in the Qiskit Function queue. The queue priority is based on how much you've used Qiskit Functions.\n",
"- **`INITIALIZING`**: The remote program is starting; this includes setting up the remote environment and installing dependencies.\n",
"- **`RUNNING`**: The program is running.\n",
"- **`DONE`**: The program is complete, and you can retrieve data stored in `save_result()` with `job.results()`."
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "d811be20-cf0d-4070-a126-b40af6a33132",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"'DONE'\n"
]
}
],
"source": [
"job.status()"
]
},
{
"cell_type": "markdown",
"id": "8e6528b5-c36f-48e1-bb2f-2416ccb12902",
"metadata": {},
"source": [
"### Retrieve results\n",
"\n",
"Once a program is `DONE`, you can use `job.results()` to fetch the result. This output format varies with each function, so be sure to follow the specific documentation:"
]
},
{
"cell_type": "code",
"execution_count": 9,
"id": "04f6a446-fbc6-438a-bc07-00fc9d551d83",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"PubResult(data=DataBin(evs=np.ndarray(<shape=(20,), dtype=float64>), stds=np.ndarray(<shape=(20,), dtype=float64>), evs_noise_factors=np.ndarray(<shape=(20, 3), dtype=float64>), stds_noise_factors=np.ndarray(<shape=(20, 3), dtype=float64>), ensemble_stds_noise_factors=np.ndarray(<shape=(20, 3), dtype=float64>), evs_extrapolated=np.ndarray(<shape=(20, 2, 4), dtype=float64>), stds_extrapolated=np.ndarray(<shape=(20, 2, 4), dtype=float64>), shape=(20,)), metadata={'shots': 4096, 'target_precision': 0.015625, 'circuit_metadata': {}, 'resilience': {'zne': {'extrapolator': array(['exponential', 'exponential', 'exponential', 'exponential',\n",
" 'exponential', 'exponential', 'exponential', 'exponential',\n",
" 'exponential', 'exponential', 'exponential', 'exponential',\n",
" 'exponential', 'exponential', 'exponential', 'exponential',\n",
" 'exponential', 'exponential', 'exponential', 'exponential'],\n",
" dtype='<U11')}, 'layer_noise': {'noise_overhead': 1, 'total_mitigated_layers': 0, 'unique_mitigated_layers': 0, 'unique_mitigated_layers_noise_overhead': []}}, 'num_randomizations': 32})\n",
" \n"
]
}
],
"source": [
"result = job.result()\n",
"print(result)"
]
},
{
"cell_type": "markdown",
"id": "76c32136-f449-454c-896b-ff9d0edf9abc",
"metadata": {},
"source": [
"At any time, you can also cancel a job:"
]
},
{
"cell_type": "code",
"execution_count": 10,
"id": "7ddc2394-64a9-4fdd-bb3d-7729433fcd9c",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"'Job has been stopped.'\n"
]
}
],
"source": [
"job.stop()"
]
},
{
"cell_type": "markdown",
"id": "5b5d7c8d-7a96-41e2-93aa-528513acdd21",
"metadata": {},
"source": [
"### List previously run jobs run with Qiskit Functions\n",
"\n",
"You can use `jobs()` to list all jobs submitted to Qiskit Functions:"
]
},
{
"cell_type": "code",
"execution_count": 11,
"id": "c1a2832b-1ca3-4ef1-9a8a-3f3804b3aedf",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[<Job | 0ede4d0f-06d6-4360-86a1-5028ca511b3f>,\n",
" <Job | abf78e9a-b554-4e38-966a-f99cff877b8c>,\n",
" <Job | 90e1109e-809f-4768-a2dc-f45bf71a97b4>,\n",
" <Job | 313050f2-aa78-4d7d-99f4-44bdfe98e4d7>]\n"
]
}
],
"source": [
"old_jobs = catalog.jobs()\n",
"old_jobs"
]
},
{
"cell_type": "markdown",
"id": "7c8c3e5d-1de2-4fed-be03-d134dc3fd907",
"metadata": {},
"source": [
"## Next steps\n",
"\n",
"<Admonition type=\"info\" title=\"Recommendations\">\n",
"\n",
"- [Explore circuit functions](./ibm-circuit-function) to build new algorithms and applications, without needing to manage transpilation or error handling.\n",
"- [Explore application functions](./q-ctrl-optimization-solver) to solve domain-specific tasks, with classical inputs and outputs.\n",
"\n",
"</Admonition>"
]
}
],
"metadata": {
"description": "Explore IBM Qiskit Functions Catalog, abstracted circuit function and application function services designed to accelerate research and application prototyping.",
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3"
},
"title": "Introduction to Qiskit Functions"
},
"nbformat": 4,
"nbformat_minor": 2
}

View File

@ -0,0 +1,306 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "dde95705",
"metadata": {},
"source": [
"# IBM Circuit function\n",
"\n",
"## Overview\n",
"\n",
"The IBM&reg; Circuit function takes [abstract PUBs](./primitive-input-output) as inputs, and returns mitigated expectation values as outputs. This circuit function includes an automated and customized pipeline to enable researchers to focus on algorithm and application discovery."
]
},
{
"cell_type": "markdown",
"id": "5f761442",
"metadata": {},
"source": [
"## Description\n",
"\n",
"After submitting your PUB, your abstract circuits and observables are automatically transpiled, executed on hardware, and post-processed to return mitigated expectation values. To do so, this combines the following tools:\n",
"\n",
"- [Qiskit Transpiler Service](./qiskit-transpiler-service), including auto-selection of AI-driven and heuristic transpilation passes to translate your abstract circuits to [hardware-optimized ISA circuits](/guides/optimize-for-hardware)\n",
"- [Error suppression and mitigation required for utility-scale computation](./error-mitigation-and-suppression-techniques), including measurement and gate twirling, dynamical decoupling, Twirled Readout Error eXtinction (TREX), Zero-Noise Extrapolation (ZNE), and Probabilistic Error Amplification (PEA)\n",
"- [Qiskit Runtime Estimator](./get-started-with-primitives), to execute ISA PUBs on hardware and return mitigated expectation values\n",
"\n",
"![IBM Circuit function](/images/guides/ibm-circuit-function/ibm-circuit-function.svg)"
]
},
{
"cell_type": "markdown",
"id": "73390a19",
"metadata": {},
"source": [
"## Get started"
]
},
{
"cell_type": "markdown",
"id": "f46c531c",
"metadata": {},
"source": [
"Authenticate using your [IBM Quantum&trade; Platform API token](http://quantum.ibm.com/), and select the Qiskit Function as follows:"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "95a715d2",
"metadata": {},
"outputs": [],
"source": [
"from qiskit_ibm_catalog import QiskitFunctionCatalog\n",
"\n",
"catalog = QiskitFunctionCatalog()\n",
"ibm_cf = catalog.load(\"ibm/circuit-function\")"
]
},
{
"cell_type": "markdown",
"id": "e8837f5f",
"metadata": {},
"source": [
"## Example\n",
"\n",
" To get started, try this basic example:"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "d56e1440",
"metadata": {},
"outputs": [],
"source": [
"from qiskit.circuit.random import random_circuit\n",
"from qiskit_ibm_runtime import QiskitRuntimeService\n",
"\n",
"# You can skip this step if you have a target backend, e.g.\n",
"# backend_name = \"ibm_sherbrooke\"\n",
"# You'll need to specify the credentials when initializing QiskitRuntimeService, if they were not previously saved.\n",
"service = QiskitRuntimeService()\n",
"backend = service.least_busy(operational=True, simulator=False)\n",
"\n",
"circuit = random_circuit(num_qubits=2, depth=2, seed=42)\n",
"observable = \"Z\" * circuit.num_qubits\n",
"pubs = [(circuit, observable)]\n",
"\n",
"job = function.run(\n",
" backend=backend.name, # Or `backend=backend_name`, if you didn't initialize a backend object\n",
" pubs=pubs\n",
")"
]
},
{
"cell_type": "markdown",
"id": "03998691",
"metadata": {},
"source": [
"Check your Qiskit Function workload's [status](/guides/functions#check-job-status) or return [results](/guides/functions#retrieve-results) as follows:"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "856fe992",
"metadata": {},
"outputs": [],
"source": [
"print(job.status())\n",
"result = job.result()"
]
},
{
"cell_type": "markdown",
"id": "eda36356",
"metadata": {},
"source": [
"The results have the same format as an [Estimator result](https://docs.quantum.ibm.com/guides/primitive-input-output#estimator-output):"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "765f3207",
"metadata": {},
"outputs": [],
"source": [
"print(f'The result of the submitted job had {len(result)} PUB and has a value:\\n {result}\\n')\n",
"print(f'The associated PubResult of this job has the following DataBins:\\n {result[0].data}\\n')\n",
"print(f'And this DataBin has attributes: {result[0].data.keys()}')\n",
"print(f'The expectation values measured from this PUB are: \\n{result[0].data.evs}')"
]
},
{
"cell_type": "markdown",
"id": "73815ae7",
"metadata": {},
"source": [
"## Parameters\n",
"\n",
"See the following table for all input parameters the IBM Circuit function accepts. The subsequent [Options](#options) section goes into more details about the available `options`."
]
},
{
"cell_type": "markdown",
"id": "c1f4e687",
"metadata": {},
"source": [
"| Name | Type | Description | Required | Example |\n",
"|-|-|-|-|-|\n",
"| backend | str | Name of the backend to make the query. | Yes | \"ibm_fez\" |\n",
"| pubs | Iterable[EstimatorPubLike] | An iterable of PUB-like (primitive unified bloc) objects, such as tuples `(circuit, observables)` or `(circuit, observables, parameter_values)`. See [Overview of PUBs](/guides/primitive-input-output#overview-of-pubs) for more information. The circuits dont need to be ISA circuits. | Yes | (circuit, observables, parameter_values) |\n",
"| precision | float | The target precision for expectation value estimates of each run Estimator PUB that does not specify its own precision. | No | 0.1 |\n",
"| options | dict | Input options. See `Options` section for more details. | No | `{\"optimization_level\": 3}` |\n",
"| instance | str | The hub/group/project to use in that format. | No | \"hub1/group1/project1\" |"
]
},
{
"cell_type": "markdown",
"id": "a1072bd6",
"metadata": {},
"source": [
"### Options\n",
"\n",
"#### Structure\n",
"\n",
"Similar to Qiskit Runtime primitives, options for IBM Circuit function can be specified as a nested dictionary. Commonly used options, such as ``optimization_level`` and ``mitigation_level``, are at the first level. Other, more advanced options are grouped into different categories, such as ``resilience``.\n",
"\n",
"#### Defaults\n",
"\n",
"If you do not specify a value for an option, the default value specified by the service is used.\n",
"\n",
"#### Mitigation level\n",
"\n",
"IBM Circuit function also supports `mitigation_level`. The mitigation level specifies how much error suppression and mitigation to apply to the job. Higher levels generate more accurate results, at the expense of longer processing times. The degree of error reduction depends on the method applied. The mitigation level abstracts the detailed choice of error mitigation and suppression methods to allow users to reason about the cost/accuracy trade-off appropriate to their application. The following table shows the corresponding methods for each level.\n",
"\n",
"<Admonition type=\"note\">\n",
"While the names are similar, `mitigation_level` applies different techniques than the ones used by Estimators `resilience_level`.\n",
"</Admonition>\n",
"\n",
"Similar to ``resilience_level`` in Qiskit Runtime Estimator, ``mitigation_level`` specifies a base set of curated options. Any options you manually specify in addition to the mitigation level are applied on top of the base set of options defined by the mitigation level. Therefore, in principle, you could set the mitigation level to 1, but then turn off measurement mitigation, although this is not advised.\n",
"\n",
"| **Mitigation Level** | **Technique** |\n",
"|:-:|:-:|\n",
"| 1 [Default] | Dynamical decoupling + measurement twirling + TREX |\n",
"| 2 | Level 1 + gate twirling + ZNE via gate folding |\n",
"| 3 | Level 1 + gate twirling + ZNE via PEA |\n",
"\n",
"The following example demonstrates setting the mitigation level:"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "13443be4",
"metadata": {},
"outputs": [],
"source": [
"options = {\"mitigation_level\": 2}\n",
"\n",
"job = function.run(\n",
" backend=backend.name,\n",
" pubs=pubs,\n",
" options=options\n",
")"
]
},
{
"cell_type": "markdown",
"id": "c823d7b3",
"metadata": {},
"source": [
"#### All available options\n",
"\n",
"In addition to `mitigation_level`, the IBM Circuit function also provides a select number of advanced options that allow you to fine-tune the cost/accuracy trade-off. The following table shows all the available options:\n",
"\n",
"| Option | Sub-option | Sub-sub-option | Description | Choices | Default |\n",
"|-|-|-|-|-|-|\n",
"| default_precision | | | The default precision to use for any PUB or `run()`<br/>call that does not specify one.<br/>Each input PUB can specify its own precision. If the `run()` method is given a precision, then that value is used for all PUBs in the `run()` call that do not specify their own. | float > 0 | 0.015625 |\n",
"| max_execution_time | | | Maximum execution time in seconds, which is based<br/>on QPU usage (not wall clock time). QPU usage is the<br/>amount of time that the QPU is dedicated to processing your job. If a job exceeds this time limit, it is forcibly canceled. | Integer number of seconds in the range [1, 10800] | |\n",
"| mitigation_level | | | How much error suppression and mitigation to apply. Refer to the [Mitigation level](#mitigation-level) section for more information about the methods used at each level. | 1 / 2 / 3 | 1 |\n",
"| optimization_level | | | How much optimization to perform on the circuits. [Higher levels](/guides/set-optimization) generate more optimized circuits, at the expense of longer transpilation time. | 0 / 1 / 2 / 3 | 2 |\n",
"| dynamical_decoupling | enable | | Whether to enable dynamical decoupling. Refer to [Error suppression and mitigation techniques](/guides/error-mitigation-and-suppression-techniques#dynamical-decoupling) for the explanation of the method. | True/False | True |\n",
"| | sequence_type | | Which dynamical decoupling sequence to use.<br/>* `XX`: use the sequence `tau/2 - (+X) - tau - (+X) - tau/2`<br/>* `XpXm`: use the sequence `tau/2 - (+X) - tau - (-X) - tau/2`<br/>* `XY4`: use the sequence<br/>`tau/2 - (+X) - tau - (+Y) - tau (-X) - tau - (-Y) - tau/2` | 'XX'/'XpXm'/'XY4' | 'XX' |\n",
"| twirling | enable_gates | | Whether to apply 2-qubit Clifford gate twirling. | True/False | False |\n",
"| | enable_measure | | Whether to enable twirling of measurements. | True/False | True |\n",
"| resilience | measure_mitigation | | Whether to enable TREX measurement error mitigation method. Refer to [Error suppression and mitigation techniques](/guides/error-mitigation-and-suppression-techniques#twirled-readout-error-extinction-trex) for the explanation of the method. | True/False | True |\n",
"| | zne_mitigation | | Whether to turn on Zero Noise Extrapolation error mitigation method. Refer to [Error suppression and mitigation techniques](/guides/error-mitigation-and-suppression-techniques#zero-noise-extrapolation-zne) for the explanation of the method. | True/False | False |\n",
"| | zne | amplifier | Which technique to use for amplifying noise. One of: <br/> - `gate_folding` (default) uses 2-qubit gate folding to amplify noise. If the noise factor requires amplifying only a subset of the gates, then these gates are chosen randomly.<br/><br/> - `gate_folding_front` uses 2-qubit gate folding to amplify noise. If the noise factor requires amplifying only a subset of the gates, then these gates are selected from the front of the topologically ordered DAG circuit.<br/><br/> - `gate_folding_back` uses 2-qubit gate folding to amplify noise. If the noise factor requires amplifying only a subset of the gates, then these gates are selected from the back of the topologically ordered DAG circuit.<br/><br/> - `pea` uses a technique called Probabilistic error amplification (PEA) to amplify noise. Refer to [Error suppression and mitigation techniques](/guides/error-mitigation-and-suppression-techniques#probabilistic-error-amplification-pea) for the explanation of the method. | gate_folding / gate_folding_front / gate_folding_back / pea | gate_folding |\n",
"| | | noise_factors | Noise factors to use for noise amplification. | list of floats; each float >= 1 | (1, 1.5, 2) for PEA, and (1, 3, 5) otherwise. |\n",
"| | | extrapolator | Noise factors to evaluate the fit extrapolation models at. This option does not affect execution or model fitting in any way; it only determines the points at which the `extrapolator`s are evaluated to be returned in the data fields called `evs_extrapolated` and `stds_extrapolated`. | one or more of `exponential`,`linear`, `double_exponential`,`polynomial_degree_(1 <= k <= 7)` | (`exponential`, `linear`) |\n",
"| | pec_mitigation | | Whether to turn on Probabilistic Error Cancellation error mitigation method. Refer to [Error suppression and mitigation techniques](/guides/error-mitigation-and-suppression-techniques#probabilistic-error-cancellation-pec) for the explanation of the method. | True/False | False |\n",
"| | pec | max_overhead | The maximum circuit sampling overhead allowed, or `None` for no maximum. | None/ integer >1 | 100 |\n",
"\n",
"In the following example, setting the mitigation level to 1 initially turns off ZNE mitigation, but setting `zne_mitigation` to `True` overrides the relevent setup from `mitigation_level`."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "b2632bd9",
"metadata": {},
"outputs": [],
"source": [
"options = {\n",
" \"mitigation_level\": 1,\n",
" \"resilience\": {\"zne_mitigation\": True}\n",
"}"
]
},
{
"cell_type": "markdown",
"id": "32db1269",
"metadata": {},
"source": [
"## Get support\n",
"\n",
"Reach out to [IBM Quantum support](https://docs.quantum.ibm.com/support), and include the following information:\n",
"\n",
"- Qiskit Function Job ID (`qiskit-ibm-catalog`), `job.job_id`\n",
"- A detailed description of the issue\n",
"- Any relevant error messages or codes\n",
"- Steps to reproduce the issue"
]
},
{
"cell_type": "markdown",
"id": "0439eef4",
"metadata": {},
"source": [
"## Next steps\n",
"\n",
"<Admonition type=\"tip\" title=\"Recommendations\">\n",
"\n",
"- Try the [Building workflows with the IBM Circuit function](https://learning.quantum.ibm.com/tutorial/building-workflows-with-the-ibm-circuit-function) tutorial.\n",
"\n",
"</Admonition>"
]
}
],
"metadata": {
"description": "Explore how to use the IBM Circuit function, with AI-driven transpilation and advanced error mitigation (TREX, ZNE, PEA)",
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3"
},
"title": "IBM Circuit function"
},
"nbformat": 4,
"nbformat_minor": 5
}

View File

@ -46,14 +46,30 @@ Qiskit Runtime also includes three types of execution modes for running your qua
### Is Qiskit Runtime open-source?
The short answer is, _not all of it_. The Qiskit Runtime service software that handles the technicalities of running your quantum program on an IBM Quantum device (including any error mitigation and suppression) is **not** open-source. However, the Qiskit Runtime client (the interface for users to access the Qiskit Runtime service), the Qiskit SDK running on the server side, and some of the software used for error mitigation, **are** open-source. To get involved with the Qiskit open-source efforts, visit our GitHub organization at [github.com/Qiskit](https://github.com/Qiskit) and [github.com/Qiskit-Extensions](https://github.com/Qiskit-Extensions/).
## Qiskit Serverless
Creating utility-scale quantum applications generally requires a variety of compute resource requirements. Premium users can use Qiskit Serverless (package name `qiskit-serverless`) to easily submit quantum workflows for remote, managed execution. See more information [here](./serverless) about how to use this collection of tools.
Creating utility-scale quantum applications generally requires a variety of compute resource requirements. Qiskit Serverless (`qiskit-ibm-catalog.QiskitServerless`) provides a simple interface to run workloads across quantum-classical resources. This includes deploying programs to IBM Quantum Platform and running workloads remotely, as well as easy resource management for multi-cloud and quantum-centric supercomputing use cases. See more information in the [Qiskit Serverless documentation](/guides/serverless) about how to use this collection of tools to:
- Parallelize classical tasks, such as pre-processing and post-processing
- Persist long-running workloads in the cloud, even if your laptop is turned off
- Deploy reusable programs in the cloud
## Qiskit Functions
Qiskit Functions (`qiskit-ibm-catalog.QiskitFunctionsCatalog`) are abstracted services designed to accelerate algorithm discovery and application prototyping. Explore the [Qiskit Functions Catalog](https://quantum.ibm.com/functions), including:
- **Circuit functions**: Services that include transpilation, error suppression, error mitigation, and post-processing techniques that take abstract circuits and desired measurement observables as input. With Circuit functions, users can discover new algorithms and applications without needing to manage transpilation or quantum hardware performance.
- **Application functions**: Services that include entire quantum workflows, from mapping classical to quantum, optimizing for hardware, execution on hardware, and post-processing. Users can prototype industry applications with domain-familiar inputs and outputs.
Premium Plan members can access IBM-provided functions right away, or purchase licenses for the partner-provided functions directly from those partners.
## Qiskit Transpiler as a Service
The Qiskit Transpiler Service ([package name `qiskit-ibm-transpiler`](https://pypi.org/project/qiskit-ibm-transpiler/)) is a new experimental service that provides remote transpilation capabilities on the cloud to IBM Quantum Premium Plan users. In addition to the local Qiskit SDK transpiler capabilities, your transpilation tasks can benefit from both IBM Quantum cloud resources and AI-powered transpiler passes using this service. To learn more about how to integrate cloud-based transpilation into your Qiskit workflow you can [check out the documentation](./qiskit-transpiler-service).
## Qiskit addons
Qiskit addons are a collection of research capabilities for utility-scale algorithm discovery. These capabilities build upon Qiskits performant foundation of tools for creating and running quantum algorithms. Addons are modular software components that plug into a workflow to scale or design new quantum algorithms. To learn more about the set of available Qiskit addons and how to get started using them, visit the [documentation](/guides/addons).
## The Qiskit ecosystem

View File

@ -62,6 +62,20 @@ As the field moves from bespoke circuit construction to utility-scale workflows,
* [Manage Qiskit Serverless compute and data resources](./serverless-manage-resources)
* [Port code to Qiskit Serverless](./serverless-port-code)
### Qiskit Functions
[Qiskit Functions](/guides/functions) abstract away parts of the quantum software development workflow, and in the case of the application functions, they cover all the Qiskit patterns steps.
- [Introduction to Qiskit Functions](/guides/functions)
- Circuit functions:
- [IBM Circuit function](/guides/ibm-circuit-function)
- [Algorithmiq Tensor Error Mitigation](/guides/algorithmiq-tem)
- [Q-CTRL Performance Management](/guides/q-ctrl-performance-management)
- [QEDMA QESEM](/guides/qedma-qesem)
- Application functions:
- [Q-CTRL Optimization Solver](/guides/q-ctrl-optimization-solver)
- [QunaSys QURI Chemistry](/guides/qunasys-quri-chemistry)
## Next steps
<Admonition type="tip" title="Recommendations">

View File

@ -5,7 +5,7 @@ description: The latest updates from Qiskit and IBM Quantum, including the lates
# Latest updates
*Last updated 6 September 2024*
*Last updated 16 September 2024*
{/* remember to update the date in the previous line each time this page is updated!!! */}
Keep up with the latest and greatest from Qiskit and IBM Quantum&trade;! Gathered here are the the most recent Qiskit package release summaries, documentation updates, blogs, community events, and more.
@ -63,6 +63,12 @@ On the IBM Quantum blog, we take a deep dive into the new beta release with a sp
{/* no other release notes available yet */}
### Qiskit Functions Catalog Service Client v0.1.0
Introducing the Qiskit Functions preview, for IBM Quantum Premium Plan users. To get started, `pip install qiskit-ibm-catalog`, and explore the [Qiskit Functions documentation](./functions). With the Qiskit Functions Catalog client, you can submit workloads to abstracted services designed to accelerate your research - sign in with your existing IBM Quantum Platform credentials.
Premium Plan users can get started right away with the IBM&reg; Circuit function, or request access to circuit or application functions from our partners.
## Qiskit Runtime service updates
This summary of the latest changes to the Qiskit Runtime service applies to anyone using Qiskit Runtime, regardless of how you communicate with the service (using qiskit-ibm-runtime or otherwise), or which version of the client SDK you use.
@ -92,6 +98,34 @@ Probabilistic error amplification (PEA) error mitigation method is now available
Qiskit Runtime primitives now support OpenQASM 3 as the input format for circuits and standard JSON output format. See [Qiskit Runtime REST API](/api/runtime) for examples.
## Qiskit Functions Catalog updates
### 16 September 2024
The Qiskit Functions Catalog preview provides access to Premium Plan users to explore the available functions, including those written by IBM and those written by other members of our ecosystem. The catalog contains two kinds of functions: circuit functions and application functions.
- **Circuit functions** provide a simplified interface for running circuits. They receive user-provided abstract circuits and observables as input, then manage synthesis, optimization, and execution of the representative ISA circuit. Circuit functions bring together the latest capabilities in transpilation, error suppression, and error mitigation to make utility-grade performance accessible out of the box. This allows computational scientists to focus on mapping their problems to circuits, rather than building the pattern for each problem from scratch.
- **Application functions** cover higher-level tasks, like exploring algorithms and domain-specific use cases. Enterprise developers and data scientists may not have the background quantum information science knowledge for working with circuits, and instead hope to bring their domain knowledge to advance quantum computing algorithms and applications. With application functions, users can enter their classical inputs and receive solutions so they can more easily experiment with plugging quantum into their domain-specific workflows.
With the launch of the Qiskit Functions Catalog, Premium Plan developers will be able to start exploring the IBM Circuit function. The IBM Circuit function includes the latest AI-powered extensions to Qiskit for circuit synthesis, optimization, and scheduling, as well as advanced error mitigation methods to return the most accurate estimations possible with today's hardware.
Users can purchase licenses for the following functions contributed by our partners at Q-CTRL, QEDMA, Algorithmiq, and Qunasys.
## Circuit functions
- Q-CTRL is releasing a circuit function that applies AI-driven quantum control techniques, with which users can scale successfully to larger problems.
- Algorithmiq is releasing a circuit function that applies TEM (tensor network error mitigation), an error mitigation method for obtaining estimators with fewer shots than the PEC (probabilistic error cancellation) method.
- QEDMA is releasing a circuit function that uses proprietary protocols for efficient and accurate characterization of the noisy QPU operations, and applies error suppression and error mitigation based on the characterization data.
## Application functions
- QunaSys is releasing a chemistry application function comprising three algorithms meant to solve the ground state energy estimation (GSEE) problem.
- Q-CTRL is also releasing an optimization solver with which users can pass a graph or an objective, and receive solution costs.
To get started, explore the [Qiskit Functions documentation](./functions).
## IBM Quantum blog: Qiskit Serverless sets the stage for Qiskit Functions in the cloud
*Browse all blogs at the [IBM Quantum blog page](https://www.ibm.com/quantum/blog).*

View File

@ -47,3 +47,10 @@ The output of this step in a Qiskit pattern is normally a collection of circuits
* [OpenQASM 3 and the Qiskit SDK](./interoperate-qiskit-qasm3)
* [OpenQASM 3 feature table](./qasm-feature-table)
* [OpenQASM 3.x live specification](https://openqasm.com/)
### Qiskit Functions
[Qiskit Functions](/guides/functions) abstract away parts of the quantum software development workflow. These Application functions cover all the Qiskit patterns steps:
- [Q-CTRL Optimization Solver](/guides/q-ctrl-optimization-solver)
- [QunaSys QURI Chemistry](/guides/qunasys-quri-chemistry)

View File

@ -52,3 +52,12 @@ can be run on IBM&reg; hardware using IBM Qiskit Runtime.
* [Build noise models](./build-noise-models)
* [Plot quantum states](./plot-quantum-states)
* [Efficient simulation of stabilizer circuits with Qiskit Aer primitives](./simulate-stabilizer-circuits)
### Qiskit Functions
[Qiskit Functions](/guides/functions) abstract away parts of the quantum software development workflow. These Circuit functions cover both the optimize and execute steps of a Qiskit pattern:
- [IBM Circuit function](/guides/ibm-circuit-function)
- [Algorithmiq Tensor Error Mitigation](/guides/algorithmiq-tem)
- [Q-CTRL Performance Management](/guides/q-ctrl-performance-management)
- [QEDMA QESEM](/guides/qedma-qesem)

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,545 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "dde95705",
"metadata": {},
"source": [
"# Performance Management: A Qiskit Function by Q-CTRL Fire Opal\n",
"\n",
"## Overview\n",
"\n",
"Fire Opal Performance Management makes it simple for anyone to achieve meaningful results from quantum computers at scale without needing to be quantum hardware experts. When running circuits with Fire Opal Performance Management, the function automatically applies AI-driven error suppression techniques for successfully scaling to larger problems, using more gates and qubits on the device. At the same time, reaching the correct answer takes fewer shots and requires no overhead, meaning that you save on compute time and cost.\n",
"\n",
"Performance Management suppresses errors and increases the probability of getting the correct answer on noisy hardware. In other words, it increases the signal-to-noise ratio. The following image shows how increased accuracy enabled by Performance Management can reduce the need for additional shots in the case of a 10-qubit Quantum Fourier Transform algorithm. With only 30 shots, Q-CTRL reaches the 99% confidence threshold, whereas the default (`QiskitRuntime` Sampler, `optimization_level`=3 and `resilience_level`=1, `ibm_sherbrooke`) requires 170,000 shots. By getting the right answer faster, you save significant compute runtime.\n",
"\n",
"![Visualization of the improved runtime](/images/guides/qctrl-performance-management/achieve_more.svg)\n",
"\n",
"The Performance Management function can be used in place of the standard [Qiskit Runtime primitives](./primitives). Behind the scenes, multiple error suppression techniques work together to prevent errors from happening at runtime. All Fire Opal pipeline methods are pre-configured and algorithm-agnostic, meaning you always get the best performance out of the box.\n",
"\n",
"To get access to Performance Management, [contact Q-CTRL](https://form.typeform.com/to/JKHcaxlv?typeform-source=q-ctrl.com#product=Fire%20Opal)."
]
},
{
"cell_type": "markdown",
"id": "5f761442",
"metadata": {},
"source": [
"## Function description\n",
"\n",
"Fire Opal Performance Management has two options for execution that are similar to the Qiskit Runtime primitives, so you can easily swap in the Q-CTRL Sampler and Estimator. The general workflow for using the Performance Management function is:\n",
"1. Define your circuit (and operators in the case of the Estimator).\n",
"2. Run the circuit.\n",
"3. Retrieve the results.\n",
"\n",
"To reduce hardware noise, Fire Opal employs a range of AI-driven error suppression techniques depicted in the following image. Error suppression works at both the gate and pulse levels to address various sources of noise and to prevent the likelihood of an error occurring. With Fire Opal, the entire pipeline is completely automated with zero need for configuration. By preventing errors, the need for expensive post-processing is eliminated.\n",
"\n",
"The following image depicts the error suppression methods automated by Fire Opal Performance Management.\n",
"\n",
"![Visualization of the error suppression pipeline](/images/guides/qctrl-performance-management/error_suppression.svg)"
]
},
{
"cell_type": "markdown",
"id": "b364970b",
"metadata": {},
"source": [
"## Inputs and outputs\n",
"The Sampler and Estimator inputs are meant to closely follow the implemented spec for [Qiskit Runtime V2 primitives](../migration-guides/v2-primitives). The Q-CTRL primitives accept inputs in the form of Primitive Unified Blocs (PUBs), which are tuples containing circuits and their relevant execution data. For more information on the PUB data structure, refer to the [IBM Quantum Documentation](./primitive-input-output). The main difference is that the Q-CTRL primitives accept PUBs containing basic types - for example, QASM strings, dictionaries, and so on.\n",
"\n",
"<Admonition type=\"caution\">Fire Opal Performance Management accepts abstract circuits, in contrast to the native Qiskit Runtime primitives, which only accept circuits that are written in the target backends Instruction Set Architecture (ISA). For best results, do not transpile circuits before submitting via the Performance Management function. </Admonition>\n",
"\n",
"\n",
"### Sampler inputs\n",
"| Name | Type | Description | Required | Example |\n",
"|------------|-----------------------------------------------|-------------------------------------------------------------------------------------------------------------|----------|---------------------------------------------------------------------------------------------------------------------|\n",
"| pubs | `SamplerPubLike` or `list[SamplerPubLike]` | One or more tuples containing the inputs listed under `SamplerPubLike` components. | Yes | `(circuit, parameter_values)` |\n",
"| instance | str | The hub/group/project to use in that format. | Yes | `\"hub1/group1/project1\"` |\n",
"| run_options| dict | Input options which includes the following: (Optional) `backend_name`: str, `shots`: int. Defaults to least busy backend and 4000 shots. | No | `{\"backend_name\": backend_name, \"shots\": 2048}` |\n",
"\n",
"**`SamplerPubLike` components:**\n",
"- A single circuit in the OpenQASM 2.0 or 3.0 string format.\n",
"- (Optional) A collection of parameter values to bind the circuit against.\n",
"- (Optional) A dictionary of run options, such as the shot count.\n",
"\n",
"### Sampler outputs\n",
"| Name | Type | Description | Example |\n",
"|--------|----------------------------------------|-------------------------------------------------------------------------------------------|---------------------------------|\n",
"| result | `list[ArrayLike[dict[str, int]]]` | The resultant list of counts dictionaries corresponding to the list of input PUBs. | `[{'000001': 100, '000011': 2}]` |\n",
"\n",
"\n",
"### Estimator inputs\n",
"| Name | Type | Description | Required | Example |\n",
"|------------|-----------------------------------------------|-------------------------------------------------------------------------------------------------------------|----------|---------------------------------------------------------------------------------------------------------------------|\n",
"| pubs | `EstimatorPubLike` or `list[EstimatorPubLike]` | One or more tuples containing the inputs listed under `EstimatorPubLike` components. | Yes | `(circuit, observables, parameter_values)` |\n",
"| instance | str | The hub/group/project to use in that format. | Yes | `\"hub1/group1/project1\"` |\n",
"| run_options| dict | Input options which includes the following: (Optional) `backend_name`: str, `shots`: int. Defaults to least busy backend and 4000 shots. | No | `{\"backend_name\": backend_name, \"shots\": 2048}` |\n",
"\n",
"**`EstimatorPubLike` components:**\n",
"- A single circuit in the OpenQASM 2.0 or 3.0 string format.\n",
"- One or more observables that specify the expectation values to estimate, in any of the formats denoted in the list \"Accepted observables formats\".\n",
"- (Optional) A collection of parameter values to bind the circuit against.\n",
"- (Optional) A dictionary of run options, such as the shot count.\n",
"\n",
"**Accepted observables formats:**\n",
"- A Pauli string: `\"XY\"`\n",
"- A dictionary - Pauli strings with coefficients: `{\"XY\": 0.5, \"YZ\": 0.3}`\n",
"- A list of Pauli strings: `[\"XY\", \"YZ\", \"ZX\"]`\n",
"- A list of Pauli strings with coefficients: `[(\"XY\", 0.5), (\"YZ\", 0.3)]`\n",
"- A nested list of Pauli strings: `[[\"XY\", \"YZ\"], [\"ZX\", \"XX\"]]`\n",
"- A nested list of Pauli strings with coefficients: `[[(\"XY\", 0.1), (\"YZ\", 0.2)], [(\"ZX\", 0.3), (\"XX\", 0.4)]]`\n",
"\n",
"### Estimator outputs\n",
"| Name | Type | Description | Example |\n",
"|--------|---------------------------------|--------------------------------------------------------------------------------------------------|---------------------|\n",
"| values | `valueslist[ArrayLike[float]]` | The resultant list of expectation values corresponding to the list of input PUBs. | `[0.43046065915270004]` |\n",
"\n",
"### Parameter formats\n",
"The Sampler and Estimator both accept parameters, which follow the same [array broadcasting rules](./primitive-input-output#broadcasting-rules) as the `QiskitRuntime` primitives. The following parameter formats are accepted:\n",
"\n",
"| Format | Example |\n",
"|---------------------------------------------|---------------------------------------------------------------------------------------------------|\n",
"| 0-d array (single binding) | `{\"a\": 4, (\"b\", \"c\"): [5, 6]}` |\n",
"| Single array (last index for parameters) | `{\"a[0]\", \"a[1]\", \"a[2]\": [0.1, 0.2, 0.3]}` |\n",
"| Multiple arrays (last index for parameters, flexible dimensions) | `{\"c\": np.ones((10, 10, 2)).tolist(), \"b\": np.zeros((10, 10)).tolist()}` |"
]
},
{
"cell_type": "markdown",
"id": "895db40f",
"metadata": {},
"source": [
"## Benchmarks\n",
"\n",
"[Published algorithmic benchmarking](https://journals.aps.org/prapplied/abstract/10.1103/PhysRevApplied.20.024034) results demonstrate significant performance improvement across various algorithms, including Bernstein-Vazirani, quantum Fourier transform, Grovers search, quantum approximate optimization algorithm, and variational quantum eigensolver. The rest of this section provides more details about types of algorithms you can run, as well as the expected performance and runtimes.\n",
"\n",
"The following independent studies demonstrate how Q-CTRL's Performance Management enables algorithmic research at record-breaking scale:\n",
"- [Parametrized Energy-Efficient Quantum Kernels for Network Service Fault Diagnosis](https://arxiv.org/abs/2405.09724v1) - up to 50-qubit quantum kernel learning\n",
"- [Tensor-based quantum phase difference estimation for large-scale demonstration](https://arxiv.org/abs/2408.04946) - up to 33-qubit quantum phase estimation\n",
"- [Hierarchical Learning for Quantum ML: Novel Training Technique for Large-Scale Variational Quantum Circuits](https://arxiv.org/abs/2311.12929) - up to 21-qubit quantum data loading\n",
"\n",
"The following table provides a rough guide on accuracy and runtimes from prior benchmarking runs on `ibm_fez`. Performance on other devices may vary. The usage time is based on an assumption of 10,000 shots per circuit. The \"Number of qubits\" indicated is not a hard limitation but represents rough thresholds where you can expect extremely consistent solution accuracy. Larger problem sizes have been successfully solved, and testing beyond these limits is encouraged.\n",
"\n",
"\n",
"| Example | Number of qubits | Accuracy | Measure of accuracy | Total time (s) | Runtime usage (s) | Primitive (Mode) |\n",
"| --------- | ---------------- | -------------------------- | -------- | ---------- | ------------- |------------- |\n",
"| BernsteinVazirani | 50Q | 100% | Success Rate (Percentage of runs where the correct answer is the highest count bitstring) | 10 | 8 | Sampler |\n",
"| Quantum Fourier Transform | 30Q | 100% | Success Rate (Percentage of runs where the correct answer is the highest count bitstring) | 10 | 8 | Sampler |\n",
"| Quantum Phase Estimation | 30Q | 99.9998% | Accuracy of the angle found: `1- abs(real_angle - angle_found)/pi` | 10 | 8 | Sampler |\n",
"| Quantum simulation: Ising model (15 steps) | 20Q | 99.775% | $A$ (defined below) | 60 (per step) | 15 (per step) | Estimator |\n",
"| Quantum simulation 2: molecular dynamics (20 time points) | 34Q | 96.78% | $A_{mean}$ (defined below) | 10 (per time point) | 6 (per time point) | Estimator |\n",
"\n",
"Defining the accuracy of the measurement of an expectation value - the metric $A$ is defined as follows:\n",
"$$\n",
"A = 1 - \\frac{|\\epsilon^{ideal} - \\epsilon^{meas}|}{\\epsilon^{ideal}_{max} - \\epsilon^{ideal}_{min}},\n",
"$$\n",
"where $ \\epsilon^{ideal} $ = ideal expectation value, $ \\epsilon^{meas} $ = measured expectation value, $\\epsilon^{ideal}_{max} $ = ideal maximum value, and $\\epsilon^{ideal}_{min}$ = ideal minimum value. $A_{mean}$ is simply the average of the value of $A$ across multiple measurements.\n",
"\n",
"This metric is used because it is invariant to global shifts and scaling in the range of attainable values. In other words, regardless of whether you shift the range of possible expectation values higher or lower or increase the spread, the value of $A$ should remain consistent."
]
},
{
"cell_type": "markdown",
"id": "73390a19",
"metadata": {},
"source": [
"## Get started\n",
"\n",
"Authenticate using your [IBM Quantum&trade; Platform API token](http://quantum.ibm.com/), and select the Qiskit Function as follows:"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "95a715d2",
"metadata": {},
"outputs": [],
"source": [
"from qiskit_ibm_catalog import QiskitFunctionsCatalog\n",
"\n",
"# Credentials\n",
"token = \"<YOUR_IQP_API_TOKEN>\"\n",
"hub = \"<YOUR_IQP_HUB>\"\n",
"group = \"<YOUR_IQP_GROUP>\"\n",
"project = \"<YOUR_IQP_PROJECT>\"\n",
"\n",
"# Authentication\n",
"catalog = QiskitFunctionsCatalog(token=token)\n",
"\n",
"# Access Function\n",
"perf_mgmt = catalog.get(\"q-ctrl/performance_management\")"
]
},
{
"cell_type": "markdown",
"id": "e8837f5f",
"metadata": {},
"source": [
"## Example: Sampler\n",
"\n",
"Use the Sampler mode of Fire Opal Performance Management to run a BernsteinVazirani circuit. This algorithm, used to find a hidden string from the outputs of a black box function, is a common benchmarking algorithm because there is a single correct answer."
]
},
{
"cell_type": "markdown",
"id": "39819cbd",
"metadata": {},
"source": [
"### 1. Create the circuit\n",
"Define the correct answer to the algorithm, the hidden bitstring, and the BernsteinVazirani circuit. You can adjust the width of the circuit by simply changing the `circuit_width`."
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "278c5298",
"metadata": {},
"outputs": [],
"source": [
"import qiskit\n",
"\n",
"circuit_width = 35\n",
"hidden_bitstring = \"1\" * circuit_width\n",
"\n",
"# Create circuit, reserving one qubit for BV oracle\n",
"bv_circuit = qiskit.QuantumCircuit(circuit_width + 1, circuit_width)\n",
"bv_circuit.x(circuit_width)\n",
"bv_circuit.h(range(circuit_width + 1))\n",
"for input_qubit, bit in enumerate(reversed(hidden_bitstring)):\n",
" if bit == \"1\":\n",
" bv_circuit.cx(input_qubit, circuit_width)\n",
"bv_circuit.barrier()\n",
"bv_circuit.h(range(circuit_width + 1))\n",
"bv_circuit.barrier()\n",
"for input_qubit in range(circuit_width):\n",
" bv_circuit.measure(input_qubit, input_qubit)\n",
"\n",
"# Create PUB tuple\n",
"pubs = [(bv_circuit,)]"
]
},
{
"cell_type": "markdown",
"id": "86d47228",
"metadata": {},
"source": [
"### 2. Run the circuit\n",
"Run the circuit and optionally define the backend and number of shots."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "2ad187e0",
"metadata": {},
"outputs": [],
"source": [
"# Choose a backend or remove this option to default to the least busy device\n",
"backend_name = \"<CHOOSE_A_BACKEND>\"\n",
"\n",
"# Run the circuit using the sampler\n",
"qctrl_sampler_job = perf_mgmt.run(\n",
" runner_function =\"sampler\",\n",
" pubs = pubs,\n",
" instance = hub + \"/\" + group + \"/\" + project,\n",
" run_options = {\"backend_name\": backend_name},\n",
")"
]
},
{
"cell_type": "markdown",
"id": "a6bfaf53",
"metadata": {},
"source": [
"You can use the familiar [Qiskit Serverless APIs](./serverless) to check your Qiskit Function workload's status:"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "e408b89e",
"metadata": {},
"outputs": [],
"source": [
"print(qctrl_sampler_job.status())"
]
},
{
"cell_type": "markdown",
"id": "1a371424",
"metadata": {},
"source": [
"### 3. Retrieve the result"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "b4ac097c",
"metadata": {},
"outputs": [],
"source": [
"# Retrieve the counts from the result list\n",
"counts = qctrl_sampler_job.result()[0]"
]
},
{
"cell_type": "markdown",
"id": "8ba9fd35",
"metadata": {},
"source": [
"In case you need to retrieve results later, you can run the following cell to save your job ID and use it to retrieve your job."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "bc4df554",
"metadata": {},
"outputs": [],
"source": [
"qctrl_sampler_job_id = qctrl_sampler_job.job_id\n",
"print(qctrl_sampler_job_id)"
]
},
{
"cell_type": "markdown",
"id": "71a7e415",
"metadata": {},
"source": [
"You can use the job ID to retrieve your job object, which can be used to get the status or results."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "6951d866",
"metadata": {},
"outputs": [],
"source": [
"qctrl_sampler_job = catalog.get_job_by_id(qctrl_sampler_job_id)"
]
},
{
"cell_type": "markdown",
"id": "df2788d5",
"metadata": {},
"source": [
"## Example: Estimator\n",
"\n",
"Use the Sampler mode of Fire Opal Performance Management to run a BernsteinVazirani circuit. This algorithm, used to find a hidden string from the outputs of a black box function, is a common benchmarking algorithm because there is a single correct answer."
]
},
{
"cell_type": "markdown",
"id": "82932760",
"metadata": {},
"source": [
"In addition to the `qiskit-ibm-catalog` and `qiskit` package, you will also use the `NumPy` package to run this example. You can install this package by uncommenting the following cell if you are running this example in a notebook using the IPython kernel."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "70bb93ef",
"metadata": {},
"outputs": [],
"source": [
"# %pip install numpy"
]
},
{
"cell_type": "markdown",
"id": "02b2a79a",
"metadata": {},
"source": [
"### 1. Create the circuit\n",
"As an example, generate a random Hermitian operator and an observable to input to the Performance Management function."
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "32037218",
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
"from qiskit.circuit.library import IQP\n",
"from qiskit.quantum_info import random_hermitian\n",
"\n",
"n_qubits = 50\n",
"\n",
"# Generate a random circuit\n",
"mat = np.real(random_hermitian(n_qubits, seed=1234))\n",
"circuit = IQP(mat)\n",
"circuit.measure_all()\n",
"\n",
"# Define observables as a string\n",
"observable = \"Z\" * n_qubits"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "476fae6a",
"metadata": {},
"outputs": [],
"source": [
"# Create PUB tuple\n",
"pubs = [(circuit, observable)]"
]
},
{
"cell_type": "markdown",
"id": "09e64cd7",
"metadata": {},
"source": [
"### 2. Run the circuit\n",
"Run the circuit and optionally define the backend and number of shots."
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "720c6919",
"metadata": {},
"outputs": [],
"source": [
"# Choose a backend or remove this option to default to the least busy device\n",
"backend_name = \"<CHOOSE_A_BACKEND>\"\n",
"\n",
"qctrl_estimator_job = perf_mgmt.run(\n",
" runner_function = \"estimator\",\n",
" pubs = pubs,\n",
" instance = hub + \"/\" + group + \"/\" + project,\n",
" run_options = {\"backend_name\": backend_name},\n",
")"
]
},
{
"cell_type": "markdown",
"id": "c07af9d0",
"metadata": {},
"source": [
"You can use the familiar [Qiskit Serverless APIs](./serverless) to check your Qiskit Function workload's status:"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "7e2fab85",
"metadata": {},
"outputs": [],
"source": [
"print(qctrl_estimator_job.status())"
]
},
{
"cell_type": "markdown",
"id": "23556c8e",
"metadata": {},
"source": [
"### 3. Retrieve the result"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "8be67088",
"metadata": {},
"outputs": [],
"source": [
"# Retrieve the counts from the result list\n",
"expectation_value = qctrl_estimator_job.result()[0]\n",
"\n",
"print(f\"Expectation value: {expectation_value}\")"
]
},
{
"cell_type": "markdown",
"id": "4a56975a",
"metadata": {},
"source": [
"In case you need to retrieve results later, you can run the following cell to save your job ID."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "0a5baa05",
"metadata": {},
"outputs": [],
"source": [
"qctrl_estimator_job_id = qctrl_estimator_job.job_id\n",
"print(qctrl_estimator_job_id)"
]
},
{
"cell_type": "markdown",
"id": "438469d9",
"metadata": {},
"source": [
"You can use the job ID to retrieve your job object, which can be used to get the status or results."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "0324580e",
"metadata": {},
"outputs": [],
"source": [
"qctrl_estimator_job = catalog.get_job_by_id(qctrl_estimator_job_id)"
]
},
{
"cell_type": "markdown",
"id": "bb33258d",
"metadata": {},
"source": [
"## Get support\n",
"\n",
"For any questions or issues, [contact Q-CTRL](https://form.typeform.com/to/iuujEAEI)."
]
},
{
"cell_type": "markdown",
"id": "2fe4a6ea",
"metadata": {},
"source": [
"## Next steps\n",
"\n",
"<Admonition type=\"tip\" title=\"Recommendations\">\n",
"\n",
"- Request access to [Q-CTRL Performance Management](https://quantum.ibm.com/functions?id=c750648c-ba44-4137-8c34-4140a3aaa7a9)\n",
"- Try the [Q-CTRL Performance Management on variational quantum algorithms](https://learning.quantum.ibm.com/tutorial/q-ctrl-performance-management-on-variational-quantum-algorithms) tutorial.\n",
"\n",
"</Admonition>"
]
}
],
"metadata": {
"description": "Apply automated error suppression using Fire Opal Performance Management by Q-CTRL",
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3"
},
"title": "Performance Management - A Qiskit Function by Q-CTRL Fire Opal"
},
"nbformat": 4,
"nbformat_minor": 5
}

View File

@ -0,0 +1,344 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "dde95705",
"metadata": {},
"source": [
"# QESEM: A Qiskit Function by Qedma\n",
"\n",
"## Overview\n",
"\n",
"While quantum processing units have vastly improved in recent years, errors due to noise and imperfections in existing hardware remain a central challenge for quantum algorithm developers. As the field approaches utility-scale quantum computations that cannot be verified classically, solutions for canceling noise with guaranteed accuracy are becoming increasingly important. To overcome this challenge, Qedma has developed Quantum Error Suppression and Error Mitigation (QESEM), seamlessly integrated on IBM Quantum&trade; Platform as a [Qiskit Function](/guides/functions).\n",
"\n",
"With QESEM, users can run their quantum circuits on noisy QPUs to obtain highly accurate error-free results with highly efficient QPU-time overheads, close to fundamental bounds. To achieve this, QESEM leverages a suite of propriety methods developed by Qedma, for the characterization and reduction of errors. Error reduction techniques include gate optimization, noise-aware transpilation, error suppression (ES), and unbiased error mitigation (EM). With this combination of these characterization-based methods, users can achieve reliable, error-free results for generic large-volume quantum circuits, unlocking applications that cannot be accomplished otherwise."
]
},
{
"cell_type": "markdown",
"id": "5f761442",
"metadata": {},
"source": [
"## Description\n",
"\n",
"You can use the QESEM function by Qedma to easily estimate and execute your circuits with error suppression and mitigation, achieving larger circuit volumes and higher accuracies. To use QESEM, you provide a quantum circuit, a set of observables to measure, a target statistical accuracy for each observable, and a chosen QPU. Before you run the circuit to the target accuracy, you can estimate the required QPU time based on an analytical calculation that does not require circuit execution. Once you are satisfied with the QPU time estimation, you can execute the circuit with QESEM.\n",
"\n",
"When you execute a circuit, QESEM runs a device characterization protocol tailored to your circuit, yielding a reliable noise model for the errors occurring in the circuit. Based on the characterization, QESEM first implements noise-aware transpilation to map the input circuit onto a set of physical qubits and gates, which minimizes the noise affecting the target observable. These include the natively available gates (CX/CZ on IBM&reg; devices), as well as additional gates optimized by QESEM, forming QESEMs extended gate set. QESEM then runs a set of characterization-based ES and EM circuits on the QPU and collects their measurement outcomes. These are then classically post-processed to provide an unbiased expectation value and an error bar for each observable, corresponding to the requested accuracy.\n",
"\n",
"![Qedma QESEM overview](/images/guides/qedma-qesem/overview.svg)"
]
},
{
"cell_type": "markdown",
"id": "74823696",
"metadata": {},
"source": [
"## Unique error mitigation features\n",
"QESEM has been demonstrated to provide high-accuracy results for a variety of quantum applications and on the largest circuit volumes achievable today. QESEM offers the following user-facing features, demonstrated in the benchmarks section below:\n",
"1.\t**Guaranteed accuracy:** QESEM outputs unbiased estimations for expectation values of observables. Its EM method is equipped with theoretical guarantees, which - together with Qedmas cutting-edge characterization - ensure the mitigation converges to the noiseless circuit output up to the user-specified accuracy. In contrast to many heuristic EM methods that are prone to systematic errors or biases, QESEMs guaranteed accuracy is essential for ensuring reliable results in generic quantum circuits and observables.\n",
"2.\t**Scalability to large QPUs:** QESEMs QPU time depends on circuit volumes, but is otherwise independent of the number of qubits. Qedma has demonstrated QESEM on the largest quantum devices available today, including the IBM 127-qubit Eagle and 133-qubit Heron devices.\n",
"3.\t**Application-agnostic:** QESEM has been demonstrated on a variety of applications, including Hamiltonian simulation, VQE, QAOA, and amplitude estimation. Users can input any quantum circuit and observable to be measured, and obtain accurate error-free results. The only limitations are dictated by the hardware specifications and allocated QPU time, which determine the accessible circuit volumes and output accuracies. In contrast, many error reduction solutions are application-specific or involve uncontrolled heuristics, rendering them inapplicable for generic quantum circuits and applications.\n",
"4. **Extended gate set:** QESEM supports fractional-angle gates, and provides Qedma-optimized fractional-angle $Rzz(\\theta)$ gates on IBM Eagle devices. This extended gate set enables more efficient compilation and unlocks circuit volumes larger by a factor of up to 2 compared to default CX/CZ compilation.\n",
"5.\t**Multibase observables:** QESEM supports input observables composed of many non-commuting Pauli strings, such as generic Hamiltonians. The choice of measurement bases and the optimization of QPU resource allocation (shots and circuits) is then performed automatically by QESEM to minimize the required QPU time for the requested accuracy. This optimization, which takes into account hardware fidelities and execution rates, enables you to run deeper circuits and obtain higher accuracies."
]
},
{
"cell_type": "markdown",
"id": "8b901258",
"metadata": {},
"source": [
"## Function parameters\n",
"\n",
"| Name | Type | Description | Required | Default | Example |\n",
"| -----| ------| ------------| -------- | ------- | -------- |\n",
"| `instance` | str| The hub/group/project to use in that format | No | N/A | “hub1/group1/project1” |\n",
"| `action` | str | The required action: \"estimate_qpu_time\" or \"execute\" | Yes | N/A | \"execute\" |\n",
"| `pubs` | Iterable[EstimatorPubLike] | A pub-like object in the form of (circuit, observables) | Yes| N/A | (circ1, [obs1,obs2,obs3]) |\n",
"| `precision` | float | The target precision for expectation value estimates of each observable | Yes| N/A | 0.03 |\n",
"| `run_options` | dict | Includes the name of the backend to run on | Yes | N/A | `{ backend_name = \"ibm_fez\" }` |\n",
"| `custom_options` |dict | Advanced features: `transpilation_level` and `max_qpu_time` (in seconds)| No | `max_qpu_time` = 14400 , `transpilation_level`= 1 | `{ max_qpu_time = 14400, transpilation_level = 0 }` |"
]
},
{
"cell_type": "markdown",
"id": "73390a19",
"metadata": {},
"source": [
"## Get started\n",
"\n",
"Authenticate using your [IBM Quantum&trade; Platform API token](http://quantum.ibm.com/), and select the Qiskit Function as follows:"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "95a715d2",
"metadata": {},
"outputs": [],
"source": [
"from qiskit_ibm_catalog import QiskitFunctionsCatalog\n",
"\n",
"catalog = QiskitFunctionsCatalog(instance=\"\")\n",
"\n",
"qesem = catalog.load('qedma/qesem')"
]
},
{
"cell_type": "markdown",
"id": "e8837f5f",
"metadata": {},
"source": [
"## Example\n",
"\n",
"The QESEM function must get the following parameters to be executed:\n",
"- action\n",
"- pubs (circuit, observables)\n",
"- precision\n",
"- run_options\n",
"\n",
"\n",
"To get started, try the basic example of estimating QPU time:"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "d56e1440",
"metadata": {},
"outputs": [],
"source": [
"job = qesem_function.run(\n",
" action = \"estimate_qpu_time\",\n",
" instance = \"hub/group/project\",\n",
" pubs = [\n",
" (\n",
" bell,\n",
" [obs1,obs2,obs3]\n",
" )\n",
" ],\n",
" precision = 0.03,\n",
" run_options = {\n",
" backend_name = \"ibm_brisbane\",\n",
" }\n",
")"
]
},
{
"cell_type": "markdown",
"id": "2e5869f3",
"metadata": {},
"source": [
"The following example executes a QESEM job:"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "e7351d6b",
"metadata": {},
"outputs": [],
"source": [
"# example execute QESEM job\n",
"job = qesem_function.run(\n",
" action = \"execute\",\n",
" instance = \"hub/group/project\",\n",
" pubs = [\n",
" (\n",
" bell,\n",
" [obs1,obs2,obs3]\n",
" )\n",
" ],\n",
" precision = 0.03,\n",
" run_options = {\n",
" backend_name = \"ibm_brisbane\",\n",
" }\n",
")"
]
},
{
"cell_type": "markdown",
"id": "399b0deb",
"metadata": {},
"source": [
"<Admonition type=\"note\">\n",
"- The `precision` parameter signifies the acceptable error on the expectation values of the observables in absolute value. Namely, the QPU runtime for mitigation will be determined to provide output values for all the observables of interest that fall within a `1σ` confidence interval of the target precision. If multiple observables are provided, the mitigation will run until the target precision is reached for each of the input observables.\n",
"\n",
"- Currently QESEM supports a single `PUB`.\n",
"</Admonition>"
]
},
{
"cell_type": "markdown",
"id": "03998691",
"metadata": {},
"source": [
"You can use the familiar Qiskit Serverless APIs to check your Qiskit Function workload's status or return results:"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "856fe992",
"metadata": {},
"outputs": [],
"source": [
"print(job.status())\n",
"result = job.result()"
]
},
{
"cell_type": "markdown",
"id": "e2817b13",
"metadata": {},
"source": [
"## Custom options\n",
"\n",
"Provide the `custom_options` parameter to set additional advanced features for the QESEM function:"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "c2ce65e3",
"metadata": {},
"outputs": [],
"source": [
"# example execute QESEM job\n",
"job = qesem_function.run(\n",
" action = \"execute\",\n",
" instance = \"hub/group/project\",\n",
" pubs = [\n",
" (\n",
" bell,\n",
" [obs1,obs2,obs3]\n",
" )\n",
" ],\n",
" precision = 0.03,\n",
" run_options = {\n",
" backend_name = \"ibm_brisbane\",\n",
" },\n",
" custom_options = {\n",
" max_qpu_time = 14400,\n",
" transpilation_level = 0\n",
" }\n",
")"
]
},
{
"cell_type": "markdown",
"id": "bcd50b21",
"metadata": {},
"source": [
"`max_qpu_time`: Allows you to limit the QPU time to be used for the entire QESEM process. Since the final QPU time required to reach the target accuracy is determined dynamically during the QESEM job, this parameter enables you to limit the cost of the experiment. If the dynamically-determined QPU time is shorter than the time allocated by the user, this parameter will not affect the experiment. The `max_qpu_time` parameter is particularly useful in cases where the analytical time estimate provided by QESEM before the job starts is too pessimistic and the user wants to initiate a mitigation job anyway. After the time limit it reached, QESEM stops sending new circuits. Circuits that have already been sent continue running (so the total time may surpass the limit by up to 30 minutes), and the user receives the processed results from the circuits that ran up to that point. If you want to apply a QPU time limit shorter than the analytical time estimate, consult with Qedma to obtain an estimate for the accuracy achievable within the time limit.\n",
"\n",
"\n",
"`transpilation_level`: After a circuit is submitted to QESEM, it automatically prepares several alternative circuit transpilations and chooses the one that minimizes QPU time. For instance, alternative transpilations might utilize Qedma-optimized fractional RZZ gates to reduce the circuit depth. Of course, all transpilations are equivalent to the input circuit, in terms of their ideal output.\n",
"\n",
"To exert more control over the circuit transpilation, set the transpilation level in the `QesemOptions`. While level 1 corresponds to the default behavior described above, level 0 includes only minimal modifications required for high-accuracy output; for example, layerification - the organization of circuit operations into layers of simultaneous two-qubit gates. Note that automatic hardware-mapping onto high-fidelity qubits is applied in any case.\n",
"\n",
"| `transpilation_level` | description |\n",
"|:-:|:--|\n",
"| `1` | Default QESEM transpilation. Prepares several alternative transpilations and chooses the one that minimizes QPU time. Barriers may be modified in the layerification step. |\n",
"| `0` | Minimal transpilation: the mitigated circuit will closely resemble the input circuit structurally. Circuits provided in level 0 should match the device connectivity and should be specified in terms of the following gates: CX, Rzz(α), and standard single-qubit gates (U, x, sx, rz, etc). Barriers will be respected in the layerification step. |\n",
"\n",
"<Admonition type=\"note\">\n",
"Qiskit barriers are typically used to specify the layers of two-qubit gates in quantum circuits. In level 0, QESEM preserves the layers specified by the barriers. In level 1, the layers specified by the barriers are considered as one transpilation alternative when minimizing QPU time.\n",
"</Admonition>"
]
},
{
"cell_type": "markdown",
"id": "895db40f",
"metadata": {},
"source": [
"## Benchmarks\n",
"\n",
"QESEM has been tested on a wide variety of use cases and applications. The following examples can assist you with assessing which types of workloads you can run with QESEM.\n",
"\n",
"A key figure of merit for quantifying the hardness of both error mitigation and classical simulation for a given circuit and observable is **active volume**: the number of CNOT gates affecting the observable in the circuit. The active volume depends on the circuit depth and width, on the observable weight, and on the circuit structure, which determines the lightcone of the observable. For further details, see the talk from the [2024 IBM Quantum Summit](https://www.youtube.com/watch?v=Hd-IGvuARfE&t=1730s). QESEM provides particularly large value in the high-volume regime, giving reliable results for generic circuits and observables.\n",
"\n",
"![Active volume](/images/guides/qedma-qesem/active_volume.svg)\n",
"\n",
"\n",
"| Application | Number of qubits | Device | Circuit description | Accuracy | Total time | Runtime usage |\n",
"| --------- | ---------------- | ----- | -------------------------- | -------- | ---------- | ------------- |\n",
"| VQE circuit | 8 | Eagle (r3) | 21 total layers, 9 measurement bases, 1D chain | 98% | 35 min | 14 min |\n",
"| Kicked Ising | 28 | Eagle (r3) | 3 unique layers x 3 steps, 2D heavy-hex topology | 97% | 22 min | 4 min |\n",
"| Kicked Ising | 28 | Eagle (r3) | 3 unique layers x 8 steps, 2D heavy-hex topology | 97% | 116 min | 23 min |\n",
"| Trotterized Hamiltonian simulation | 40 | Eagle (r3) | 2 unique layers x 10 Trotter steps, 1D chain | 97% | 3 hours | 25 min |\n",
"| Trotterized Hamiltonian simulation | 119 | Eagle (r3) | 3 unique layers x 9 Trotter steps, 2D heavy-hex topology | 95% | 6.5 hours | 45 min |\n",
"| Kicked Ising | 136 | Heron (r2) | 3 unique layers x 15 steps, 2D heavy-hex topology | 99% | 52 min | 9 min |\n",
"\n",
"Accuracy is measured here relative to the ideal value of the observable: $\\frac{\\langle O \\rangle_{ideal} - \\epsilon}{\\langle O \\rangle_{ideal}}$, where '$\\epsilon$' is the absolute precision of the mitigation (set by the user input), and $\\langle O \\rangle_{ideal}$ is the observable at the noiseless circuit.\n",
"'Runtime usage' measures the usage of the benchmark in batch mode (sum over usage of individual jobs), whereas 'total time' measures usage in session mode (experiment wall time), which includes additional classical and communication times. QESEM is available for execution in both modes, so that users can make the best use of their available resources.\n",
"\n",
"The 28-qubit Kicked Ising circuits simulate the Discrete Time Quasicrystal studied by Shinjo et al. (see [arXiv 2403.16718](https://arxiv.org/abs/2403.16718) and [Q2B24 Tokyo](https://www.youtube.com/watch?v=tQW6FdLc6zo)) on three connected loops of ibm_kawasaki. The circuit parameters taken here are $(\\theta_x, \\theta_z) = (0.9 \\pi, 0)$, with a ferromagnetic initial state $| \\psi_0 \\rangle = | 0 \\rangle ^{\\otimes n}$. The measured observable is the absolute value of the magnetization $M = |\\frac{1}{28} \\sum_{i=0}^{27} \\langle Z_i \\rangle|$. The utility-scale Kicked Ising experiment was run on the 136 best qubits of ibm_fez; this particular benchmark was run at the Clifford angle $(\\theta_x, \\theta_z) = (\\pi, 0)$, at which the active volume grows slowly with circuit depth, which - together with the high device fidelities - enables high accuracy at a short runtime.\n",
"\n",
"Trotterized Hamiltonian simulation circuits are for a Transverse-Field Ising model at fractional angles: $(\\theta_{zz}, \\theta_x) = (\\pi / 4, \\pi /8)$ and $(\\theta_{zz}, \\theta_x) = (\\pi / 6, \\pi / 8)$ correspondingly (see [Q2B24 Tokyo](https://www.youtube.com/watch?v=tQW6FdLc6zo)). The utility-scale circuit was run on the 119 best qubits of ibm_brisbane, whereas the 40-qubit experiment was run on the best available chain. The accuracy is reported for the magnetization; high-accuracy results were obtained for higher-weight observables as well.\n",
"\n",
"The VQE circuit was developed together with researchers from the Center for Quantum Technology and Applications at the Deutsches Elektronen-Synchrotron (DESY). The target observable here was a Hamiltonian consisting of a large number of non-commuting Pauli strings, emphasizing QESEM's optimized performance for multi-basis observables. Mitigation was applied to a classically-optimized ansatz; although these results are still unpublished, results of the same quality will be obtained for different circuits with similar structural properties."
]
},
{
"cell_type": "markdown",
"id": "e9ec2e67",
"metadata": {},
"source": [
"## Get support\n",
"\n",
"The Qedma support team is here to help! If you encounter any issues or have questions about using the QESEM Qiskit Function, please don't hesitate to reach out. Our knowledgeable and friendly support staff are ready to assist you with any technical concerns or inquiries you may have.\n",
"\n",
"You can email us at support@qedma.com for assistance. Please include as much detail as possible about the issue you're experiencing to help us provide a swift and accurate response. You can also contact your dedicated Qedma POC representative via email or phone.\n",
"\n",
"To help us assist you more efficiently, please provide the following information when you contact us:\n",
"\n",
"- A detailed description of the issue\n",
"- Any relevant error messages or codes\n",
"- Steps to reproduce the issue\n",
"- Your contact information\n",
"\n",
"\n",
"We are committed to providing you with prompt and effective support to ensure you have the best possible experience with our API.\n",
"\n",
"We are always looking to improve our product and we welcome your suggestions! If you have ideas on how we can enhance our services or features you'd like to see, please send us your thoughts to support@qedma.com"
]
},
{
"cell_type": "markdown",
"id": "5a6a25c8",
"metadata": {},
"source": [
"## Next steps\n",
"\n",
"<Admonition type=\"tip\" title=\"Recommendations\">\n",
"\n",
"- [Request access to Qedma QESEM](https://quantum.ibm.com/functions?id=7636f111-b7b8-4a00-b22d-5fcc5c5cb3d0)\n",
"\n",
"</Admonition>"
]
}
],
"metadata": {
"description": "Run quantum circuits on noisy QPUs to obtain highly accurate error-free results with highly efficient QPU-time overheads, close to fundamental bounds.",
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3"
},
"title": "QESEM - A Qiskit Function by Qedma"
},
"nbformat": 4,
"nbformat_minor": 5
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 43 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 151 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 73 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 114 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 73 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 97 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 60 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 116 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 132 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 308 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 62 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 30 KiB

View File

@ -9,6 +9,9 @@ notification_prelude: |
# we still want their name in the Qiskit Bot message so people know they are
# relevant.
notifications:
"docs/guides/addons":
- "@beckykd"
- "@jenglick"
"docs/guides/ai-transpiler-passes":
- "@cbjuan"
- "@d-kremer"

View File

@ -5,10 +5,10 @@ Ahokas
Almaden
Alon
Ambainis
Bajpe
Boeblingen
Bravyi
Bremner
Bajpe
Bruhat
Buratti
Bures
@ -23,13 +23,15 @@ Dueck
Dupuis
Easwar
Eisert
Fock
Frobenius
Golecha
Gosset
Gottesman
Golecha
Gushu
Häner
Hardamard
Hartree
Havlicek
Hein
Hiptmair
@ -48,8 +50,8 @@ Kraus
Kremer
Kutin
Lauer
Luca
Lindblad
Luca
Margolus
Martonosi
Maslov
@ -73,13 +75,13 @@ Rebentrost
Renato
Renner
Roetteler
Rueschlikon
Ruchir
Rueschlikon
Shaohan
Siddharth
Shaydulin
Shende
Shors
Siddharth
Simonetto
Smolin
Solovay
@ -90,10 +92,10 @@ Tapp
Toffoli
Uhrig
Vazirani
Vedral
Vishal
Vishwakarma
Viudes
Vishal
Vedral
Watrous
Weyl
Woerner

View File

@ -1,6 +1,8 @@
ALAP
ASPLOS
Abelian
Addon
Addons
Algorithmiq
Anharmonicity
Ansatz
@ -8,7 +10,6 @@ BFGS
CDKM
CHSH
CNOT
Colab
CPLEX
CPTP
CSWAP
@ -16,14 +17,19 @@ CVXPY
Canonicalization
Clbits
Cliffords
Colab
DIMACS
Deutsches
Diagonalization
EPLG
Eigensolver
Eigensolvers
Elektronen
Factorizers
Fieldr
Hadamard
Hamiltonians
IBMQPU
ITTL
Ipython
MCMT
@ -31,26 +37,24 @@ MCMTV
NISQ
PRNG
Paulihedral
pylatexenc
QAOA
QESEM
QESEM's
QPU's
QRTE
QURI
QVSM
Qedma
Qiskit
Qiskit
Quna
RCCX
SLSQP
SPSA
Shinjo
Symegine
symplectic
tensored
uncompiled
uncompressing
uncompute
uncomputed
unentanglement
unnormalized
TOQM
Transpilations
Trotterization
Trotterizations
UCRX
@ -104,7 +108,6 @@ fermionic
fsim
gphase
ibmq
IBMQPU
initialised
initialiser
ints
@ -114,6 +117,7 @@ iswap
kwarg
kwargs
kwparams
layerification
lnot
mathbb
mathrm
@ -136,6 +140,7 @@ pipx
polynomially
pydot
pygments
pylatexenc
pyplot
qarg
qargs
@ -178,6 +183,7 @@ toric
transpiling
uchannel
uncompiled
uncompressing
uncompute
uncomputed
unentanglement
@ -188,3 +194,5 @@ unphysical
venv
watsonx
xgate
textbf
texttt

View File

@ -35,6 +35,13 @@ notebooks_normal_test = [
# Don't test the following notebooks (this section can include glob patterns)
notebooks_exclude = [
"**/.ipynb_checkpoints/**",
"docs/guides/qedma-qesem.ipynb",
"docs/guides/q-ctrl-optimization-solver.ipynb",
"docs/guides/q-ctrl-performance-management.ipynb",
"docs/guides/algorithmiq-tem.ipynb",
"docs/guides/functions.ipynb",
"docs/guides/qunasys-quri-chemistry.ipynb",
"docs/guides/ibm-circuit-function.ipynb",
]
# The following notebooks submit jobs that can be mocked with a simulator

View File

@ -18,6 +18,7 @@ const IGNORED_URLS: string[] = [
"/guides/qiskit-code-assistant",
"/guides/qiskit-code-assistant-jupyterlab",
"/guides/qiskit-code-assistant-vscode",
"/guides/addons",
];
const INDEX_PAGES = [

View File

@ -43,6 +43,15 @@ const ALLOWED_OWNERLESS_FILES = new Set([
"docs/migration-guides/qiskit-1.0",
"docs/migration-guides/qiskit-1.0-features",
"docs/migration-guides/qiskit-1.0-installation",
// TODO: add these to qiskit_bot.yaml once we confirm the stakeholders.
"docs/guides/algorithmiq-tem",
"docs/guides/functions",
"docs/guides/ibm-circuit-function",
"docs/guides/q-ctrl-optimization-solver",
"docs/guides/q-ctrl-performance-management",
"docs/guides/q-ctrl-performance-management",
"docs/guides/qedma-qesem",
"docs/guides/qunasys-quri-chemistry",
]);
const ALLOWED_NONEXISTENT_FILES: Set<string> = new Set([]);

View File

@ -38,7 +38,11 @@ const ALWAYS_IGNORED_URLS__EXPECTED = [
"mailto:tellibm@us.ibm.com",
];
const ALWAYS_IGNORED_URLS__SHOULD_FIX: string[] = [];
const ALWAYS_IGNORED_URLS__SHOULD_FIX: string[] = [
"mailto:qiskit_ibm@algorithmiq.fi",
"mailto:support@qedma.com",
"mailto:sales@qunasys.com",
];
export const ALWAYS_IGNORED_URLS = new Set([
...ALWAYS_IGNORED_URLS__EXPECTED,