2025-06-28 - Day 11 - 100 Days of Code

Hello, Friends -

As mentioned yesterday, the Qiskit Global Summer School 2025 is starting in about a week. And, as I’m not especially avid at quantum computing (yet), it would be beneficial to get comfortable around the Qiskit SDK before the July 7 start date. So today I worked on a very basic “Hello, World (but not)” tutorial presented on the Qiskit YouTube channel by Dr. Derek Wang.

For the most part, this went well. I understand about 80% of what is presented in the tutorial. However, things got hairy towards the end because the tutorial was filmed more than a year ago and IBM has upgraded/updated both their SDK and their quantum computing platform. So there were some issues matching the tutorial to today’s Qiskit version 2.x. I had to stop near the end when the API kept replying with something like “the system no longer accepts h circuits” and the “h” circuit is something that was pretty fundamental to the tutorial.

Anyway, it was a good starting point and good exercise. Tomorrow I’ll work through this lecture from last year’s summer school (QGSS 2024) with the updated SDK and changes to IBM’s “primitives”: Primitives on Qiskit v2. It’s an hour long presentation and it looks like there is plenty of coding opportunity too.

I have no roadmap for this pre-class week. I’m just going to play it by ear the next couple days and see how it shakes out. Stay tuned…


Here are some additional thoughts/notes on today’s exercise:

  1. I’m familiar with the Python language as far as writing and manipulating functions, but have limited experience with managing packages and environments (venv vs conda?). And based on today’s work it seems that Python manages packages locally in a .venv directory similar to the way Node manages JavaScript packages in a node_modules directory. There is probably a way to similarly install Python packages globally, as can be done with Node, but I’ll save that for another exercise.

  2. Qiskit SDK runs in Jupyter notebooks and I’m doing this from inside VS Code. To run the code chunks there is a requirement to select a “kernel”. I don’t know whether the kernel belongs to Jupyter or to Python or to both. I know Jupyter runs a server and I assume this is happening inside VS Code behind the scenes - probably one of the half-dozen “Code Plugin” process threads I can see in Activity Monitor.

  3. All of this requires choosing a Python environment, and that is also still new to me. In the tutorial it looked like the presenter was using “conda” and in my setup I did not make a choice but ended up with “venv”. I don’t know how big of a difference this is because all of my code ran as well as the presenter’s, so does it matter?

  4. There were a couple points in the tutorial where we were installing additional Python packages. After each install it was required to “restart the kernel” (the kernel again) and this is accomplished with VS Code command palette. This makes sense after having done it a couple times - the server, once it is running, has no knowledge of the new code and needs to be restarted to incorporate it. Forgive this exceptionally poor wording, it’s pretty late. But trust me - I understand it. The downside is that after restarting the kernel then I had to re-run all the code sections.

  5. Some of the output of this exercise was plain text and would have benefited from a “pretty print” package and it looks like Python has that. I hope I can incorporate this into the exercise in the future. https://docs.python.org/3/library/pprint.html

Published: June 28 2025

  • tags: