Image from the Noun Project
H. Alberto Gongora from the Noun Project
Teacher Guide

Putting the rhythm in quantum algorithms

Learn quantum programming basics with the 2-Qubit dance

This is the teacher guide for this lesson. A student-focused guide to assist learners as they perform the activity is available.

View the student guide: Putting the rhythm in quantum algorithms

If we could see inside a quantum computer, how would it work to execute a quantum algorithm?

  • The kit will contain:
  • PowerPoint presentation (which covers the notions and structures the proceeding of the workshop)
  • Link to the YouTube videos of the final activity (the 2-Qubit Dance tutorial and game)
  • The teacher’s and students’ guides
  • To go through the workshop in your class, you will also need:
  • An internet connection
  • A way to display the PowerPoint presentation and the YouTube videos (with sound)
  • Cardboard and markers
  • Tape or mounting putty (reusable adhesive)

Through a series of interactive activities, students will progressively learn about some basic notions of classical computing and build from there to understand how quantum computers are different, how they work and how they are programmed. The first 2 activities let the students experiment with binary code, and the last activity teaches them how to dance a quantum algorithm.

Objectives:

Students will be able to:

  • Differentiate the hardware of classical computers vs. quantum computers
  • Experiment with the concept of a binary code and how it applies in computing with bits of information
  • Understand key quantum principles (superposition of states and entanglement) and how they are used in quantum computing
  • Visualize the representation of a qubit with the Bloch sphere
  • Total time
    45 - 60 min
  • Education level
    Grades 6 - 10
  • Content Area
    Quantum information science
  • Educational topic
    Quantum mechanics, quantum programming, algorithms, quantum logic gates, classical computing, qubits

Quantum mechanics is the branch of physics that studies energy and the behavior of matter at an infinitesimally small scale. Since its beginning 100 years ago, quantum physics’ advances have highlighted counterintuitive but rigorously proven properties of matter, which led to modern applications such as the MRI used daily in hospitals, or the atomic clock on which the GPS is based.

In addition to the present-day applications across a wide range of fields, a particular future application is monopolizing the attention towards quantum technology: quantum computers. While none is performant enough to be applied to real-life problems at the moment, there’s nonetheless a hype because of the many breakthroughs in the recent years and because its potential applications are very promising.

This new type of computer will come with an entirely new way of programming. This is due to the fact that quantum computers are not “simply faster classical computers”: they are not made the same way and don’t work the same way. In a classical computer, the hardware is made of transistors, each of which can be a bit of value 0 or 1. In a quantum computer, the hardware is made of qubits (quantum bits), which can take the values 0 or 1, like classical computers, but also a superposition of 0 and 1 at the same time, in any proportion. In other words, every qubit can compute many different possibilities at the same time, so the calculating power grows exponentially with each qubit. Furthermore, the qubits can be entangled, another quantum phenomenon where they become linked and are affected spontaneously. When the qubits are measured, they collapse (lose their quantum state), and we obtain the results. Since the quantum properties are not exploited in classical computers, the way to program quantum computers has almost nothing to do with classical programming.

Currently, the quantum computers aren’t efficient enough to be applied to real-life problems, because the quantum states of qubits only last for fractions of a second and because they are very “noisy”, meaning imperfectly prepared and measured, so there are many errors. That being said, we already know how the computer will function if those hardware challenges are resolved, and it is also possible to run simulations of quantum algorithms on classical computers for simpler problems. Thus, it is already possible to develop and test quantum software programs and algorithms, and this new way of programming is a growing part of quantum research.

To approach quantum programming in a more intuitive way, it is possible to visualize qubits as Bloch spheres, a 3D geometrical representation where a qubit is a vector starting at the center of a sphere and stretching to the outer perimeter of the sphere. You can then use a convention to determine the value of the qubit based on the position of the vector. For instance, if “up” means “0” and “down” means 1, a 50%-50% superposition of state is represented by a vector pointing at the equator of the sphere, right between 0 and 1.

Quantum programming is based on logic gates that affect qubits. The logic gates can put qubits in a superposition of state, or entangle them. The effect of the gates applied on qubits can be visualized with vectors in the Bloch sphere. For example, if you apply the Y gate, the vector will go through a rotation of 180˚ around the Y-axis. This is like when you spun the coins in the kit’s previous activity and got “heads or tails”. The Y gate can rotate the qubit to the opposite state.

