From 494db3d223373a0b3f977bd36ef659870b82a540 Mon Sep 17 00:00:00 2001 From: Venkat4real Date: Tue, 20 Jan 2026 20:58:12 +0530 Subject: [PATCH 01/11] =?UTF-8?q?Fixed=20typo=20(Added=20=E2=80=9Cbe?= =?UTF-8?q?=E2=80=9D=20and=20removed=20=E2=80=9C,=E2=80=9D)=20=20in=20the?= =?UTF-8?q?=20QML=20course=20page?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- learning/courses/quantum-machine-learning/introduction.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/learning/courses/quantum-machine-learning/introduction.ipynb b/learning/courses/quantum-machine-learning/introduction.ipynb index 6751d7bcb5e..f323cc1e020 100644 --- a/learning/courses/quantum-machine-learning/introduction.ipynb +++ b/learning/courses/quantum-machine-learning/introduction.ipynb @@ -131,7 +131,7 @@ "\n", "__Answer:__\n", "\n", - "A lot. Notably: complex coefficients, and superposition with a single copy. There are many other differences that will discussed in future lessons, including entanglement, and interference.\n", + "A lot. Notably: complex coefficients, and superposition with a single copy. There are many other differences that will be discussed in future lessons, including entanglement and interference.\n", "\n", "True or False? Highly entangled quantum states enable us to solve most machine learning problems more efficiently on a quantum computer.\n", "\n", From 312060a6e25ab15b0eb27e5f80e048442533ee98 Mon Sep 17 00:00:00 2001 From: Venkat4real Date: Wed, 21 Jan 2026 21:23:48 +0530 Subject: [PATCH 02/11] =?UTF-8?q?Fixed=20table=20alignment=20for=205.=20SQ?= =?UTF-8?q?D=20vs.=20VQE,=20added=20=E2=80=98 =E2=80=99=20to=20header?= =?UTF-8?q?=20cell?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../quantum-diagonalization-algorithms/sqd-overview.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/learning/courses/quantum-diagonalization-algorithms/sqd-overview.ipynb b/learning/courses/quantum-diagonalization-algorithms/sqd-overview.ipynb index 9d0f1a8c277..d9a6513849d 100644 --- a/learning/courses/quantum-diagonalization-algorithms/sqd-overview.ipynb +++ b/learning/courses/quantum-diagonalization-algorithms/sqd-overview.ipynb @@ -694,7 +694,7 @@ "id": "0de2cec1-65b2-4186-9ea1-fab2fd48f413", "metadata": {}, "source": [ - "| | VQE | SQD |\n", + "|  | VQE | SQD |\n", "| :---------------- | :------ | :---- |\n", "| Measurement overhead | **Many Pauli terms, many measurement circuits:** The Hamiltonian for the molecule has $2951$ unique Pauli terms. As the Pauli terms can contain $X$ and $Y$ terms, and typical quantum measurements are done in the $Z$-basis, we need measurement basis change to evaluate those terms. When optimized for measurements, the $2951$ terms can be grouped into $1187$ groups, where each group can be evaluated using a single circuit. Thus, we need at least $1187$ unique circuits to evaluate all Pauli terms. **Many shots per circuit for tighter variance**. Again, the evaluated expectation value of each Pauli term has a variance attached to them which depends inversely on the $\\sqrt{shots}$. Therefore, to accurately estimate each term, we need to allocate many shots per circuit. For example, to achieve chemical accuracy ($1$ kcal/mol), typically we need shots in the order of $10^5$-$10^7$ per circuit. Thus, VQE needs many measurement circuits and each circuit with certain number of shots. For practical cases, this measurement overhead can be restrictive. | In SQD, we do not need different measurement circuits for each grouped Pauli terms. Typically, we measure a single circuit for a fixed number of shots. While we may set the number of shots to a large value depending on the problem, the overhead remains much smaller than VQE. Also, the energy estimations using diagonalization process are exact, meaning the computed eigenvalues are exact in that subspace and does not have a variance attached to them like VQE. (In case of Krylov basis state sampling (Lesson 5), we need to measure multiple circuits, but the number circuit remains much smaller than VQE). |\n", "| Estimated energy bound | In VQE, energy estimations are not bounded and can be lower than true minimum values due to noise. | The energy estimation process in SQD always produces upper bound to ground state energy and estimated energy will never be lower than the true ground state energy. |\n", From 56fdfb6367491b2992e2a9197a3f59c92a569cd5 Mon Sep 17 00:00:00 2001 From: Venkat4real Date: Fri, 23 Jan 2026 18:28:05 +0530 Subject: [PATCH 03/11] Fix to remove the horizontal scroll bar for #3780 --- docs/guides/cloud-setup-untrusted.mdx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/guides/cloud-setup-untrusted.mdx b/docs/guides/cloud-setup-untrusted.mdx index 4e44c21cccd..7e3a9f4a285 100644 --- a/docs/guides/cloud-setup-untrusted.mdx +++ b/docs/guides/cloud-setup-untrusted.mdx @@ -31,10 +31,13 @@ To initialize the service in this situation, use code like the following: ```python from qiskit_ibm_runtime import QiskitRuntimeService - # Saved accounts are not used when a token is passed in. The service is initialized with credentials that are not saved. + # Saved accounts are not used when a token is passed in. + # The service is initialized with credentials that are not saved. service = QiskitRuntimeService( # Delete your key on the API keys page after entering this code: - token="", # Use the 44-character API_KEY you created and saved from the IBM Quantum Platform Home dashboard + token="", + # Use the 44-character API_KEY you created and saved from + # the IBM Quantum Platform Home dashboard # Optionally specify an instance to use instance="" ) @@ -70,6 +73,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/guides/hello-world) to write and run a quantum program. + - Follow the steps in [Hello world](/docs/tutorials/hello-world) to write and run a quantum program. - Try a [tutorial](/docs/tutorials). \ No newline at end of file From 301519a38a816553032a5d1e366db5704aa7686b Mon Sep 17 00:00:00 2001 From: Venkat4real Date: Fri, 23 Jan 2026 18:28:05 +0530 Subject: [PATCH 04/11] Moved the API key comment above tocken --- docs/guides/cloud-setup-untrusted.mdx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/guides/cloud-setup-untrusted.mdx b/docs/guides/cloud-setup-untrusted.mdx index 4e44c21cccd..461aa4e1bf6 100644 --- a/docs/guides/cloud-setup-untrusted.mdx +++ b/docs/guides/cloud-setup-untrusted.mdx @@ -31,10 +31,14 @@ To initialize the service in this situation, use code like the following: ```python from qiskit_ibm_runtime import QiskitRuntimeService - # Saved accounts are not used when a token is passed in. The service is initialized with credentials that are not saved. + # Saved accounts are not used when a token is passed in. + # The service is initialized with credentials that are not saved. service = QiskitRuntimeService( # Delete your key on the API keys page after entering this code: - token="", # Use the 44-character API_KEY you created and saved from the IBM Quantum Platform Home dashboard + # Use the 44-character API_KEY you created and saved from + # the IBM Quantum Platform Home dashboard + token="", + # Optionally specify an instance to use instance="" ) @@ -70,6 +74,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/guides/hello-world) to write and run a quantum program. + - Follow the steps in [Hello world](/docs/tutorials/hello-world) to write and run a quantum program. - Try a [tutorial](/docs/tutorials). \ No newline at end of file From 25121bbced3514deeeffce605049274cb31e7b18 Mon Sep 17 00:00:00 2001 From: abbycross Date: Tue, 27 Jan 2026 10:23:47 -0500 Subject: [PATCH 05/11] Update docs/guides/cloud-setup-untrusted.mdx --- docs/guides/cloud-setup-untrusted.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guides/cloud-setup-untrusted.mdx b/docs/guides/cloud-setup-untrusted.mdx index 461aa4e1bf6..6eddd88ca66 100644 --- a/docs/guides/cloud-setup-untrusted.mdx +++ b/docs/guides/cloud-setup-untrusted.mdx @@ -74,6 +74,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 From 1221c6e768cd2da244618b45d6c3e34dd48bf89c Mon Sep 17 00:00:00 2001 From: abbycross Date: Tue, 27 Jan 2026 10:59:23 -0500 Subject: [PATCH 06/11] make pre-existing comments less passive --- docs/guides/cloud-setup-untrusted.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/guides/cloud-setup-untrusted.mdx b/docs/guides/cloud-setup-untrusted.mdx index 6eddd88ca66..f81c8e6d39b 100644 --- a/docs/guides/cloud-setup-untrusted.mdx +++ b/docs/guides/cloud-setup-untrusted.mdx @@ -31,12 +31,12 @@ To initialize the service in this situation, use code like the following: ```python from qiskit_ibm_runtime import QiskitRuntimeService - # Saved accounts are not used when a token is passed in. - # The service is initialized with credentials that are not saved. + # The credentials you enter will override any saved + # account credentials that might be available locally. service = QiskitRuntimeService( - # Delete your key on the API keys page after entering this code: # Use the 44-character API_KEY you created and saved from - # the IBM Quantum Platform Home dashboard + # the IBM Quantum Platform dashboard, and then delete + # the key on the API keys page after entering this code: token="", # Optionally specify an instance to use @@ -76,4 +76,4 @@ Follow these steps to use your API key directly to authenticate to the Qiskit Ru - [Configure the Qiskit SDK locally.](configure-qiskit-local) - 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 + From 6091f7a43fd8247363c1a1c8a536b9d41fb6016e Mon Sep 17 00:00:00 2001 From: Venkat4real Date: Fri, 3 Apr 2026 08:06:22 +0530 Subject: [PATCH 07/11] Fix to remove the horizontal scroll bar #3780 --- docs/guides/install-c-api.mdx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/guides/install-c-api.mdx b/docs/guides/install-c-api.mdx index aab6e37b25e..7d53d5a655a 100644 --- a/docs/guides/install-c-api.mdx +++ b/docs/guides/install-c-api.mdx @@ -23,7 +23,8 @@ int main(int argc, char *argv[]) { // add the term 2 * (X0 Y1 Z2) to the observable QkComplex64 coeff = {2, 0}; - QkBitTerm bit_terms[3] = {QkBitTerm_X, QkBitTerm_Y, QkBitTerm_Z}; // bit terms: X Y Z + QkBitTerm bit_terms[3] = {QkBitTerm_X, QkBitTerm_Y, QkBitTerm_Z}; + // bit terms: X Y Z uint32_t indices[3] = {0, 1, 2}; // indices: 0 1 2 QkObsTerm term = {coeff, 3, bit_terms, indices, num_qubits}; qk_obs_add_term(obs, &term); // append the term From 8c9a64466a3432224b8520e39849a3c929cfcefd Mon Sep 17 00:00:00 2001 From: abbycross Date: Mon, 6 Apr 2026 10:50:15 -0400 Subject: [PATCH 08/11] Apply suggestions from code review --- docs/guides/cloud-setup-untrusted.mdx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/guides/cloud-setup-untrusted.mdx b/docs/guides/cloud-setup-untrusted.mdx index f81c8e6d39b..dca0f2d4745 100644 --- a/docs/guides/cloud-setup-untrusted.mdx +++ b/docs/guides/cloud-setup-untrusted.mdx @@ -36,7 +36,8 @@ To initialize the service in this situation, use code like the following: service = QiskitRuntimeService( # Use the 44-character API_KEY you created and saved from # the IBM Quantum Platform dashboard, and then delete - # the key on the API keys page after entering this code: + # the key on the API keys page in your IBM Cloud account + # after entering this code: token="", # Optionally specify an instance to use From 524f0740636b4848777519ee1e5c75e649f3e416 Mon Sep 17 00:00:00 2001 From: Venkat4real Date: Mon, 6 Apr 2026 21:16:44 +0530 Subject: [PATCH 09/11] Corrections for Install the Qiskit C API --- docs/guides/install-c-api.mdx | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/docs/guides/install-c-api.mdx b/docs/guides/install-c-api.mdx index 7d53d5a655a..3a459437fd6 100644 --- a/docs/guides/install-c-api.mdx +++ b/docs/guides/install-c-api.mdx @@ -84,7 +84,8 @@ include `/path/to/dist/c/lib`. If the Python library is not available per defaul this also needs to be added. These commands depend on the platform. On Linux: ```bash export LD_LIBRARY_PATH=/path/to/dist/c/lib:$LD_LIBRARY_PATH -# on Linux, the Python library is typically included in the dynamic library path per default +# On Linux, the Python library is typically included +# in the dynamic library path by default. export LD_LIBRARY_PATH=/path/to/python/lib:$LD_LIBRARY_PATH ``` On MacOS: @@ -109,7 +110,11 @@ which, if using the example snippet shown previously, should print ``` num_qubits: 100 num_terms: 1 -observable: SparseObservable { num_qubits: 100, coeffs: [Complex { re: 2.0, im: 0.0 }], bit_terms: [X, Y, Z], indices: [0, 1, 2], boundaries: [0, 3] } +observable: SparseObservable { num_qubits: 100, +coeffs: [Complex { re: 2.0, im: 0.0 }], +bit_terms: [X, Y, Z], +indices: [0, 1, 2], +boundaries: [0, 3] } ``` ## Windows @@ -155,5 +160,9 @@ should then print ``` num_qubits: 100 num_terms: 1 -observable: SparseObservable { num_qubits: 100, coeffs: [Complex { re: 2.0, im: 0.0 }], bit_terms: [X, Y, Z], indices: [0, 1, 2], boundaries: [0, 3] } +observable: SparseObservable { num_qubits: 100, +coeffs: [Complex { re: 2.0, im: 0.0 }], +bit_terms: [X, Y, Z], +indices: [0, 1, 2], +boundaries: [0, 3] } ``` From 8f79d38c6f0255a733260e66f7b982cf8dce30c2 Mon Sep 17 00:00:00 2001 From: Venkat4real Date: Sat, 16 May 2026 11:48:48 +0530 Subject: [PATCH 10/11] Update docs to reduce vertical scrolling (fixes #3780) --- docs/guides/debug-qiskit-runtime-jobs.ipynb | 36 ++++++++++++--------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/docs/guides/debug-qiskit-runtime-jobs.ipynb b/docs/guides/debug-qiskit-runtime-jobs.ipynb index f0db12fc964..b98dd792549 100644 --- a/docs/guides/debug-qiskit-runtime-jobs.ipynb +++ b/docs/guides/debug-qiskit-runtime-jobs.ipynb @@ -104,7 +104,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": null, "id": "a45a6d9e-de39-4586-8395-a7f580f0e0dc", "metadata": {}, "outputs": [], @@ -114,7 +114,8 @@ "backend = service.least_busy(operational=True, simulator=False)\n", "\n", "# Generate a preset pass manager\n", - "# This will be used to convert the abstract circuit to an equivalent Instruction Set Architecture (ISA) circuit.\n", + "# This will be used to convert the abstract circuit to an \n", + "# equivalent Instruction Set Architecture (ISA) circuit.\n", "pm = generate_preset_pass_manager(backend=backend, optimization_level=0)\n", "\n", "# Set the random seed\n", @@ -136,7 +137,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": null, "id": "df19af55-897d-4b1f-baf8-fac2641ae87d", "metadata": {}, "outputs": [ @@ -154,8 +155,8 @@ "source": [ "def generate_circuit(n_qubits, n_layers):\n", " r\"\"\"\n", - " A function to generate a pseudo-random a circuit with ``n_qubits`` qubits and\n", - " ``2*n_layers`` entangling layers of the type used in this notebook.\n", + " A function to generate a pseudo-random a circuit with ``n_qubits`` qubits\n", + " and ``2*n_layers`` entangling layers of the type used in this notebook.\n", " \"\"\"\n", " # An array of random angles\n", " angles = [\n", @@ -212,7 +213,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": null, "id": "830b1dcc-2669-46cc-bff8-01a96a05c6ab", "metadata": {}, "outputs": [ @@ -232,7 +233,8 @@ "# Map the observables to the backend's layout\n", "isa_obs = [SparsePauliOp(o).apply_layout(isa_qc.layout) for o in obs]\n", "\n", - "# Initialize the PUBs, which consist of six-qubit circuits with `n_layers` 1, ..., 6\n", + "# Initialize the PUBs, which consist of six-qubit circuits with \n", + "# `n_layers` 1, ..., 6\n", "all_n_layers = [1, 2, 3, 4, 5, 6]\n", "\n", "pubs = [(pm.run(generate_circuit(6, n)), isa_obs) for n in all_n_layers]" @@ -326,7 +328,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": null, "id": "23859a99-2455-460e-98ea-17b36ea59c36", "metadata": {}, "outputs": [ @@ -377,7 +379,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": null, "id": "cd61e437-bd2f-4349-a667-7edab51c4a6e", "metadata": {}, "outputs": [ @@ -425,7 +427,8 @@ " # Print the mean absolute difference for the observables\n", " mean_vals = np.round(np.mean(vals), 2)\n", " print(\n", - " f\"Mean absolute difference between ideal and noisy results for circuits with {all_n_layers[idx]} layers:\\n {mean_vals}%\\n\"\n", + " f\"Mean absolute difference between ideal and noisy results\"\n", + " f\" for circuits with {all_n_layers[idx]} layers:\\n {mean_vals}%\\n\"\n", " )" ] }, @@ -453,7 +456,7 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": null, "id": "0835c562-55c9-4dbe-879e-7271f8bed280", "metadata": {}, "outputs": [ @@ -508,7 +511,8 @@ " # Print the mean absolute difference for the observables\n", " mean_values = np.round(np.mean(values), 2)\n", " print(\n", - " f\"Mean absolute difference between ideal and noisy results for circuits with {all_n_layers[idx]} layers:\\n {mean_values}%\\n\"\n", + " f\"Mean absolute difference between ideal and noisy results\"\n", + " f\"for circuits with {all_n_layers[idx]} layers:\\n {mean_values}%\\n\"\n", " )" ] }, @@ -599,7 +603,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": null, "id": "7db531a1-c417-4d5b-bdc3-7a4ad3385fd4", "metadata": {}, "outputs": [ @@ -626,11 +630,13 @@ } ], "source": [ - "# Look at the mean absolute difference to quickly tell the best choice for your options\n", + "# Look at the mean absolute difference to quickly tell \n", + "# the best choice for your options\n", "for factors, res in zip(noise_factors, results):\n", " d = rdiff(ideal_results[0], res[0])\n", " print(\n", - " f\"Mean absolute difference for factors {factors}:\\n {np.round(np.mean(d), 2)}%\\n\"\n", + " f\"Mean absolute difference for factors\"\n", + " f\" {factors}:\\n {np.round(np.mean(d), 2)}%\\n\"\n", " )" ] }, From d6f27eb387d77a0a932c2e837b73858e5ac211fe Mon Sep 17 00:00:00 2001 From: Venkat4real Date: Sat, 16 May 2026 19:05:48 +0530 Subject: [PATCH 11/11] Update docs to reduce vertical scrolling (fixes #3780) --- .../function-template-chemistry-workflow.ipynb | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/docs/guides/function-template-chemistry-workflow.ipynb b/docs/guides/function-template-chemistry-workflow.ipynb index 547034d2792..4b1cd727c42 100644 --- a/docs/guides/function-template-chemistry-workflow.ipynb +++ b/docs/guides/function-template-chemistry-workflow.ipynb @@ -153,14 +153,18 @@ "serverless = QiskitServerless(\n", " channel=\"ibm_quantum_platform\",\n", " instance=\"INSTANCE_CRN\",\n", - " token=\"YOUR_API_KEY\" # Use the 44-character API_KEY you created and saved from the IBM Quantum Platform Home dashboard\n", + " token=\"YOUR_API_KEY\" # Use the 44-character API_KEY you created and \n", + " # saved from the IBM Quantum Platform Home dashboard.\n", ")\n", "```\n", "\n", "Optionally, use `save_account()` to save your credentials in a local environment (see the [Set up your IBM Cloud account](/docs/guides/cloud-setup#cloud-save) guide). Note that this writes your credentials to the same file as [`QiskitRuntimeService.save_account()`](/docs/api/qiskit-ibm-runtime/qiskit-runtime-service#save_account):\n", "\n", "```python\n", - "QiskitServerless.save_account(token=\"YOUR_API_KEY\", channel=\"ibm_quantum_platform\", instance=\"INSTANCE_CRN\")\n", + "QiskitServerless.save_account(\n", + " token=\"YOUR_API_KEY\",\n", + " channel=\"ibm_quantum_platform\",\n", + " instance=\"INSTANCE_CRN\")\n", "```\n", "\n", "If the [account is saved](/docs/guides/save-credentials), there is no need to provide the token to authenticate:" @@ -222,7 +226,8 @@ "template = QiskitFunction(\n", " title=\"sqd_pcm_template\",\n", " entrypoint=\"sqd_pcm_entrypoint.py\",\n", - " working_dir=\"./source_files/\", # all files in this directory will be uploaded\n", + " working_dir=\"./source_files/\", \n", + " # all files in this directory will be uploaded\n", " dependencies=[\n", " \"ffsim==0.0.54\",\n", " \"pyscf==2.9.0\",\n", @@ -344,7 +349,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": null, "id": "a1719ab1", "metadata": {}, "outputs": [], @@ -373,7 +378,9 @@ "}\n", "\n", "solvent_options = {\n", - " \"method\": \"IEF-PCM\", # other available methods are COSMO, C-PCM, SS(V)PE, see https://manual.q-chem.com/5.4/topic_pcm-em.html\n", + " \"method\": \"IEF-PCM\", \n", + " # Other available methods are COSMO, C-PCM and SS(V)PE.\n", + " # see https://manual.q-chem.com/5.4/topic_pcm-em.html for more details\n", " \"eps\": 78.3553, # value for water\n", "}\n", "\n",