top of page

An Introduction to computing with Qiskit...because why not learn something for the future?

Qiskit is the open-source software Dev-kit (SDK) released by IBM Research for working with quantum computers at the level of circuits, pulses, and algorithms.


First, the big question is: why learn quantum computing as a cybersecurity professional?


The answer: not only does it sound cool, like something straight from a sci-fi novel, but because this is the future and will be the main attraction in the coming years, as things like Quantum Computing as a Service become more prominent.

---------------------------------------------------------------------------------------------------------------------------

Quantum can sound like an intimidating topic, especially if delving into the physics behind the computers themselves; luckily, there won't have to be much of that here. In the most general sense these computers just work better at doing certain things than our currently familiar classical computers, which operate with binary bits, 1 and 0. In quantum computing it is possible for bits to exist as statistical amplitudes of any number between 1 and 0. In English, this just means that when something is being computed there is a likelihood attached to each outcome, and in the world of the quantum scale phenomenon there is a possibility that it can be something in between 1 and 0.


Try not to think too hard about it. Quantum Mechanics is the most thoroughly tested and peer-reviewed subject in academics. Some of the most clever and brightest minds in the last 100 years have tried to understand quantum physics, and the only thing we know about it with ANY certainty at all is: It. Works.


As an aside: PsiQuantum is company with plans to develop and release a million physical-qubit computer to the market; the leading competition is coming in at just around 256 qubits (at time of writing), and that would be the Chinese. With investment backers like Blackrock and Microsoft, it is a safe bet the guys at PsiQuantum know what they are doing.


“Quantum computing is the most profoundly world-changing technology uncovered to date,” said Jeremy O'Brien, CEO, and co-founder of PsiQuantum.

---------------------------------------------------------------------------------------------------------------------------


So, then, that wasn't so bad right? Where were we? Ah yes, Qiskit.


The previous question begs this question: How should one interact with quantum computers, when they look like this, and are more sensitive than a baby with a rash?

IBM's 53 qubit quantum computer from 2019



The answer, at least here, is going to be Qiskit. There are other quantum computing development-kits available. I chose Qiskit because of its popularity and it is written in Python, which, if you are following the Caesar Cipher blog series I am doing you will know is a language that I am trying to learn. Reinforcement is a powerful tool in education.


However, if you are interested in the others, Microsoft's development kit is packaged similarly, with its own Q-language and Azure Quantum as its platform. A quick Google search will yield other quantum development platforms.


Here and Here are the resources I will be using for this blog and the rest of the Qiskit series.


My machine already has Python 3.9 installed, so I will skip the installation of Python; I will circle back to this though as this version of Python will cause problems down the line, which will be addressed and fixed.



Anaconda_Python - here you will want to install the version that is right for your machine

once downloaded, open and follow install instructions, default settings



Once Anaconda has been installed you will want to open it and take a look around. I do not want to get too into the technicals, because I don't understand them very well at this point in the learning experience.


Since I am on a Windows machine I go to the start icon at the lower left, click open, and navigate to the Anaconda Prompt (anaconda3), it will be under recently installed.





$ pip install qiskit

It would be a good idea to also install the latest libraries and complete the migration from qiskit-aqua to qiskit-terra. Do this by entering the following:


$ pip install qiskit[all]

The above command will install Qiskit and related packages to your local machine.


Next, we will need a place to write our Qiskit code. This will be done in Jupyter Notebook, a browser-based application that allows for writing code and running it on a cloud machine.


While in the Anaconda Prompt, after the install is complete, type:


$ jupyter notebook 

Doing so will launch a browser instance of Jupyter or click on the Jupyter Notebook icon from the home panel in your Anaconda Navigator.



Once you have been able to make it to this position, click on the "New" drop down menu from the top right of the screen; next two "Upload" and below "Logout", you will be selecting Python3.


Lastly you should want to verify that Qiskit has been installed and is ready to use, the latter will be covered in another blog. To this we will only be entering one line of code.


$ import Qiskit

As can be seen by my example, proper syntax is important, just like in any programing language.


However, in the second line, to the left hand side of the terminal, the 'In [ ]' will change from open, to wildcard, i.e., 'In [*]' when it is being processed, and finally it will validate and fill the square brackets in with the appropriate line number in the script.


Since 'In [2]' is the last filled in line identifier, we are told that qiskit has been imported into the IDE and will serve our coding needs.


There will be continued follow ups for this blog and the series I am starting on using Qiskit. If any questions arise, I would HIGHLY recommend looking at the documentation from the Qiskit website.


In my next blog post I will be obtaining our IBM API token that will allow us access to the quantum computer to run our code! Stay tuned.

bottom of page