The fun begins when you consider that each of your arms can be seen as a pointing vector on a Bloch sphere, a convenient way to represent the qubit state graphically, because then, you can dance a quantum algorithm with your arms!

Teacher tips

  • Suggested STEP UP Everyday Actions to incorporate into the activity.
  • Consider using whiteboards during discussions, so students have time to brainstorm and work through their ideas before saying them out loud.
  • As students experiment, roam around the room to listen in on discussion and notice experiment techniques. If needed, stop the class and call over to a certain group that has hit on an important concept.
  • Consider these responsive tools and strategies and/or open ended reflection questions to help push student thinking, and to help students track their thinking during the activity.
  • Connect to students’ lives and create opportunities to develop STEM identity using these suggested extensions.
  • Allow the work of physicists to come alive by signing up for a virtual visit from a working physicist using APS’ Physicist To-Go program. You can request a quantum physicist to talk about the concepts students learned in this activity!
Key terms

These are the key terms that students should know by the end of the lesson. They do not need to be front loaded. In fact, studies show that presenting key terms to students before the lesson may not be as effective as having students observe and witness the phenomenon the key terms illustrate beforehand and learn the formalized words afterward. For this reason, we recommend allowing students to grapple with the experiments without knowing these words and then exposing them to the formalized definitions afterward in the context of what they learned.

However, if these words are helpful for students on an IEP, ELL students, or anyone else who may need more support, please use at your discretion.

  • Quantum mechanics:: The branch of physics that studies energy and the behavior of matter at an infinitely small scale.
  • Algorithms:: A set of rules that allow the execution of a particular computer process.
  • Hardware:: The physical equipment and electronic parts of a computer.
  • Software:: Instructions that make a computer do a particular task.
  • Transistor:: An electronic device used to control electrical currents; commonly found in radios, calculators, televisions and computers.
  • Bit:: Most basic unit of information used by computer and electronic devices (the name is the contraction of “binary digit”).
  • Qubits:: Unit of information measurement in quantum computing.
  • Bloch sphere:: A geometrical representation of the pure state space of a qubit or any other two-level quantum mechanical system.
  • Entanglement:: A phenomenon of a group of particles where the quantum state of each particle of the group cannot be described independently of the state of the others, including when the particles are separated by a large distance.
  • Quantum logic gates:: A fundamental component in quantum computation that performs operations on qubits based on quantum principles.
Objectives*

Students will be able to:

  • Understand quantum computers, including how they differ from classical computers and how they are programmed
  • Understand logic gates and how they modify qubits

*It is important to understand that student goals may be different and unique from the lesson goals. We recommend leaving room for students to set their own goals for each activity.


Before the experiment
  • We invite you to watch a brief video demonstration of the developer conducting the experiment you’ll be facilitating with your students.

  • Consider exploring Elisa Torres Durney’s narrative using the lessons ideas detailed on the Introduction found in your materials kits.

  • Verify that you are able to project the videos with sound in the classroom.

  • Go through the PowerPoint presentation, read the presenter’s notes and make variations if desired. With the PowerPoint presentation, you will understand what is taught by each of the 3 interactive activities, which are:

    • Activity 1: Experimenting with binary code via answering with pairs of answers written on cardboard.
    • Activity 2: Using binary code to encode words in ASCII (American Standard Code for Information Interchange).
    • Activity 3: Dancing quantum algorithms.
  • To do the binary code activities (activity 1 and 2), you need to prepare pairs of answers on cardboard. Prepare them by precutting pairs of cardboard rectangles, and then use the markers to write the following (keep in mind they need to be seen from the whole class):

    • For the first pair, write “1” on one and “0” on the other.
    • For the second pair, write “Yes” on one and “No” on the other.
    • Optional: Do as many other pairs as you would like where you have 2 different answers. For example, “hot / cold” “calm / excited”, “light / dark”, “fruit / vegetable”…
  • For each pair of cardboard, prepare a list of questions that can be answered with those pairs of answers (except for the “0 / 1” pair).

    Examples of questions for the “Yes/No” pair: Was your birthday last month? Are you having a good day today? Did you sleep well last night? Do you like cilantro?

  • Watch the YouTube tutorial video and game video to familiarize yourself with them, and decide if you will warn the students before or during the game (second video) about the addition of the second player that happens mid-game. Either way, you will have to instruct the student how to deal with it (for example: instruct the left side of the class to follow the left player and the right side to follow the right player, or have the students execute it in pairs).

  • Print enough student guides for the whole class.

