This is an introductory level workshop on quantum computing I delivered following a talk by Madeleine Tod, a member of IBM’s Qiskit team. The talk was aimed to UG students and to PG students/postdocs with little-to-no experience in quantum computing, with the workshop having a similar aim, but having in mind students and researchers from areas outside physics (maths, engineering & computer sciences).

Here I will give the instruction about how to present a similar workshop. Previous experience and knowledge in classic and quantum computing and in quantum mechanics are necessary to properly deliver the workshop.

Because of the intended audience, a brief introduction on quantum computation is necessary at the beginning of the workshop, were three main concepts are explained in a rather non-technical way:

  • Qubits: What is a qubit, what is the difference from a regular bit, how are they represented mathematically and how the dimension space grows with the number of qubits in the system.
  • Gates: What are transformations, their mathematical representation and importance of time order for the operations.
  • Circuits: The graphical representation of qubits and gates, the significance of this visual tool and how to construct/read a circuit in terms of operations.

This explanations should be given using very little mathematics and language that can be understood by the audience. To make things easier to follow, it is recommended to give each attendant a copy of the following handout, which was crafted to be printed in grayscale on a single sheet of paper (using both sides):

As it can be noted from the handout, the workshop was crafted around the Circuit Composer from the IBM Q Experience. This is an online tool that allows to create quantum circuits using a visual interface for Python-based code. The code uses the Qiskit package, which operates on the OPENQASM language. The Qiskit library can be downloaded for offline programming using your favourite distribution of Python. The Q Experience also allows to run your circuit in a real quantum computer, though the length of the queue for submission should be taken into consideration if you want to show this feature during the workshop. It is very important that you verify ahead of the workshop that your computer and those to be used by the students can smoothly run the Q Experience. If you are experiencing very slow performance or the page is not loading, try changing your web browser.

The circuit composer have the advantage of providing quick and intuitive results of the operations and modifications of the components in the circuit. It also allows to show realistic results, which can be used to introduce concepts like measurement of quantum states, random distributions and errors/noise in the circuit. It is highly recommended to inform the students about the use of the Q Experience for the workshop and ask them to sign up and familiarise with it on the days prior to the workshop to save time and increase engagement.

After everyone has gotten access and the different parts of the circuit composer have been explained, the following examples are presented in order, giving time in between each one to allow to students to reproduce and test them:

  1. NOT gate: Reduce the number of qubits to 1 and insert the X gate into your circuit. Use the visualisations tools of the circuit composer to show how the gate “flips” the state of the qubit. Ask them what will happen when two consecutive X gates are applied and then show the results.
  2. Hadamard gate: Remove all previous gates and then insert the H gate. Use again the visualisation tools to show the superposition, change the initial state and explain what the colour in the graphs represent.
  3. Z measurement: First ask what they expect to observe if they read a qubit in an entangled state, then explain that the measurement will collapse the state, obtaining one of the two possible states. Insert a Z measurement after an H gate and, if possible, send the circuit to an available quantum computer. Show the results and explain why they are different from the expected value (which will be due to randomness and errors).
  4. CNOT gate: Increase the number of qubits to two. Explain that gates can act simultaneously on more than one qubit. Insert the cX gate into your circuit and explain how it works. Modify the code in the circuit editor to change the control and target of the cX to emphasise the way it acts and how to read its symbol.
  5. Entanglement: Add a H gate for the control bit before the cX gate to create an entangle state and explain what is especial about this kind of states. Insert measurements for both qubits, run the circuit, and discuss the results.
  6. Toffoli gate: Clear the circuit, increase the number of qubits by one and introduce the ccX gate, mentioning its importance. Add a X gate for the target qubit and create a table comparing the state of the target qubit with the state of the control qubits. Explain that if you consider the control qubits as the input and the target qubit as the output, the current circuit will reproduce the operation done by an AND logic gate from classic computation. Explain that, in a similar way, all logical operations from classic computing can be reproduce by an arrange of quantum gates. Ask what would happen if superpositions are used as the input states of the ccX gate, show the results and discuss them.
  7. Superdense coding: Highlight that the importance of quantum computers is not their capacity to reproduce classic computation, but rather their potential to do something that classic computers just can’t. To show this introduce the protocol for superdense coding, which should look something like this:

Broadly explain how it works in terms of being able of encoding to classic bits into one qubit and how this can’t be achieved using only classic bits. Understanding this may be hard, so allow time for questions and further discussion.

  1. Teleportation: The previous example may not be very impressive, so proceed with another purely-quantum protocol, quantum teleportation. The circuit for this protocol will be similar to this one:

Once again, broadly describe how it works and, if possible, try to run the circuit in a quantum computer to further discuss the results. Here you may want to change the state of the teleported qubit (the top one, for the previous circuit) to make the results more insightful, preferably to a superposition state. Allow some time for the participants to reproduce the circuit and try it themselves.

All of this should be enough to cover a 1 to 1.5 hour slot, depending how fast the information is delivered and how much time is allowed for questions and test of the showcased circuits by the attendants. If the is extra time, either because your delivery was too fast, because there were no question or because you booked a longer time slot, here is a couple of this you can do to improve the workshop:

  • Give the students some supervised practice time. Here the students can try developing their own circuits, better understand how the gates work and ask for assistance if things don’t work the way they expected.
  • Give the students some other circuits. Either give them instructions about how to create them, preferably a picture, or give them access to files with code for circuits (you can develop them yourself or get them from one of the many online circuit libraries). The students should be able to reproduce the circuits, modify them and gain a better intuition about what they do.
  • Give the students challenges. Set one or a couple of task that they should develop a circuit(s) to do. This can be something from classic computation, like calculating the sum of the value from 2 or 4 input qubits, or something purely quantum. A very complicated task may not be recommended given the intended level of the workshop.

Other considerations and possible modifications to the workshop:

  • Although its content was designed with a broad audience in mind, it would be better to tailor it according to the level of experience and knowledge of the attendants, using more/less mathematics and more/less specialised terms.
  • The handout can be given or made available online before the workshop to allow the students to carefully read it and formulate questions to clarify its content. It can also be given before or at the beginning of the workshop without going into detail to replace the introduction in cases of severe time constrain or an audience mostly familiar with the described concepts.
  • If you are interested in running the workshop with a more programming-based approach, I would be preferable to do all the modification of the circuit on the code rather than using the click and drag feature.

My overall experience with the workshop was quite positive. I had a considerable number of participants with a good ratio of PG and UG students. There was also a good gender ratio, especially if taking the Department’s statistics into consideration. Here is a picture of me with the participants on the day:

I had more people, including postdocs and even researchers expressing interest in attending, but unable to do so because of lack of time. This opens the possibility of running the workshop again in the future. I would be interested into delivering the workshop to people from different backgrounds, particularly outside physics, to see how they respond to it and gain insight about how to improve it.