Skip to content

Commit be15040

Browse files
ran tox
1 parent cf52818 commit be15040

File tree

8 files changed

+79
-82
lines changed

8 files changed

+79
-82
lines changed

docs/guides/algorithmiq-tem.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"\n",
5353
"As an advantage, TEM leverages informationally complete measurements to give\n",
5454
"access to a vast set of mitigated expectation values of observables and has\n",
55-
"optimal sampling overhead on the quantum hardware, as described in Filippov et \n",
55+
"optimal sampling overhead on the quantum hardware, as described in Filippov et\n",
5656
"al. (2023), [arXiv:2307.11740](https://arxiv.org/abs/2307.11740), and Filippov\n",
5757
"et al. (2024), [arXiv:2403.13542](https://arxiv.org/abs/2403.13542). The\n",
5858
"measurement overhead refers to the number of additional measurements required to\n",

docs/guides/functions.ipynb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"cells": [
33
{
44
"cell_type": "markdown",
5+
"id": "eaf5b38b-a6e3-4494-95b0-8a43934aa435",
56
"metadata": {},
67
"source": [
78
"{/* cspell:ignore Jarman, HIVQE, Cadavid, Chandarana, Leclerc, Sachdeva, HUBO, Filippov, Downfolding, Aharonov, Mundada, Yamauchi, supersymmetric, Paterakis, Gharibyan, Jaffali, Pellow */}"
@@ -62,7 +63,7 @@
6263
"id": "5e5b0531-f286-4573-8b1e-664ca5496d2d",
6364
"metadata": {},
6465
"source": [
65-
"Functions are provided by IBM® and third-party partners. Each is performant for specific workload characteristics and has unique performance-tuning options. \n",
66+
"Functions are provided by IBM® and third-party partners. Each is performant for specific workload characteristics and has unique performance-tuning options.\n",
6667
"\n",
6768
"## Overview of available functions\n",
6869
"\n",
@@ -487,6 +488,7 @@
487488
{
488489
"cell_type": "code",
489490
"execution_count": 1,
491+
"id": "872b0563-6f88-4e0f-b318-29deb193b0f6",
490492
"metadata": {},
491493
"outputs": [
492494
{

docs/guides/kipu-optimization.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,7 @@
771771
"- Try the [Solve the Market Split problem with Kipu Quantum's Iskay Quantum Optimizer](/docs/tutorials/solve-market-split-problem-with-iskay-quantum-optimizer) tutorial.\n",
772772
"- Review [Romero, S. V., et al. (2025). Bias-Field Digitized Counterdiabatic Quantum Algorithm for Higher-Order Binary Optimization. arXiv preprint arXiv:2409.04477.](https://arxiv.org/abs/2409.04477)\n",
773773
"- Review [Cadavid, A. G., et al. (2024). Bias-field digitized counterdiabatic quantum optimization. arXiv preprint arXiv:2405.13898.](https://arxiv.org/abs/2405.13898)\n",
774-
"- Review [Chandarana, P., et al. (2025). Runtime Quantum Advantage with Digital Quantum Optimization. arXiv preprint arXiv:2505.08663.](https://arxiv.org/abs/2505.08663)\n"
774+
"- Review [Chandarana, P., et al. (2025). Runtime Quantum Advantage with Digital Quantum Optimization. arXiv preprint arXiv:2505.08663.](https://arxiv.org/abs/2505.08663)"
775775
]
776776
},
777777
{

learning/courses/integrating-quantum-and-high-performance-computing/compute-resources.ipynb

Lines changed: 39 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
"cells": [
33
{
44
"cell_type": "markdown",
5+
"id": "4dbd4656-5e40-4d5a-a29b-b13817c19cf2",
56
"metadata": {},
67
"source": [
7-
"# Compute resources and resource management \n",
8+
"# Compute resources and resource management\n",
89
"\n",
910
"\n",
1011
"## Resource Model and Classical Resources\n",
@@ -35,9 +36,9 @@
3536
"\n",
3637
"For memory, the unit of measure would be Mega/Giga/Terabytes.\n",
3738
"\n",
38-
"For graphics cards and other accelerators, the unit of measure depends on the context. While their true computing capabilitiy is measured by fine-grained matrics - number of processing cores, memory size, and memory bandwidth, in high level discussions of cluster resources or job schedulings, GPUs and similar accelerators are can be quantifed at the device-level by the number of whole devices assigned (e.g. 3 GPUs). \n",
39+
"For graphics cards and other accelerators, the unit of measure depends on the context. While their true computing capabilitiy is measured by fine-grained matrics - number of processing cores, memory size, and memory bandwidth, in high level discussions of cluster resources or job schedulings, GPUs and similar accelerators are can be quantifed at the device-level by the number of whole devices assigned (e.g. 3 GPUs).\n",
3940
"\n",
40-
"Network/connectivity/busses are crucial aspect of any compute infrastructure as they dictate how fast data is transferred between compute components. From LPU to cache of CPU, to RAM, to PCI cards, to network connected devices; all of it is communication and it is crucial to have an accurate mental model of it to design highly optimized algorithms for HPC. \n",
41+
"Network/connectivity/busses are crucial aspect of any compute infrastructure as they dictate how fast data is transferred between compute components. From LPU to cache of CPU, to RAM, to PCI cards, to network connected devices; all of it is communication and it is crucial to have an accurate mental model of it to design highly optimized algorithms for HPC.\n",
4142
"\n",
4243
"![An image showing that each computing node may include many types of resources.](/learning/images/courses/integrating-quantum-and-high-performance-computing/compute-resources/resources.svg)\n",
4344
"\n",
@@ -72,6 +73,7 @@
7273
},
7374
{
7475
"cell_type": "markdown",
76+
"id": "b9c79070-17a8-42cc-98ff-27f351df80d9",
7577
"metadata": {},
7678
"source": [
7779
"## New Type of Resource: QPU (Quantum Processing Unit)\n",
@@ -80,9 +82,9 @@
8082
"\n",
8183
"### Definition of QPU\n",
8284
"\n",
83-
"* Quantum processing unit (QPU): A QPU includes all of the hardware responsible for accepting an executable quantum instruction set, or a quantum circuit, and returning an accurate answer. \n",
85+
"* Quantum processing unit (QPU): A QPU includes all of the hardware responsible for accepting an executable quantum instruction set, or a quantum circuit, and returning an accurate answer.\n",
8486
"\n",
85-
"That means the QPU includes one or more quantum chips (e.g. Heron), the multiple additional components in the dilution refrigerator such as the quantum amplifiers, the control electronics, and the classical compute required for tasks such as holding the instructions and waveforms in memory, accumulating results, and future error correction decoding. While a dilution refrigerator is required to perform these tasks, we exclude the dilution refrigerator from this definition to allow for the case of multiple QPUs in the same fridge. \n",
87+
"That means the QPU includes one or more quantum chips (e.g. Heron), the multiple additional components in the dilution refrigerator such as the quantum amplifiers, the control electronics, and the classical compute required for tasks such as holding the instructions and waveforms in memory, accumulating results, and future error correction decoding. While a dilution refrigerator is required to perform these tasks, we exclude the dilution refrigerator from this definition to allow for the case of multiple QPUs in the same fridge.\n",
8688
"\n",
8789
"* Quantum computer: A quantum computer is comprised of the QPU plus the classical compute which hosts the runtime environment.\n",
8890
"\n",
@@ -140,10 +142,10 @@
140142
"\n",
141143
"### Scaling quantum resources\n",
142144
"\n",
143-
"Scaling of quantum resources can also be categorized into vertical and horizontal. \n",
145+
"Scaling of quantum resources can also be categorized into vertical and horizontal.\n",
144146
"\n",
145-
"* Vertical scaling would be increasing the number of qubits per chiplet or improving the fidelity of devices. \n",
146-
"* Horizontal scaling would be connecting chips with couplers or with classical interconnect. \n",
147+
"* Vertical scaling would be increasing the number of qubits per chiplet or improving the fidelity of devices.\n",
148+
"* Horizontal scaling would be connecting chips with couplers or with classical interconnect.\n",
147149
"\n",
148150
"![An image showing vertical scaling of quantum resources as more qubits on a chip, and horizontal scaling of quanum resources as connecting many chips together with couplers.](/learning/images/courses/integrating-quantum-and-high-performance-computing/compute-resources/quantum-scaling.svg)\n",
149151
"\n",
@@ -166,6 +168,7 @@
166168
},
167169
{
168170
"cell_type": "markdown",
171+
"id": "dc79a919-7936-4ed1-b957-f4046f8fca6d",
169172
"metadata": {},
170173
"source": [
171174
"## Resource Management\n",
@@ -188,7 +191,7 @@
188191
"There are analogs of all these processes for quantum computers.\n",
189192
"* Jobs are submitted by the user, leveraging Qiskit runtime, and typically using a Qiskit runtime primitive, like `Sampler`, `Estimator`, or others.\n",
190193
"* The user selects from a list of backends to which they have access. The complete list of available backends can be seen [here](https://quantum.cloud.ibm.com/computers). It is common to simply use the least busy quantum computer. But there are cases where it might be important to use a specific one because of device layout considerations, replication of previous calculations, etc.\n",
191-
"* The execution of quantum jobs is similar to the HPC case. Although some differences have already been outlined, a few are worth repeating here. QPUs are currently not generally located on the same node as classical compute resources but are connected through a network. This may have scheduling implications. Further, quantum computers may have substantial queue times, and these queue times vary, making precising control of timing difficult. This situation may be different for dedicated systems; that depends on the quantum computer's internal administration. \n",
194+
"* The execution of quantum jobs is similar to the HPC case. Although some differences have already been outlined, a few are worth repeating here. QPUs are currently not generally located on the same node as classical compute resources but are connected through a network. This may have scheduling implications. Further, quantum computers may have substantial queue times, and these queue times vary, making precising control of timing difficult. This situation may be different for dedicated systems; that depends on the quantum computer's internal administration.\n",
192195
"\n",
193196
"### Controlling/Managing - Workload Management\n",
194197
"\n",
@@ -197,7 +200,7 @@
197200
"* Job scheduling: The activity of the scheduler software in deciding which jobs run, when, and on which resources, managing priorities and queues to efficiently utilize the HPC system. Although this broad statement applies to quantum resources, there may be less control over timing than with other resources.\n",
198201
"\n",
199202
"![An image showing workloads (shown as boxes) being organized and arranged to fit optimally into a two dimensional grid with one axis representing time and the other representing resources.](/learning/images/courses/integrating-quantum-and-high-performance-computing/compute-resources/resource-manage.svg)\n",
200-
"**Example:** \n",
203+
"**Example:**\n",
201204
"\n",
202205
"Consider a well-known task as a context for understanding resource management: finding the prime factors of large numbers. Let us further assume that the algorithm being used relies on brute force checking of every potential divisor. While this is ofen not the most efficient method, it is easy to understand how the workload might be managed.\n",
203206
"\n",
@@ -218,7 +221,7 @@
218221
"\n",
219222
"High performance computing environments use special software to carry out these steps and manage resources. In the next section, we will learn about a widely-adopted resource management software systems: Slurm.\n",
220223
"\n",
221-
"**Example with quantum resources:** \n",
224+
"**Example with quantum resources:**\n",
222225
"\n",
223226
"A workflow that will be the subject of other lessons in this course is determining chemical ground states and energies using sample-based quantum diagonalization (SQD). This is covered in more detail in Lesson 4, and you can also visit [this course on SQD](https://quantum.cloud.ibm.com/learning/en/courses/quantum-diagonalization-algorithms) and related methods on [IBM Quantum Learning](https://quantum.cloud.ibm.com/learning/). All we need to know for this discussion is that the workflow involves:\n",
224227
"* preparing a quantum circuit\n",
@@ -264,14 +267,15 @@
264267
"\n",
265268
"(a) Planning\n",
266269
"(b) Controlling/managing\n",
267-
"(c) Allocating/scheduling, \n",
270+
"(c) Allocating/scheduling,\n",
268271
"\n",
269272
"\n",
270273
"</details>"
271274
]
272275
},
273276
{
274277
"cell_type": "markdown",
278+
"id": "7ff27439-296e-4dba-98e4-8cae2cc8c9d6",
275279
"metadata": {},
276280
"source": [
277281
"## Software: Slurm\n",
@@ -300,6 +304,7 @@
300304
},
301305
{
302306
"cell_type": "markdown",
307+
"id": "4fea8c6e-a32e-45b6-ad8d-eb349e6cecc3",
303308
"metadata": {},
304309
"source": [
305310
"```shell\n",
@@ -320,14 +325,15 @@
320325
"Gres=qpu:1\n",
321326
"NodeAddr=q1 NodeHostName=q1 Version=21.08.6\n",
322327
"...\n",
323-
" \n",
328+
"\n",
324329
"```\n",
325330
"\n",
326331
"We have 2 partitions or node groups: normal and quantum. The normal partition is composed of nodes that have access to classical resources only. The quantum partition has access to quantum resources. You can see the details of each node by executing `scontrol show nodes`."
327332
]
328333
},
329334
{
330335
"cell_type": "markdown",
336+
"id": "20932bac-88de-49bd-9f58-eea29c31df45",
331337
"metadata": {},
332338
"source": [
333339
"### Running simple hello world example in Slurm.\n",
@@ -346,6 +352,7 @@
346352
},
347353
{
348354
"cell_type": "markdown",
355+
"id": "cc826674-d703-4765-ab30-ecd0b9035007",
349356
"metadata": {},
350357
"source": [
351358
"Now we need to tell the resource manager what resources we need to execute this program. Slurm provides a way to specify all metadata for the job via a submission script, which is just a shell script with Slurm-specific annotations. These annotations allow you to specify resource requirements, schedule parameters, and more. Let's create a `hello_world.sh` shell script for this.\n",
@@ -433,6 +440,7 @@
433440
},
434441
{
435442
"cell_type": "markdown",
443+
"id": "1f32cef4-3b71-49ea-b11b-70c19250bb9e",
436444
"metadata": {},
437445
"source": [
438446
"### Running simple Qiskit hello world example in Slurm.\n",
@@ -446,6 +454,7 @@
446454
},
447455
{
448456
"cell_type": "markdown",
457+
"id": "7fc48590-2dca-4568-b729-6ae09dc41f81",
449458
"metadata": {},
450459
"source": [
451460
"```python\n",
@@ -455,13 +464,13 @@
455464
"from qiskit.quantum_info import SparsePauliOp\n",
456465
"from qiskit.transpiler import generate_preset_pass_manager\n",
457466
"from qiskit_ibm_runtime import EstimatorV2 as Estimator\n",
458-
" \n",
467+
"\n",
459468
"# Create a new circuit with two qubits\n",
460469
"qc = QuantumCircuit(2)\n",
461-
" \n",
470+
"\n",
462471
"# Add a Hadamard gate to qubit 0\n",
463472
"qc.h(0)\n",
464-
" \n",
473+
"\n",
465474
"# Perform a controlled-X gate on qubit 1, controlled by qubit 0\n",
466475
"qc.cx(0, 1)\n",
467476
"\n",
@@ -470,30 +479,30 @@
470479
"\n",
471480
"# switch to QRMI service\n",
472481
"from qiskit_ibm_runtime import QiskitRuntimeService\n",
473-
" \n",
482+
"\n",
474483
"service = QiskitRuntimeService()\n",
475-
" \n",
484+
"\n",
476485
"backend = service.backend(\"...\")\n",
477-
" \n",
486+
"\n",
478487
"# Convert to an ISA circuit and layout-mapped observables.\n",
479488
"pm = generate_preset_pass_manager(backend=backend, optimization_level=1)\n",
480489
"isa_circuit = pm.run(qc)\n",
481-
" \n",
490+
"\n",
482491
"# Construct the Estimator instance.\n",
483-
" \n",
492+
"\n",
484493
"estimator = Estimator(mode=backend)\n",
485494
"estimator.options.resilience_level = 1\n",
486495
"estimator.options.default_shots = 5000\n",
487-
" \n",
496+
"\n",
488497
"mapped_observables = [\n",
489498
" observable.apply_layout(isa_circuit.layout) for observable in observables\n",
490499
"]\n",
491-
" \n",
500+
"\n",
492501
"# One pub, with one circuit to run against five different observables.\n",
493502
"job = estimator.run([(isa_circuit, mapped_observables)])\n",
494503
"\n",
495504
"job_result = job.result()\n",
496-
" \n",
505+
"\n",
497506
"pub_result = job.result()[0]\n",
498507
"\n",
499508
"print(\"Result\", pub_result)\n",
@@ -503,6 +512,7 @@
503512
},
504513
{
505514
"cell_type": "markdown",
515+
"id": "3462d06f-767d-4586-8c95-99426df9c3b1",
506516
"metadata": {},
507517
"source": [
508518
"Here we will use the quantum resource management interface (QRMI), a Slurm Spank plugin for Quantum resources and jobs support which was developed jointly by IBM, Pasqal, the The Hartree Center and RPI. We made a simple pauli-2-design circuit with random initial values and a simple observable and run it using Estimator to get the expectation value. To run it we will again need the submission script `hello_qiskit.sh`, which will have quantum resources as a requirement.\n",
@@ -539,7 +549,7 @@
539549
"# 1 main hello_qiskit root R 0:01 1 q1\n",
540550
"```\n",
541551
"\n",
542-
"And we will be able to explore logs and results after the job is finished. \n",
552+
"And we will be able to explore logs and results after the job is finished.\n",
543553
"\n",
544554
"```shell\n",
545555
"$ cat hello_qiskit.out | grep Exp\n",
@@ -550,6 +560,7 @@
550560
},
551561
{
552562
"cell_type": "markdown",
563+
"id": "5a394dfb-17ce-41a9-85e1-7e4dcff4ef6c",
553564
"metadata": {},
554565
"source": [
555566
"### Recap\n",
@@ -563,18 +574,12 @@
563574
"All the code and scripts used in this chapter are available for you within our Github repository. [TempLink](https://github.ibm.com/Christopher-Porter1/hpc-course-demos/blob/main/source/updates.patch)\n",
564575
"</div>"
565576
]
566-
},
567-
{
568-
"cell_type": "markdown",
569-
"metadata": {},
570-
"source": []
571577
}
572578
],
573579
"metadata": {
574580
"description": "This lesson introduces classical and quantum computing resources and discusses their scaling.",
575-
"title": "Computing resources",
576581
"kernelspec": {
577-
"display_name": "Python 3 (ipykernel)",
582+
"display_name": "Python 3",
578583
"language": "python",
579584
"name": "python3"
580585
},
@@ -588,8 +593,9 @@
588593
"name": "python",
589594
"nbconvert_exporter": "python",
590595
"pygments_lexer": "ipython3",
591-
"version": "3.11.11"
596+
"version": "3"
592597
},
598+
"title": "Computing resources",
593599
"widgets": {
594600
"application/vnd.jupyter.widget-state+json": {
595601
"state": {},

learning/courses/integrating-quantum-and-high-performance-computing/introduction.ipynb

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -139,17 +139,15 @@
139139
"\n",
140140
"## About this course\n",
141141
"\n",
142-
"By the end of this course, you will be able to do more than just repeat technical terms—you will understand how to manage a modern hybrid workflow that assigns specific sub-tasks to a quantum processor while CPUs and GPUs handle the remaining work. You will learn how to write scripts for jobs that transition smoothly between classical nodes and QPUs, interpret the results with accuracy, and recognize where quantum acceleration can truly improve calculations (and where it cannot). Equally important, you will practice maintaining a growth mindset: in a new and rapidly evolving field, no one learns everything at once, and real progress comes from iterating, experimenting, and asking questions.\n",
143-
"\n",
144-
"\n"
142+
"By the end of this course, you will be able to do more than just repeat technical terms—you will understand how to manage a modern hybrid workflow that assigns specific sub-tasks to a quantum processor while CPUs and GPUs handle the remaining work. You will learn how to write scripts for jobs that transition smoothly between classical nodes and QPUs, interpret the results with accuracy, and recognize where quantum acceleration can truly improve calculations (and where it cannot). Equally important, you will practice maintaining a growth mindset: in a new and rapidly evolving field, no one learns everything at once, and real progress comes from iterating, experimenting, and asking questions."
145143
]
146144
},
147145
{
148146
"cell_type": "markdown",
149147
"id": "12ff300a-d0e1-4890-811d-1fdaacb71ef0",
150148
"metadata": {},
151149
"source": [
152-
"This course is broken down into 5 chapters, which are as follows: \n",
150+
"This course is broken down into 5 chapters, which are as follows:\n",
153151
"\n",
154152
"### Course Outline\n",
155153
"\n",
@@ -173,9 +171,8 @@
173171
],
174172
"metadata": {
175173
"description": "This lesson introduces the course in integrating quantum and high-performance computing and includes a course outline.",
176-
"title": "Introduction",
177174
"kernelspec": {
178-
"display_name": "Python 3 (ipykernel)",
175+
"display_name": "Python 3",
179176
"language": "python",
180177
"name": "python3"
181178
},
@@ -189,8 +186,9 @@
189186
"name": "python",
190187
"nbconvert_exporter": "python",
191188
"pygments_lexer": "ipython3",
192-
"version": "3.12.10"
193-
}
189+
"version": "3"
190+
},
191+
"title": "Introduction"
194192
},
195193
"nbformat": 4,
196194
"nbformat_minor": 5

0 commit comments

Comments
 (0)