Setting up

Note: It is best to have all your material ready from the start at your desk, but to display or distribute the material for the next activity only when you reach that point in the workshop (each moment to do the activity will be indicated in the PowerPoint presentation), so as not to distract the students.

When opening the PowerPoint, make sure that you accept the access to multimedia content (the dance videos are external), or alternatively, open the 2 YouTube videos as well as the Powerpoint presentation.

You can distribute the student’s sheets before the students’ arrival or when starting the first activity.

Activity 1: Experimenting with binary code

Assemble the pairs of answer cards on your desk.

Activity 2: Discovering how code can carry information

Display the ASCII code for the upper-case alphabet (in the PowerPoint presentation). Use tape (or reusable mounting putty) to stick the “0” card in the top position (at arm’s reach) on a wall and the “1” card on the bottom position, below the “0” (in a way that all students can see both cards).

Activity 3: Dancing quantum logic gates

Open the first video, titled “Tutorial”. Open the second video, titled “Game”.

During the activities

There are some questions to be answered by the class at some points in the PowerPoint presentation. When you come across one, ask the student to answer them verbally or on their sheet before continuing the PowerPoint (every question is answered in the next slide).

  • Activity 1: Experimenting with binary code

    Take the “Yes / No” pair, with the “Yes” in one hand and the “No” in the other, with arms spread apart to separate the cardboard to the left and to the right. Have the students note the convention on their student’s sheet with the appropriate arrows. Then ask 1-2 questions to your class that can be answered by yes or no, and have them respond by pointing left/right (at the answer).

  • Change the position of the cards to put them up and down instead of left and right. Make the students note the new convention, then ask 1-2 new questions where they answer by pointing up/down.

  • Optional: repeat with another pair of cardboard pieces with different answers.

  • Use the PowerPoint presentation to underline the notions experienced with the activity.

  • Activity 2: Discovering how code can carry information

    Present to the class the ASCII code for the upper-case alphabet (in the PowerPoint presentation), where 8 bits (0 or 1) in a certain order means a certain letter (ex: A = 01000001)

  • Tell the student a letter of your choice (letter used for this example in the PowerPoint: I) and ask them to write on their sheet the sequence of 0s and 1s that code for it in ASCII code. Then, referring to the 0 and 1 stuck to the wall, ask the class to execute it, all at the same time. You can do it along with them or let them do it together without you, depending on their level of ease.

  • Then, test if they can understand what letter you are trying to communicate by using only the sequence of up and down (letter used for this example in the PowerPoint: W).

  • When they feel at ease with the ASCII code, go to the next slide and test if they can understand the word encoded with the series of up and down arrows. You can also show them the sequence by pointing up and down correspondingly. Have the students translate it to find the word (answer: CAT). Leave a few seconds for them to translate it and then ask the class how many letters were in your word and what was the word.

  • Use the PowerPoint presentation to underline the notions experienced with the activity.

  • Activity 3: Dancing quantum logic gates

    Use the PowerPoint presentation to present the basic notions, including the Bloch sphere and the quantum logic gates.

  • Tell the class to stand up and to spread themselves in the classroom so that their extended arms can’t touch anyone else.

  • Display the YouTube video for the tutorial and have them follow the movements (they are supposed to follow as if the image was a mirror of themselves).

  • Have them come back to their desks.

  • Use the PowerPoint presentation to highlight some elements of the tutorial (the sequence that creates a superposition of states; how the measurement of a superposed state makes it collapse sometimes up, sometimes down; etc.)

    • You may want to have students produce posters or signs to remember what each logic gate does to a qubit and post them on desks or around the room during the game. This key may be helpful:
    Rotate your arm 180 degrees about the X axis (which runs forward through your body)
    Rotate your arm 180 degrees about the Y axis (which runs left and right)
    Rotate your arm 180 degrees about the Z axis (which runs up and down)
    Rotate arm 90 degrees about the Z axis, to the right
    Rotate arm 90 degrees about the Z axis, to the left
    Applying a Hadamard gate once creates a superposition between 0 and 1 (arm straight out in front of you), and applying it a second time reverses this process, collapsing the superposition back into the original quantum state (the Hadamard operation is its own inverse).

    A great visual + explanation can be found here.

    Swap qubit positions with your other arm (or with the arm of your dancing partner if the Xs are drawn between the two dancing figures).
    Reset your arm to the 0 position.
    If your arm on the side of the small dot (the “control qubit”) is in the 1 position, then your other arm, the one on the same side as the + sign, gets flipped. This happens no matter what position your second arm is in. If your control arm is in the 0 position, then the target arm stays still. If the control arm is in a superposition of 0 and 1, the CNOT is both applied and not applied, so the target arm also ends up in a superposition of 0 and 1. If you apply a CNOT gate to a control qubit that is in a superposition of states, this creates entanglement!
    Your arm collapses to a 0 or a 1, depending on which number flashes on the screen when the qubit gets “measured”.

  • Have the students stand up and spread out again in the classroom.

  • Display the YouTube video for the game and have them follow the movements. Note: in the middle of the game video, a second player is added, so warn them about this when you think best (before starting the game, or when this situation arises in the game).

  • Use the PowerPoint presentation to highlight final remarks and to conclude the workshop.

  • Following up this activity with Activity 8 - Bits vs. Qubits Module 1: Bits vs Qubits Lesson 3: What are qubits? can give students another representation of the superposition of bits and what happens to a qubit as it goes through logic gates and is then measured.

