diff --git a/checkPatternsIndex.ts b/checkPatternsIndex.ts new file mode 100644 index 00000000000..7abf85c2e32 --- /dev/null +++ b/checkPatternsIndex.ts @@ -0,0 +1,263 @@ +// This code is a Qiskit project. +// +// (C) Copyright IBM 2024. +// +// This code is licensed under the Apache License, Version 2.0. You may +// obtain a copy of this license in the LICENSE file in the root directory +// of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. +// +// Any modifications or derivative works of this code must retain this +// copyright notice, and modified files need to carry a notice indicating +// that they have been altered from the originals. + +import { readFile } from "fs/promises"; + +import type { TocEntry } from "../lib/api/generateToc.js"; +import { readJsonFile } from "../lib/fs"; + +// URLs that show up in the left ToC under the `Tools` section, but are not in +// any of the INDEX_PAGES. +const ALLOWLIST_MISSING_FROM_INDEX: Set = new Set([ + "/docs/guides/qiskit-code-assistant", + "/docs/guides/qiskit-mcp-servers", + "/docs/guides/qiskit-code-assistant-jupyterlab", + "/docs/guides/qiskit-code-assistant-vscode", + "/docs/guides/qiskit-code-assistant-local", + "/docs/guides/addons", + "/docs/guides/tools-intro", + "/docs/guides/function-template-hamiltonian-simulation", + "/docs/guides/qiskit-addons-utils", + "/docs/guides/qiskit-code-assistant-openai-api", + "/docs/guides/manage-cost", + "/docs/guides/execution-modes-faq", + "/docs/guides/faq", + "/docs/guides/execution-modes-faq", + "/docs/guides/open-source", +]); + +// URLs that show up in the INDEX_PAGES, but are not in the left ToC under +// the `Tools` section. +// +// Note that `checkOrphanPages.tsx` will validate these +// pages do show up somewhere in the ToC, they only might be in a different +// section than `Tools.` +const ALLOWLIST_MISSING_FROM_TOC: Set = new Set([ + "/docs/guides/q-ctrl-optimization-solver", + "/docs/guides/kipu-optimization", + "/docs/guides/multiverse-computing-singularity", + "/docs/guides/global-data-quantum-optimizer", + "/docs/guides/colibritd-pde", + "/docs/guides/qunova-chemistry", + "/docs/guides/manage-cost", + "/docs/guides/instances", + "/docs/guides/access-instances-platform-apis", + "/docs/guides/cloud-setup", + "/docs/guides/initialize-account", + "/docs/guides/save-credentials", + "/docs/guides/cloud-setup-untrusted", + "/docs/guides/cloud-setup-invited", + "/docs/guides/cloud-setup-rest-api", + "/docs/guides/execution-modes-faq", +]); + +// URLs that show up in the INDEX_PAGES >1 time. +const ALLOWLIST_DUPLICATE_ENTRIES: Set = new Set([]); + +const INDEX_PAGE_URLS: Set = new Set([ + "/docs/guides/map-problem-to-circuits", + "/docs/guides/optimize-for-hardware", + "/docs/guides/execute-on-hardware", + "/docs/guides/post-process-results", + "/docs/guides/intro-to-patterns", +]); + +const INDEX_PAGE_FILES = Array.from(INDEX_PAGE_URLS).map( + // We remove the initial `/` to make the path relative + (page) => `${page.substring(1)}.mdx`, +); +const TOC_PATH = "docs/guides/_toc.json"; + +async function getIndexEntries(indexPath: string): Promise { + const rawIndex = await readFile(indexPath, "utf-8"); + const result: string[] = []; + // The index page has several unordered lists starting with *, each with links to other pages. + // We want to get every slug from those lists. Note that we don't care which list the slugs show + // up in - we only care if the slug shows up at all anywhere. + for (const line of rawIndex.split("\n")) { + if (!line.trimStart().startsWith("* ")) { + continue; + } + + const slug = extractPageSlug(line); + if (slug) { + result.push(slug); + } + } + + return result; +} + +function extractPageSlug(text: string): string | undefined { + const re = /\((.*)\)/gm; + // Ex: '* [Circuit library](./circuit-library)'. + const match = re.exec(text); + if (!match) { + // Nested sections don't have any link + return undefined; + } + const pageSlug = match[1]; + if (pageSlug.startsWith("http") || pageSlug.startsWith("/")) { + return pageSlug; + } + const page = pageSlug.split("/").pop(); + return `/docs/guides/${page}`; +} + +function getTocSectionPageNames(sectionNode: TocEntry): string[] { + let results = []; + if (sectionNode.url) { + results.push(sectionNode.url); + } + + if (sectionNode.children) { + for (const child of sectionNode.children) { + results.push(...getTocSectionPageNames(child)); + } + } + + return results; +} + +async function getToolsTocEntriesToCheck(): Promise { + const toc = await readJsonFile(TOC_PATH); + const toolsNode = toc.children.find( + (child: TocEntry) => child.title == "Tools", + ); + const toolsPages = getTocSectionPageNames(toolsNode); + return toolsPages.filter((page) => !ALLOWLIST_MISSING_FROM_INDEX.has(page)); +} + +async function deduplicateEntries( + filePath: string, + entries: string[], +): Promise<[Set, string[]]> { + const deduplicatedPages: Set = new Set(); + const errors: string[] = []; + + for (const entry of entries) { + if ( + deduplicatedPages.has(entry) && + !ALLOWLIST_DUPLICATE_ENTRIES.has(entry) + ) { + errors.push(`❌ ${filePath}: The entry ${entry} is duplicated`); + } else { + deduplicatedPages.add(entry); + } + } + + return [deduplicatedPages, errors]; +} + +function getExtraIndexPagesErrors( + indexPage: string, + indexEntries: Set, + toolsEntries: Set, +): string[] { + return [...indexEntries] + .filter( + (page) => + !toolsEntries.has(page) && + !ALLOWLIST_MISSING_FROM_TOC.has(page) && + !INDEX_PAGE_URLS.has(page), + ) + .map( + (page) => + `❌ ${indexPage}: The entry ${page} doesn't appear in the \`Tools\` menu.`, + ); +} + +function getExtraToolsEntriesErrors( + remainingToolsEntries: Set, +): string[] { + return [...remainingToolsEntries].map( + (page) => `❌ The entry ${page} is not present on any index page`, + ); +} + +function maybePrintErrorsAndFail( + duplicatesErrors: string[], + extraIndexEntriesErrors: string[], + extraToolsEntriesErrors: string[], +): void { + let allGood = true; + + if (duplicatesErrors.length > 0) { + duplicatesErrors.forEach((error) => console.error(error)); + console.error( + `\nRemove all duplicated entries on the indices and in the Tools menu, which is set in docs/guides/_toc.json.`, + ); + console.error("--------\n"); + allGood = false; + } + + if (extraIndexEntriesErrors.length > 0) { + extraIndexEntriesErrors.forEach((error) => console.error(error)); + console.error( + `\nMake sure all pages have an entry in the Tools menu, which is set in docs/guides/_toc.json.`, + ); + console.error("--------\n"); + allGood = false; + } + + if (extraToolsEntriesErrors.length > 0) { + extraToolsEntriesErrors.forEach((error) => console.error(error)); + console.error( + "\nAdd the entries in one of the following index pages, or add the URL to the `IGNORED_URLS` list at the beginning of `/scripts/js/commands/checkPatternsIndex.tsx` if it's not used in Workflow:", + ); + INDEX_PAGE_FILES.forEach((index) => console.error(`\t➡️ ${index}`)); + allGood = false; + } + + if (!allGood) { + process.exit(1); + } +} + +async function main() { + const toolsAllEntries = await getToolsTocEntriesToCheck(); + let [toolsEntries, duplicatesErrors] = await deduplicateEntries( + TOC_PATH, + toolsAllEntries, + ); + + let extraIndexEntriesErrors: string[] = []; + for (const indexPage of INDEX_PAGE_FILES) { + const indexAllEntries = await getIndexEntries(indexPage); + let [indexEntries, indexDuplicatedErrors] = await deduplicateEntries( + indexPage, + indexAllEntries, + ); + duplicatesErrors.push(...indexDuplicatedErrors); + + extraIndexEntriesErrors.push( + ...getExtraIndexPagesErrors(indexPage, indexEntries, toolsEntries), + ); + + toolsEntries.forEach((page) => { + if (indexEntries.has(page)) { + toolsEntries.delete(page); + } + }); + } + + const extraToolsEntriesErrors = getExtraToolsEntriesErrors(toolsEntries); + + maybePrintErrorsAndFail( + duplicatesErrors, + extraIndexEntriesErrors, + extraToolsEntriesErrors, + ); + console.log("\n✅ No missing or duplicated pages were found\n"); +} + +main().then(() => process.exit()); diff --git a/docs/guides/DAG-representation.ipynb b/docs/guides/DAG-representation.ipynb index 853346432dd..eef45b23363 100644 --- a/docs/guides/DAG-representation.ipynb +++ b/docs/guides/DAG-representation.ipynb @@ -453,7 +453,7 @@ "\n", " - Review the guide on creating a [custom transpiler pass](./custom-transpiler-pass)\n", " - Learn how to [Create and transpile against custom backends](./custom-backend)\n", - " - Try the [Compare transpiler settings](/docs/tutorials/circuit-transpilation-settings) tutorial.\n", + " - Try the [Compare transpiler settings](/docs/guides/circuit-transpilation-settings) guide.\n", " - Review the [DAG Circuit API documentation.](/docs/api/qiskit/dagcircuit)\n", "" ] diff --git a/docs/guides/_toc.json b/docs/guides/_toc.json index 849be7271ae..b4dd84d336c 100644 --- a/docs/guides/_toc.json +++ b/docs/guides/_toc.json @@ -14,7 +14,11 @@ "url": "/docs/guides/quick-start" }, { - "title": "Install", + "title": "Hello world", + "url": "/docs/guides/hello-world" + }, + { + "title": "Advanced install", "children": [ { "title": "Install Qiskit", @@ -25,25 +29,20 @@ "url": "/docs/guides/online-lab-environments" }, { - "title": "Advanced install", - "children": [ - { - "title": "Install the Qiskit SDK from source", - "url": "/docs/guides/install-qiskit-source" - }, - { - "title": "Configure the Qiskit SDK locally", - "url": "/docs/guides/configure-qiskit-local" - }, - { - "title": "Install the Qiskit C API", - "url": "/docs/guides/install-c-api" - }, - { - "title": "Extend Qiskit in Python with C", - "url": "/docs/guides/c-extension-for-python" - } - ] + "title": "Install the Qiskit SDK from source", + "url": "/docs/guides/install-qiskit-source" + }, + { + "title": "Configure the Qiskit SDK locally", + "url": "/docs/guides/configure-qiskit-local" + }, + { + "title": "Install the Qiskit C API", + "url": "/docs/guides/install-c-api" + }, + { + "title": "Extend Qiskit in Python with C", + "url": "/docs/guides/c-extension-for-python" } ] }, @@ -453,6 +452,10 @@ "url": "/docs/guides/DAG-representation" } ] + }, + { + "title": "Compare transpiler settings", + "url": "/docs/guides/circuit-transpilation-settings" } ] }, diff --git a/docs/tutorials/circuit-transpilation-settings.ipynb b/docs/guides/circuit-transpilation-settings.ipynb similarity index 88% rename from docs/tutorials/circuit-transpilation-settings.ipynb rename to docs/guides/circuit-transpilation-settings.ipynb index 9dc6a505f8b..44ab0be5bcd 100644 --- a/docs/tutorials/circuit-transpilation-settings.ipynb +++ b/docs/guides/circuit-transpilation-settings.ipynb @@ -9,6 +9,16 @@ "*Usage estimate: under one minute on an Eagle r3 processor (NOTE: This is an estimate only. Your runtime might vary.)*" ] }, + { + "cell_type": "markdown", + "id": "c909d475-622d-4526-80ef-1d14328237c1", + "metadata": { + "tags": [ + "version-info" + ] + }, + "source": [] + }, { "cell_type": "markdown", "id": "3609dc34-10de-47ea-9d1d-f516493a7b91", @@ -18,7 +28,7 @@ "\n", "To ensure faster and more efficient results, as of 1 March 2024, circuits and observables need to be transformed to only use instructions supported by the QPU (quantum processing unit) before being submitted to the Qiskit Runtime primitives. We call these *instruction set architecture* (ISA) circuits and observables. One common way to do this is to use the transpiler's `generate_preset_pass_manager` function. However, you might choose to follow a more manual process.\n", "\n", - "For example, you might want to target a specific subset of qubits on a specific device. This tutorial tests the performance of different transpiler settings by completing the full process of creating, transpiling, and submitting circuits." + "For example, you might want to target a specific subset of qubits on a specific device. This walkthrough tests the performance of different transpiler settings by completing the full process of creating, transpiling, and submitting circuits." ] }, { @@ -28,7 +38,7 @@ "source": [ "## Requirements\n", "\n", - "Before starting this tutorial, ensure that you have the following installed:\n", + "Before you begin, ensure that you have the following installed:\n", "\n", "* Qiskit SDK v1.2 or later, with [visualization](/docs/api/qiskit/visualization) support\n", "* Qiskit Runtime v0.28 or later (`pip install qiskit-ibm-runtime`)" @@ -119,7 +129,7 @@ { "data": { "text/plain": [ - "\"Output" + "\"Output" ] }, "execution_count": 29, @@ -145,7 +155,7 @@ { "data": { "text/plain": [ - "\"Output" + "\"Output" ] }, "execution_count": 30, @@ -254,7 +264,7 @@ { "data": { "text/plain": [ - "\"Output" + "\"Output" ] }, "execution_count": 33, @@ -313,7 +323,7 @@ { "data": { "text/plain": [ - "\"Output" + "\"Output" ] }, "execution_count": 35, @@ -369,22 +379,10 @@ "for prob in binary_prob:\n", " print(f\"{hellinger_fidelity(prob, ideal_distribution):.3f}\")" ] - }, - { - "cell_type": "markdown", - "id": "e6c0a85f-80a9-48e4-9910-5cfdab75863d", - "metadata": {}, - "source": [ - "## Tutorial survey\n", - "\n", - "Please take this short survey to provide feedback on this tutorial. Your insights will help us improve our content offerings and user experience.\n", - "\n", - "[Link to survey](https://your.feedback.ibm.com/jfe/form/SV_0j1SlLPkooyeFJY)" - ] } ], "metadata": { - "description": "In this tutorial, we'll explore the transpilation pipeline and take you through the full process of creating, transpiling, and submitting circuits.", + "description": "In this walkthrough, we'll explore the transpilation pipeline and take you through the full process of creating, transpiling, and submitting circuits.", "kernelspec": { "display_name": "Python 3", "language": "python", diff --git a/docs/guides/cloud-setup-invited.mdx b/docs/guides/cloud-setup-invited.mdx index 58b727ffcf1..b192ca446cc 100644 --- a/docs/guides/cloud-setup-invited.mdx +++ b/docs/guides/cloud-setup-invited.mdx @@ -56,6 +56,6 @@ If you are using a trusted Python environment, such as a personal laptop, it is - [Overview of available plans.](plans-overview) - [Configure the Qiskit SDK locally.](configure-qiskit-local) - [Set up to use IBM Quantum Platform with REST API](/docs/guides/cloud-setup-rest-api) - - Follow the steps in [Hello world](/docs/tutorials/hello-world) to write and run a quantum program. + - Follow the steps in [Hello world](/docs/guides/hello-world) to write and run a quantum program. - Try a [tutorial](/docs/tutorials). \ No newline at end of file diff --git a/docs/guides/cloud-setup-rest-api.mdx b/docs/guides/cloud-setup-rest-api.mdx index 017ec4ec2c8..5d594c8c0d6 100644 --- a/docs/guides/cloud-setup-rest-api.mdx +++ b/docs/guides/cloud-setup-rest-api.mdx @@ -97,6 +97,6 @@ curl -X 'GET' \ - [Overview of available plans.](plans-overview) - [Configure the Qiskit SDK locally.](configure-qiskit-local) - - Follow the steps in [Hello world](/docs/tutorials/hello-world) to write and run a quantum program. + - Follow the steps in [Hello world](/docs/guides/hello-world) to write and run a quantum program. - Try a [tutorial](/docs/tutorials). \ No newline at end of file diff --git a/docs/guides/cloud-setup-untrusted.mdx b/docs/guides/cloud-setup-untrusted.mdx index d08da5df4ad..4e44c21cccd 100644 --- a/docs/guides/cloud-setup-untrusted.mdx +++ b/docs/guides/cloud-setup-untrusted.mdx @@ -70,6 +70,6 @@ Follow these steps to use your API key directly to authenticate to the Qiskit Ru - [Overview of available plans.](plans-overview) - [Configure the Qiskit SDK locally.](configure-qiskit-local) - - Follow the steps in [Hello world](/docs/tutorials/hello-world) to write and run a quantum program. + - Follow the steps in [Hello world](/docs/guides/hello-world) to write and run a quantum program. - Try a [tutorial](/docs/tutorials). \ No newline at end of file diff --git a/docs/guides/cloud-setup.mdx b/docs/guides/cloud-setup.mdx index f15865836cd..daeb9aad6d3 100644 --- a/docs/guides/cloud-setup.mdx +++ b/docs/guides/cloud-setup.mdx @@ -57,7 +57,7 @@ If you are using a trusted Python environment, such as a personal laptop, it is - [Overview of available plans.](plans-overview) - [Configure the Qiskit SDK locally.](configure-qiskit-local) - [View your available QPUs.](/docs/guides/qpu-information#available) - - Follow the steps in [Hello world](/docs/tutorials/hello-world) to write and run a quantum program. + - Follow the steps in [Hello world](/docs/guides/hello-world) to write and run a quantum program. - [Set up to use IBM Quantum Platform with REST API.](/docs/guides/cloud-setup-rest-api) - Try a [tutorial](/docs/tutorials). \ No newline at end of file diff --git a/docs/guides/common-parameters.ipynb b/docs/guides/common-parameters.ipynb index 312fed73189..9e3059d7d33 100644 --- a/docs/guides/common-parameters.ipynb +++ b/docs/guides/common-parameters.ipynb @@ -275,7 +275,7 @@ "\n", " - Review the [Default options and configuration settings](defaults-and-configuration-options) topic.\n", " - Learn how to [Set the optimization level.](set-optimization)\n", - " - Try the [Compare transpiler settings](/docs/tutorials/circuit-transpilation-settings) tutorial.\n", + " - Try the [Compare transpiler settings](/docs/guides/circuit-transpilation-settings) guide.\n", " - Review the [transpiler API documentation.](/docs/api/qiskit/transpiler)\n", "\n", "" diff --git a/docs/guides/configure-qiskit-local.mdx b/docs/guides/configure-qiskit-local.mdx index 47b2f57ce77..07431736298 100644 --- a/docs/guides/configure-qiskit-local.mdx +++ b/docs/guides/configure-qiskit-local.mdx @@ -56,6 +56,6 @@ Set these environment variables to alter the default behavior of Qiskit: - Learn how to [build circuits](./map-problem-to-circuits). - Try a tutorial, such as [Grover's algorithm](/docs/tutorials/grovers-algorithm). - - [Run the Hello world program](/docs/tutorials/hello-world). + - [Run the Hello world program](/docs/guides/hello-world). - Read the [contributing guidelines](https://github.com/Qiskit/qiskit/blob/main/CONTRIBUTING.md) if you want to contribute to the open-source Qiskit SDK. diff --git a/docs/guides/custom-transpiler-pass.ipynb b/docs/guides/custom-transpiler-pass.ipynb index c7309d6f54c..a6459e6e1ec 100644 --- a/docs/guides/custom-transpiler-pass.ipynb +++ b/docs/guides/custom-transpiler-pass.ipynb @@ -335,7 +335,7 @@ "\n", "\n", " - To learn how to use the `generate_preset_passmanager` function instead of writing your own passes, start with the [Transpilation default settings and configuration options](defaults-and-configuration-options) topic.\n", - " - Try the [Compare transpiler settings](/docs/tutorials/circuit-transpilation-settings) tutorial.\n", + " - Try the [Compare transpiler settings](/docs/guides/circuit-transpilation-settings) guide.\n", " - Review the [transpiler API documentation.](/docs/api/qiskit/transpiler)\n", "" ] diff --git a/docs/guides/debug-qiskit-runtime-jobs.ipynb b/docs/guides/debug-qiskit-runtime-jobs.ipynb index 3c622d29482..fa1337f27b8 100644 --- a/docs/guides/debug-qiskit-runtime-jobs.ipynb +++ b/docs/guides/debug-qiskit-runtime-jobs.ipynb @@ -633,7 +633,7 @@ " - Learn about [available Qiskit Runtime options.](/docs/guides/runtime-options-overview)\n", " - Learn about [Error mitigation and suppression techniques.](/docs/guides/error-mitigation-and-suppression-techniques)\n", " - Visit the [Transpile with pass managers](transpile-with-pass-managers) topic.\n", - " - Learn [how to transpile circuits](/docs/tutorials/circuit-transpilation-settings#compare-transpiler-settings) as part of Qiskit patterns workflows using Qiskit Runtime.\n", + " - Learn [how to transpile circuits](/docs/guides/circuit-transpilation-settings#compare-transpiler-settings) as part of Qiskit patterns workflows using Qiskit Runtime.\n", " - Review the [Debugging tools API documentation.](/docs/api/qiskit-ibm-runtime/debug-tools)\n", "" ] diff --git a/docs/guides/defaults-and-configuration-options.ipynb b/docs/guides/defaults-and-configuration-options.ipynb index e9c5ee25000..7548b687274 100644 --- a/docs/guides/defaults-and-configuration-options.ipynb +++ b/docs/guides/defaults-and-configuration-options.ipynb @@ -293,7 +293,7 @@ " - Learn how to [Set the optimization level when using Qiskit Runtime.](./runtime-options-overview)\n", " - Visit the [Transpile with pass managers](transpile-with-pass-managers) topic.\n", " - For examples, see [Representing quantum computers.](./represent-quantum-computers)\n", - " - Learn [how to transpile circuits](/docs/tutorials/circuit-transpilation-settings) as part of the Qiskit patterns workflow using Qiskit Runtime.\n", + " - Learn [how to transpile circuits](/docs/guides/circuit-transpilation-settings) as part of the Qiskit patterns workflow using Qiskit Runtime.\n", " - Review the [Transpile API documentation](/docs/api/qiskit/transpiler).\n", "" ] diff --git a/docs/guides/dynamical-decoupling-pass-manager.ipynb b/docs/guides/dynamical-decoupling-pass-manager.ipynb index 5894659d33e..77336b26a13 100644 --- a/docs/guides/dynamical-decoupling-pass-manager.ipynb +++ b/docs/guides/dynamical-decoupling-pass-manager.ipynb @@ -285,7 +285,7 @@ "\n", "\n", " - To learn how to use the `generate_preset_passmanager` function instead of writing your own passes, start with the [Transpilation default settings and configuration options](defaults-and-configuration-options) topic.\n", - " - Try the [Compare transpiler settings](/docs/tutorials/circuit-transpilation-settings#compare-transpiler-settings) tutorial.\n", + " - Try the [Compare transpiler settings](/docs/guides/circuit-transpilation-settings#compare-transpiler-settings) guide.\n", " - See the [Transpile API documentation.](https://docs.quantum-computing.ibm.com/api/qiskit/transpiler)\n", "" ] diff --git a/docs/guides/estimate-job-run-time.ipynb b/docs/guides/estimate-job-run-time.ipynb index d0853e0fd03..73abcd89e20 100644 --- a/docs/guides/estimate-job-run-time.ipynb +++ b/docs/guides/estimate-job-run-time.ipynb @@ -82,7 +82,7 @@ " - Review these tips: [Minimize job run time](minimize-time).\n", " - Set the [Maximum execution time](max-execution-time).\n", " - Learn how to transpile locally in the [Transpile](./transpile/) section.\n", - " - Try the [Compare transpiler settings](/docs/tutorials/circuit-transpilation-settings) tutorial.\n", + " - Try the [Compare transpiler settings](/docs/guides/circuit-transpilation-settings) guide.\n", "" ] } diff --git a/docs/guides/get-started-with-primitives.ipynb b/docs/guides/get-started-with-primitives.ipynb index 05dbd9488cc..9137d8d3db3 100644 --- a/docs/guides/get-started-with-primitives.ipynb +++ b/docs/guides/get-started-with-primitives.ipynb @@ -505,7 +505,7 @@ " - Review detailed [primitives examples.](primitives-examples)\n", " - Practice with primitives by working through the [Cost function lesson](/learning/courses/variational-algorithm-design/cost-functions) in IBM Quantum Learning.\n", " - Learn how to transpile locally in the [Transpile](transpile/) section.\n", - " - Try the [Compare transpiler settings](/docs/tutorials/circuit-transpilation-settings#compare-transpiler-settings) tutorial.\n", + " - Try the [Compare transpiler settings](/docs/guides/circuit-transpilation-settings#compare-transpiler-settings) guide.\n", " - Learn how to [use the primitive options.](runtime-options-overview)\n", " - View the API for [Sampler](/docs/api/qiskit-ibm-runtime/options-sampler-options) and [Estimator](/docs/api/qiskit-ibm-runtime/options-estimator-options) options.\n", " - Read [Migrate to V2 primitives](/docs/guides/v2-primitives).\n", diff --git a/docs/tutorials/hello-world.ipynb b/docs/guides/hello-world.ipynb similarity index 96% rename from docs/tutorials/hello-world.ipynb rename to docs/guides/hello-world.ipynb index de20517f2a9..05eba17b562 100644 --- a/docs/tutorials/hello-world.ipynb +++ b/docs/guides/hello-world.ipynb @@ -134,7 +134,7 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": null, "id": "930ca3b6", "metadata": { "tags": [] @@ -143,7 +143,7 @@ { "data": { "text/plain": [ - "\"Output" + "\"Output" ] }, "execution_count": 1, @@ -155,7 +155,13 @@ "from qiskit import QuantumCircuit\n", "from qiskit.quantum_info import SparsePauliOp\n", "from qiskit.transpiler import generate_preset_pass_manager\n", + "from qiskit_ibm_runtime import QiskitRuntimeService\n", + "from qiskit_ibm_runtime import EstimatorOptions\n", "from qiskit_ibm_runtime import EstimatorV2 as Estimator\n", + "from matplotlib import pyplot as plt\n", + "# Uncomment the next line if you want to use a simulator:\n", + "# from qiskit_ibm_runtime.fake_provider import FakeBelemV2\n", + "\n", "\n", "# Create a new circuit with two qubits\n", "qc = QuantumCircuit(2)\n", @@ -236,14 +242,14 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": null, "id": "9a901271", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "\"Output" + "\"Output" ] }, "execution_count": 3, @@ -252,8 +258,6 @@ } ], "source": [ - "from qiskit_ibm_runtime import QiskitRuntimeService\n", - "\n", "service = QiskitRuntimeService()\n", "\n", "backend = service.least_busy(simulator=False, operational=True)\n", @@ -405,7 +409,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": null, "id": "87143fcc", "metadata": { "tags": [] @@ -414,7 +418,7 @@ { "data": { "text/plain": [ - "\"Output" + "\"Output" ] }, "metadata": {}, @@ -424,8 +428,6 @@ "source": [ "# Plot the result\n", "\n", - "from matplotlib import pyplot as plt\n", - "\n", "values = pub_result.data.evs\n", "\n", "errors = pub_result.data.stds\n", @@ -483,14 +485,11 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": null, "id": "2ac02692", "metadata": {}, "outputs": [], "source": [ - "from qiskit import QuantumCircuit\n", - "\n", - "\n", "def get_qc_for_n_qubit_GHZ_state(n: int) -> QuantumCircuit:\n", " \"\"\"This function will create a qiskit.QuantumCircuit (qc) for an n-qubit GHZ state.\n", "\n", @@ -526,7 +525,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": null, "id": "863a4ec9", "metadata": {}, "outputs": [ @@ -540,8 +539,6 @@ } ], "source": [ - "from qiskit.quantum_info import SparsePauliOp\n", - "\n", "# ZZII...II, ZIZI...II, ... , ZIII...IZ\n", "operator_strings = [\n", " \"Z\" + \"I\" * i + \"Z\" + \"I\" * (n - 2 - i) for i in range(n - 1)\n", @@ -564,14 +561,11 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": null, "id": "428f05e7", "metadata": {}, "outputs": [], "source": [ - "from qiskit.transpiler import generate_preset_pass_manager\n", - "from qiskit_ibm_runtime import QiskitRuntimeService\n", - "\n", "service = QiskitRuntimeService()\n", "\n", "backend = service.least_busy(\n", @@ -595,14 +589,11 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": null, "id": "3aaa5025", "metadata": {}, "outputs": [], "source": [ - "from qiskit_ibm_runtime import EstimatorOptions\n", - "from qiskit_ibm_runtime import EstimatorV2 as Estimator\n", - "\n", "options = EstimatorOptions()\n", "options.resilience_level = 1\n", "options.dynamical_decoupling.enable = True\n", @@ -645,14 +636,14 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": null, "id": "de91ebd0", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "\"Output" + "\"Output" ] }, "metadata": {}, @@ -660,9 +651,6 @@ } ], "source": [ - "import matplotlib.pyplot as plt\n", - "from qiskit_ibm_runtime import QiskitRuntimeService\n", - "\n", "# data\n", "data = list(range(1, len(operators) + 1)) # Distance between the Z operators\n", "result = job.result()[0]\n", diff --git a/docs/guides/initialize-account.mdx b/docs/guides/initialize-account.mdx index e0b9292276d..907aec77fbf 100644 --- a/docs/guides/initialize-account.mdx +++ b/docs/guides/initialize-account.mdx @@ -196,6 +196,6 @@ service = QiskitRuntimeService(channel="local") - [Create and manage instances.](/docs/guides/instances) - [Initialize the service in an untrusted environment.](/docs/guides/cloud-setup-untrusted) - [Set up to use IBM Quantum Platform with REST API.](/docs/guides/cloud-setup-rest-api) - - Follow the steps in [Hello world](/docs/tutorials/hello-world) to write and run a quantum program. + - Follow the steps in [Hello world](/docs/guides/hello-world) to write and run a quantum program. diff --git a/docs/guides/install-qiskit-source.mdx b/docs/guides/install-qiskit-source.mdx index 77b6816d1b6..11d9917aade 100644 --- a/docs/guides/install-qiskit-source.mdx +++ b/docs/guides/install-qiskit-source.mdx @@ -149,6 +149,6 @@ pip install -e ".[dev]" - Read the [contributing guidelines](https://github.com/Qiskit/qiskit/blob/main/CONTRIBUTING.md) to contribute to the open-source Qiskit SDK. - Learn how to [build circuits](./map-problem-to-circuits). - - [Run the Hello world program](/docs/tutorials/hello-world). + - [Run the Hello world program](/docs/guides/hello-world). - Try a tutorial, such as [Grover's algorithm](/docs/tutorials/grovers-algorithm). diff --git a/docs/guides/install-qiskit.mdx b/docs/guides/install-qiskit.mdx index 3cccb6b96b8..45686ff8c87 100644 --- a/docs/guides/install-qiskit.mdx +++ b/docs/guides/install-qiskit.mdx @@ -299,6 +299,6 @@ In the Qiskit v1.x release series, the supported platforms are: - Set up your [IBM Cloud account.](/docs/guides/cloud-setup) - [Configure Qiskit locally.](configure-qiskit-local) - - Follow the steps in [Hello world](/docs/tutorials/hello-world) to write and run a quantum program. + - Follow the steps in [Hello world](/docs/guides/hello-world) to write and run a quantum program. - Try an IBM Quantum Learning [tutorial.](/docs/tutorials) diff --git a/docs/guides/local-testing-mode.ipynb b/docs/guides/local-testing-mode.ipynb index b9a5b3e9b8f..e6bc245a6d4 100644 --- a/docs/guides/local-testing-mode.ipynb +++ b/docs/guides/local-testing-mode.ipynb @@ -258,7 +258,7 @@ " - Read [Migrate to V2 primitives](/docs/guides/v2-primitives).\n", " - Practice with primitives by working through the [Cost function lesson](/learning/courses/variational-algorithm-design/cost-functions) in IBM Quantum Learning.\n", " - Learn how to transpile locally in the [Transpile](/docs/guides/transpile) section.\n", - " - Try the [Compare transpiler settings](/docs/tutorials/circuit-transpilation-settings#compare-transpiler-settings) tutorial.\n", + " - Try the [Compare transpiler settings](/docs/guides/circuit-transpilation-settings#compare-transpiler-settings) tutorial.\n", "" ] } diff --git a/docs/guides/operators-overview.ipynb b/docs/guides/operators-overview.ipynb index 6ed381faf87..af285792336 100644 --- a/docs/guides/operators-overview.ipynb +++ b/docs/guides/operators-overview.ipynb @@ -510,7 +510,7 @@ "\n", "\n", " - Learn how to [specify observables in the Pauli basis](./specify-observables-pauli).\n", - " - See an example of using operators in the [Combine error mitigation options with the estimator primitive](/docs/tutorials/combine-error-mitigation-techniques) tutorial.\n", + " - See an example of using operators in the [Combine error mitigation options with the Estimator primitive](/docs/tutorials/combine-error-mitigation-techniques) tutorial.\n", " - Read more [in-depth coverage of the Operator class](./operator-class).\n", " - Explore the [Operator API](/docs/api/qiskit/qiskit.quantum_info.Operator#operator) reference.\n", "" diff --git a/docs/guides/primitives-examples.ipynb b/docs/guides/primitives-examples.ipynb index 5e8b0148b9c..70b5d045411 100644 --- a/docs/guides/primitives-examples.ipynb +++ b/docs/guides/primitives-examples.ipynb @@ -662,7 +662,7 @@ " - [Specify advanced runtime options.](runtime-options-overview)\n", " - Practice with primitives by working through the [Cost function lesson](/learning/courses/variational-algorithm-design/cost-functions) in IBM Quantum Learning.\n", " - Learn how to transpile locally in the [Transpile](./transpile/) section.\n", - " - Try the [Compare transpiler settings](/docs/tutorials/circuit-transpilation-settings) tutorial.\n", + " - Try the [Compare transpiler settings](/docs/guides/circuit-transpilation-settings) guide.\n", " - Read [Migrate to V2 primitives](/docs/guides/v2-primitives).\n", " - Understand the [Job limits](/docs/guides/job-limits) when sending a job to an IBM® QPU.\n", "" diff --git a/docs/guides/qiskit-transpiler-service.ipynb b/docs/guides/qiskit-transpiler-service.ipynb index 2e110590705..d9ca2b1e0c4 100644 --- a/docs/guides/qiskit-transpiler-service.ipynb +++ b/docs/guides/qiskit-transpiler-service.ipynb @@ -180,7 +180,7 @@ "\n", "\n", " - Learn how to create [AI transpiler passes.](ai-transpiler-passes)\n", - " - Learn [how to transpile circuits](/docs/tutorials/circuit-transpilation-settings) as part of the Qiskit patterns workflow using Qiskit Runtime.\n", + " - Learn [how to transpile circuits](/docs/guides/circuit-transpilation-settings) as part of the Qiskit patterns workflow using Qiskit Runtime.\n", " - Review the [Qiskit Transpiler Service Python client](/docs/api/qiskit-ibm-transpiler) documentation.\n", "" ] diff --git a/docs/guides/quick-start.ipynb b/docs/guides/quick-start.ipynb index 9a7b1f89130..5ff5e20d986 100644 --- a/docs/guides/quick-start.ipynb +++ b/docs/guides/quick-start.ipynb @@ -230,7 +230,7 @@ "## Next steps\n", "\n", "\n", - "- Run a circuit on real quantum hardware in the [Hello world](/docs/tutorials/hello-world) tutorial.\n", + "- Follow the steps in [Hello world](/docs/guides/hello-world) to run a circuit on real quantum hardware.\n", "- Not ready to run on hardware? Start your quantum journey with the [Basics of quantum information](/learning/courses/basics-of-quantum-information) course.\n", "" ] diff --git a/docs/guides/represent-quantum-computers.ipynb b/docs/guides/represent-quantum-computers.ipynb index 03872f463bc..49d67c3b3f4 100644 --- a/docs/guides/represent-quantum-computers.ipynb +++ b/docs/guides/represent-quantum-computers.ipynb @@ -495,7 +495,7 @@ "\n", " - Understand [Transpilation default settings and configuration options.](defaults-and-configuration-options)\n", " - Review the [Commonly used parameters for transpilation](common-parameters) topic.\n", - " - Try the [Compare transpiler settings](/docs/tutorials/circuit-transpilation-settings#compare-transpiler-settings) tutorial.\n", + " - Try the [Compare transpiler settings](/docs/guides/circuit-transpilation-settings#compare-transpiler-settings) guide.\n", " - See the [Transpile API documentation.](/docs/api/qiskit/transpiler)\n", "" ] diff --git a/docs/guides/save-credentials.mdx b/docs/guides/save-credentials.mdx index 2116c9326ca..bf3ab8b7a9c 100644 --- a/docs/guides/save-credentials.mdx +++ b/docs/guides/save-credentials.mdx @@ -125,7 +125,7 @@ To view all credentials that you have saved, run `service.saved_accounts()`. No - [Initialize the Qiskit Runtime service in an **untrusted environment**.](/docs/guides/cloud-setup-untrusted) - [View your available QPUs.](/docs/guides/qpu-information#available) - [Configure the Qiskit SDK locally.](/docs/guides/configure-qiskit-local) - - Follow the steps in [Hello world](/docs/tutorials/hello-world) to write and run a quantum program. + - Follow the steps in [Hello world](/docs/guides/hello-world) to write and run a quantum program. - [Set up to use IBM Quantum Platform with REST API.](/docs/guides/cloud-setup-rest-api) - Try a [tutorial.](/docs/tutorials) \ No newline at end of file diff --git a/docs/guides/set-optimization.ipynb b/docs/guides/set-optimization.ipynb index 43981239a88..3d4b8a60da2 100644 --- a/docs/guides/set-optimization.ipynb +++ b/docs/guides/set-optimization.ipynb @@ -379,7 +379,7 @@ "\n", " - To learn more about the `generate_preset_passmanager` function, start with the [Transpilation default settings and configuration options](defaults-and-configuration-options) topic.\n", " - Continue learning about transpilation with the [Transpiler stages](transpiler-stages) topic.\n", - " - Try the [Compare transpiler settings](/docs/tutorials/circuit-transpilation-settings) tutorial.\n", + " - Try the [Compare transpiler settings](/docs/guides/circuit-transpilation-settings) guide.\n", " - Try the [Build repetition codes](/docs/tutorials/repetition-codes) tutorial.\n", " - See the [Transpile API documentation.](/docs/api/qiskit/transpiler)\n", "" diff --git a/docs/guides/transpile-with-pass-managers.ipynb b/docs/guides/transpile-with-pass-managers.ipynb index 2e0bfe383b3..5a809b8d395 100644 --- a/docs/guides/transpile-with-pass-managers.ipynb +++ b/docs/guides/transpile-with-pass-managers.ipynb @@ -335,7 +335,7 @@ " - [Write a custom transpiler pass](custom-transpiler-pass).\n", " - [Create a pass manager for dynamical decoupling](dynamical-decoupling-pass-manager).\n", " - To learn more about the `generate_preset_passmanager` function, see the [Transpilation default settings and configuration options](defaults-and-configuration-options) topic.\n", - " - Try the [Compare transpiler settings](/docs/tutorials/circuit-transpilation-settings) tutorial.\n", + " - Try the [Compare transpiler settings](/docs/guides/circuit-transpilation-settings) guide.\n", " - Review the [transpiler API documentation.](/docs/api/qiskit/transpiler)\n", "" ] diff --git a/docs/guides/transpile.mdx b/docs/guides/transpile.mdx index f9d9e9f1268..6b4f7552887 100644 --- a/docs/guides/transpile.mdx +++ b/docs/guides/transpile.mdx @@ -60,8 +60,8 @@ For a simpler, but less customizable, "out-of-the-box" way to use the transpiler - To learn how to use the `generate_preset_passmanager` function, start with the [Transpilation default settings and configuration options](defaults-and-configuration-options) topic. - Continue learning about transpilation with the [Transpiler stages](transpiler-stages) topic. - - Try the [Compare transpiler settings](/docs/tutorials/circuit-transpilation-settings#compare-transpiler-settings) tutorial. + - Try the [Compare transpiler settings](/docs/guides/circuit-transpilation-settings#compare-transpiler-settings) guide. - Try an end-to-end example that uses transpiled circuits in the [Ground-state energy estimation of the Heisenberg chain with VQE](/docs/tutorials/spin-chain-vqe) tutorial. - See the [Transpile API documentation.](https://docs.quantum-computing.ibm.com/api/qiskit/transpiler) - - Learn [how to transpile circuits.](/docs/tutorials/circuit-transpilation-settings#compare-transpiler-settings) + - Learn [how to transpile circuits.](/docs/guides/circuit-transpilation-settings#compare-transpiler-settings) diff --git a/docs/guides/transpiler-stages.ipynb b/docs/guides/transpiler-stages.ipynb index 4de853204e1..fe47cdd8a5e 100644 --- a/docs/guides/transpiler-stages.ipynb +++ b/docs/guides/transpiler-stages.ipynb @@ -473,7 +473,7 @@ "\n", " - To learn how to use the `generate_preset_passmanager` function, start with the [Transpilation default settings and configuration options](defaults-and-configuration-options) topic.\n", " - Continue learning about transpilation with the [Transpiler with pass managers](transpile-with-pass-managers) topic.\n", - " - Try the [Compare transpiler settings](/docs/tutorials/circuit-transpilation-settings) tutorial.\n", + " - Try the [Compare transpiler settings](/docs/guides/circuit-transpilation-settings) guide.\n", " - See the [Transpile API documentation.](https://docs.quantum-computing.ibm.com/api/qiskit/transpiler)\n", "" ] diff --git a/docs/guides/upgrade-from-open.mdx b/docs/guides/upgrade-from-open.mdx index c03a71f2ca7..11088712cb6 100644 --- a/docs/guides/upgrade-from-open.mdx +++ b/docs/guides/upgrade-from-open.mdx @@ -48,6 +48,6 @@ It is recommended that you set up a [cost limit](/docs/guides/manage-cost#cost-l - [Manage cost](manage-cost) when using the Pay-As-You-Go Plan. - Learn about the available [plans.](plans-overview) - - Follow the steps in [Hello world](/docs/tutorials/hello-world) to write and run a quantum program. + - Follow the steps in [Hello world](/docs/guides/hello-world) to write and run a quantum program. - Try a [tutorial](/docs/tutorials). \ No newline at end of file diff --git a/docs/tutorials/_toc.json b/docs/tutorials/_toc.json index 4df998d824a..0d2d79ecda0 100644 --- a/docs/tutorials/_toc.json +++ b/docs/tutorials/_toc.json @@ -11,10 +11,6 @@ "url": "/docs/tutorials", "useDivider": true }, - { - "title": "Hello world", - "url": "/docs/tutorials/hello-world" - }, { "title": "CHSH inequality", "url": "/docs/tutorials/chsh-inequality" @@ -114,10 +110,6 @@ "title": "Transpilation optimizations with SABRE", "url": "/docs/tutorials/transpilation-optimizations-with-sabre" }, - { - "title": "Compare transpiler settings", - "url": "/docs/tutorials/circuit-transpilation-settings" - }, { "title": "Long-range entanglement with dynamic circuits", "url": "/docs/tutorials/long-range-entanglement" diff --git a/docs/tutorials/combine-error-mitigation-techniques.ipynb b/docs/tutorials/combine-error-mitigation-techniques.ipynb index 4531d8a08f8..429b5d9ffdb 100644 --- a/docs/tutorials/combine-error-mitigation-techniques.ipynb +++ b/docs/tutorials/combine-error-mitigation-techniques.ipynb @@ -9,6 +9,16 @@ "*Usage estimate: Seven minutes on a Heron r2 processor (NOTE: This is an estimate only. Your runtime might vary.)*" ] }, + { + "cell_type": "markdown", + "id": "95263dce-783f-48a4-88f7-45426dfd5a49", + "metadata": { + "tags": [ + "version-info" + ] + }, + "source": [] + }, { "cell_type": "markdown", "id": "018313d1-d959-4011-81df-59bf7c157470", @@ -16,7 +26,7 @@ "source": [ "## Background\n", "\n", - "This tutorial explores the error suppression and error mitigation options available with the Estimator primitive from Qiskit Runtime. You will construct a circuit and observable and submit jobs using the Estimator primitive using different combinations of error mitigation settings. Then, you will plot the results to observe the effects of the various settings. Most of the tutorial uses a 10-qubit circuit to make visualizations easier, and at the end, you can scale up the workflow to 50 qubits.\n", + "This walkthrough explores the error suppression and error mitigation options available with the Estimator primitive from Qiskit Runtime. You will construct a circuit and observable and submit jobs using the Estimator primitive using different combinations of error mitigation settings. Then, you will plot the results to observe the effects of the various settings. Most of the examples use a 10-qubit circuit to make visualizations easier, and at the end, you can scale up the workflow to 50 qubits.\n", "\n", "These are the error suppression and mitigation options you will use:\n", "\n", @@ -33,7 +43,7 @@ "source": [ "## Requirements\n", "\n", - "Before starting this tutorial, ensure that you have the following installed:\n", + "Before starting this walkthrough, ensure that you have the following installed:\n", "\n", "- Qiskit SDK v2.1 or later, with [visualization](/docs/api/qiskit/visualization) support\n", "- Qiskit Runtime v0.40 or later (`pip install qiskit-ibm-runtime`)" @@ -72,7 +82,7 @@ "source": [ "## Step 1: Map classical inputs to a quantum problem\n", "\n", - "This tutorial assumes that the classical problem has already been mapped to quantum. Begin by constructing a circuit and observable to measure. While the techniques used in this tutorial apply to many different kinds of circuits, for simplicity this tutorial uses the [`efficient_su2`](/docs/api/qiskit/qiskit.circuit.library.efficient_su2) circuit included in Qiskit's circuit library.\n", + "This walkthrough assumes that the classical problem has already been mapped to quantum. Begin by constructing a circuit and observable to measure. While the techniques used here apply to many different kinds of circuits, for simplicity this walkthrough uses the [`efficient_su2`](/docs/api/qiskit/qiskit.circuit.library.efficient_su2) circuit included in the Qiskit circuit library.\n", "\n", "`efficient_su2` is a parameterized quantum circuit designed to be efficiently executable on quantum hardware with limited qubit connectivity, while still being expressive enough to solve problems in application domains like optimization and chemistry. It's built by alternating layers of parameterized single-qubit gates with a layer containing a fixed pattern of two-qubit gates, for a chosen number of repetitions. The pattern of two-qubit gates can be specified by the user. Here you can use the built-in `pairwise` pattern because it minimizes the circuit depth by packing the two-qubit gates as densely as possible. This pattern can be executed using only linear qubit connectivity." ] @@ -204,7 +214,7 @@ "- Translate the gates in your circuit to [Instruction Set Architecture (ISA)](/docs/guides/transpile#instruction-set-architecture) instructions that can directly be executed on the hardware.\n", "- Perform circuit optimizations to minimize the circuit depth and gate count.\n", "\n", - "The transpiler built into Qiskit can perform all of these steps for you. Because this tutorial uses a hardware-efficient circuit, the transpiler should be able to pick a qubit layout that does not require any swap gates to be inserted for routing interactions.\n", + "The transpiler built into Qiskit can perform all of these steps for you. Because this example uses a hardware-efficient circuit, the transpiler should be able to pick a qubit layout that does not require any swap gates to be inserted for routing interactions.\n", "\n", "You need to choose the hardware device to use before you optimize your circuit. The following code cell requests the least busy device with at least 127 qubits." ] @@ -445,7 +455,7 @@ "source": [ "## Scale the experiment up\n", "\n", - "When developing an experiment, it's useful to start with a small circuit to make visualizations and simulations easier. Now that you've developed and tested our workflow on a 10-qubit circuit, you can scale it up to 50 qubits. The following code cell repeats all of the steps in this tutorial, but now applies them to a 50-qubit circuit." + "When developing an experiment, it's useful to start with a small circuit to make visualizations and simulations easier. Now that you've developed and tested our workflow on a 10-qubit circuit, you can scale it up to 50 qubits. The following code cell repeats all of the steps in this walkthrough, but now applies them to a 50-qubit circuit." ] }, { @@ -571,19 +581,7 @@ "\n", "## Conclusion\n", "\n", - "In this tutorial, you investigated different error mitigation options available for the Qiskit Runtime Estimator primitive. You developed a workflow using a 10-qubit circuit, and then scaled it up to 50 qubits. You might have observed that enabling more error suppression and mitigation options doesn't always improve performance (specifically, enabling dynamical decoupling in this case). Most of the options accept additional configuration, which you can test out in your own work!" - ] - }, - { - "cell_type": "markdown", - "id": "9de59efa-f79e-4a8e-b985-3ea8ea10953f", - "metadata": {}, - "source": [ - "## Tutorial survey\n", - "\n", - "Please take this short survey to provide feedback on this tutorial. Your insights will help us improve our content offerings and user experience.\n", - "\n", - "[Link to survey](https://your.feedback.ibm.com/jfe/form/SV_cUCGeqAAI7suE3I)" + "In this walkthrough, you investigated different error mitigation options available for the Qiskit Runtime Estimator primitive. You developed a workflow using a 10-qubit circuit, and then scaled it up to 50 qubits. You might have observed that enabling more error suppression and mitigation options doesn't always improve performance (specifically, enabling dynamical decoupling in this case). Most of the options accept additional configuration, which you can test out in your own work!" ] } ], diff --git a/docs/tutorials/index.mdx b/docs/tutorials/index.mdx index e6d61ebc25b..70e5b15befb 100644 --- a/docs/tutorials/index.mdx +++ b/docs/tutorials/index.mdx @@ -15,7 +15,6 @@ Use these tutorials to learn how to apply Qiskit to common quantum computing use These tutorials are for beginners who are ready to explore running quantum algorithms on a quantum computer. -* [Hello world](/docs/tutorials/hello-world) * [CHSH inequality](/docs/tutorials/chsh-inequality) ## Explore workflows toward advantage @@ -89,8 +88,6 @@ Workload optimization focuses on either efficient orchestration of classical and * [Transpilation optimizations with SABRE](/docs/tutorials/transpilation-optimizations-with-sabre) -* [Compare transpiler settings](/docs/tutorials/circuit-transpilation-settings) - * [Compilation methods for Hamiltonian simulation circuits](/docs/tutorials/compilation-methods-for-hamiltonian-simulation-circuits) * [Long-range entanglement with dynamic circuits](/docs/tutorials/long-range-entanglement) diff --git a/learning/courses/basics-of-quantum-information/multiple-systems/qiskit-implementation.ipynb b/learning/courses/basics-of-quantum-information/multiple-systems/qiskit-implementation.ipynb index 04dc03515e9..00eaeacfc23 100644 --- a/learning/courses/basics-of-quantum-information/multiple-systems/qiskit-implementation.ipynb +++ b/learning/courses/basics-of-quantum-information/multiple-systems/qiskit-implementation.ipynb @@ -451,7 +451,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.12" + "version": "3" }, "title": "Qiskit implementation" }, diff --git a/public/docs/images/tutorials/circuit-transpilation-settings/extracted-outputs/4ada6498-b9d7-4d88-b8a9-ef1dc0a85bf7-0.avif b/public/docs/images/guides/circuit-transpilation-settings/extracted-outputs/4ada6498-b9d7-4d88-b8a9-ef1dc0a85bf7-0.avif similarity index 100% rename from public/docs/images/tutorials/circuit-transpilation-settings/extracted-outputs/4ada6498-b9d7-4d88-b8a9-ef1dc0a85bf7-0.avif rename to public/docs/images/guides/circuit-transpilation-settings/extracted-outputs/4ada6498-b9d7-4d88-b8a9-ef1dc0a85bf7-0.avif diff --git a/public/docs/images/tutorials/circuit-transpilation-settings/extracted-outputs/525777ea-d438-4f3b-acb6-53e579f24a0e-0.avif b/public/docs/images/guides/circuit-transpilation-settings/extracted-outputs/525777ea-d438-4f3b-acb6-53e579f24a0e-0.avif similarity index 100% rename from public/docs/images/tutorials/circuit-transpilation-settings/extracted-outputs/525777ea-d438-4f3b-acb6-53e579f24a0e-0.avif rename to public/docs/images/guides/circuit-transpilation-settings/extracted-outputs/525777ea-d438-4f3b-acb6-53e579f24a0e-0.avif diff --git a/public/docs/images/tutorials/circuit-transpilation-settings/extracted-outputs/761afe09-b669-453f-8363-55070d6c8f57-0.avif b/public/docs/images/guides/circuit-transpilation-settings/extracted-outputs/761afe09-b669-453f-8363-55070d6c8f57-0.avif similarity index 100% rename from public/docs/images/tutorials/circuit-transpilation-settings/extracted-outputs/761afe09-b669-453f-8363-55070d6c8f57-0.avif rename to public/docs/images/guides/circuit-transpilation-settings/extracted-outputs/761afe09-b669-453f-8363-55070d6c8f57-0.avif diff --git a/public/docs/images/tutorials/circuit-transpilation-settings/extracted-outputs/7e7944c5-68ac-40cf-a0eb-5f4a44d53931-0.avif b/public/docs/images/guides/circuit-transpilation-settings/extracted-outputs/7e7944c5-68ac-40cf-a0eb-5f4a44d53931-0.avif similarity index 100% rename from public/docs/images/tutorials/circuit-transpilation-settings/extracted-outputs/7e7944c5-68ac-40cf-a0eb-5f4a44d53931-0.avif rename to public/docs/images/guides/circuit-transpilation-settings/extracted-outputs/7e7944c5-68ac-40cf-a0eb-5f4a44d53931-0.avif diff --git a/public/docs/images/tutorials/hello-world/extracted-outputs/87143fcc-0.svg b/public/docs/images/guides/hello-world/extracted-outputs/87143fcc-0.svg similarity index 100% rename from public/docs/images/tutorials/hello-world/extracted-outputs/87143fcc-0.svg rename to public/docs/images/guides/hello-world/extracted-outputs/87143fcc-0.svg diff --git a/public/docs/images/tutorials/hello-world/extracted-outputs/930ca3b6-0.svg b/public/docs/images/guides/hello-world/extracted-outputs/930ca3b6-0.svg similarity index 100% rename from public/docs/images/tutorials/hello-world/extracted-outputs/930ca3b6-0.svg rename to public/docs/images/guides/hello-world/extracted-outputs/930ca3b6-0.svg diff --git a/public/docs/images/tutorials/hello-world/extracted-outputs/9a901271-0.svg b/public/docs/images/guides/hello-world/extracted-outputs/9a901271-0.svg similarity index 100% rename from public/docs/images/tutorials/hello-world/extracted-outputs/9a901271-0.svg rename to public/docs/images/guides/hello-world/extracted-outputs/9a901271-0.svg diff --git a/public/docs/images/tutorials/hello-world/extracted-outputs/de91ebd0-0.svg b/public/docs/images/guides/hello-world/extracted-outputs/de91ebd0-0.svg similarity index 100% rename from public/docs/images/tutorials/hello-world/extracted-outputs/de91ebd0-0.svg rename to public/docs/images/guides/hello-world/extracted-outputs/de91ebd0-0.svg diff --git a/qiskit_bot.yaml b/qiskit_bot.yaml index 68e9be4d8a6..c1b0e6d56fa 100644 --- a/qiskit_bot.yaml +++ b/qiskit_bot.yaml @@ -159,7 +159,7 @@ notifications: "docs/guides/responsibilities": - "@abbycross" - "@beckykd" - "docs/tutorials/hello-world": + "docs/guides/hello-world": - "@abbycross" - "@beckykd" "docs/guides/allocation-limits": @@ -569,7 +569,7 @@ notifications: "docs/tutorials/advanced-techniques-for-qaoa": - "@miamico" - "@a-matsuo" - "docs/tutorials/circuit-transpilation-settings": + "docs/guides/circuit-transpilation-settings": - "@miamico" - "@henryzou50" "docs/tutorials/grovers-algorithm": diff --git a/scripts/config/notebook-testing.toml b/scripts/config/notebook-testing.toml index d7a0cf55537..5efcd5469b3 100644 --- a/scripts/config/notebook-testing.toml +++ b/scripts/config/notebook-testing.toml @@ -100,7 +100,7 @@ notebooks = [ [groups.cron-job-only] test-strategies.hardware = { patch="qiskit-ibm-runtime-open" } notebooks = [ - "docs/tutorials/hello-world.ipynb", + "docs/guides/hello-world.ipynb", # The following notebook takes >300s to run and should be executed in the # cron job. Even though it does not use real hardware "docs/guides/qiskit-addons-cutting-gates.ipynb", @@ -175,7 +175,7 @@ notebooks = [ "docs/tutorials/multi-product-formula.ipynb", "docs/tutorials/advanced-techniques-for-qaoa.ipynb", "docs/tutorials/ai-transpiler-introduction.ipynb", - "docs/tutorials/circuit-transpilation-settings.ipynb", + "docs/guides/circuit-transpilation-settings.ipynb", "docs/tutorials/grovers-algorithm.ipynb", "docs/tutorials/spin-chain-vqe.ipynb", "docs/tutorials/quantum-approximate-optimization-algorithm.ipynb", diff --git a/scripts/js/commands/checkPatternsIndex.ts b/scripts/js/commands/checkPatternsIndex.ts index 7abf85c2e32..3e8167423fc 100644 --- a/scripts/js/commands/checkPatternsIndex.ts +++ b/scripts/js/commands/checkPatternsIndex.ts @@ -33,6 +33,7 @@ const ALLOWLIST_MISSING_FROM_INDEX: Set = new Set([ "/docs/guides/faq", "/docs/guides/execution-modes-faq", "/docs/guides/open-source", + "/docs/guides/circuit-transpilation-settings", ]); // URLs that show up in the INDEX_PAGES, but are not in the left ToC under