Conclusion

Quantum computers are entirely different from classical computers in the materials they are made of, in the way they work and in the way we program them.

Quantum algorithms are made by using logic gates to prepare quantum states on qubits.

If we could look inside a quantum computer while it runs an algorithm, it would look like it is dancing just like we did!

  • To go further into your quantum programming journey, visit the link below to solve puzzles with quantum algorithms: https://students.yourlearning.ibm.com/activity/MDLPT-341
  • To understand how quantum properties can be used to do cryptography, you can play the BB84 game on this app: https://www.cryptoquantique.app/
  • Design your own choreography!
    • If you wish, film yourself dancing your quantum algorithm and send it to us at: curieuxquantiques@usherbrooke.ca
  • Real world connections
  • Engineering and design challenges connected to the content
    • Qookies game: Your journey through the world of quantum science begins in a research laboratory.

**Real world situations/connections can be used as is, or changed to better fit a student’s own community and cultural context.

PowerPoint presentation

(which covers the notions and structures the proceeding of the workshop)

Solve puzzles with quantum algorithms

To go further into your quantum programming journey, solve puzzles with quantum algorithms.

Play BB84

To understand how quantum properties can be used to do cryptography, you can play the BB84 game on this app.

Send choreography

Design your own choreography! If you wish, film yourself dancing your quantum algorithm and send it to us.

Real world connections

Sign up for Physicists To-Go to have a scientist talk to your students.

Engineering and design challenges connected to the content

Qookies game: Your journey through the world of quantum science begins in a research laboratory.

  • MS-PS4-3
    Integrate qualitative scientific and technical information to support the claim that digitized signals are a more reliable way to encode and transmit information than analog signals.
  • MS Science 4.1 Qubits
    MS Science 4.1 Qubits - Unlike a classical bit, each qubit can represent information in a superposition, or vector sum that incorporates two mutually exclusive quantum states. Quantum bits (qubits) are encoded in quantum systems. Qubits can be 0, 1, or a superposition of 0 and 1.

Credits

Developed by: Dominique Wolfshagen - Institut quantique, Université de Sherbrooke

Piloted by: Kimberly Becker, Ann Marie Dubick, Nataliya Fletcher, Cindy King, Nicholas Sordillo

©️ 2025 by American Physical Society is licensed under CC BY-NC 4.0

License

  1. Attribution — You must give appropriate credit , provide a link to the license, and indicate if changes were made . You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  2. NonCommercial — You may not use the material for commercial purposes

Join your Society

Advance your career, your field, and our world in a community where collaboration and curiosity drive scientific progress.