Computer Science + QISE Key Concepts K-12 Framework
Home » Teaching and Learning Resources » QISE K-12 Framework » Computer Science + QISE Key Concepts
Incorporating QISE into High School Computer Science
Because of recent advances in the production of quantum computers and their associated potential to revolutionize society, quantum computing has been the subject of increasing media attention. Quantum computing leverages quantum mechanical phenomena to perform computation in new ways. Therefore, the integration of QISE into CS courses is a promising potential avenue for introducing students to QISE concepts.
Many computer science courses focus on solving computational problems, and computer science exercises need contexts in which to apply students’ developing computational problem-solving skills. The challenge is finding appropriate CS exercises related to QISE that:
Computer Science + QISE
- Involve computational solutions of the appropriate difficulty that require the skills already being taught in the course.
- Teach QIS concepts at an introductory level without requiring extensive math or physics skills.
The purpose of this document (available for download as a PDF and to explore below) is to identify integrated activities that thread the needle between those two goals. We have identified several kinds of integrative activities:
- Example: The instructor using a QIS context as an example when introducing a CS topic. This does not require the students to complete an assignment; it is introduced by the instructor.
- Activity: Students engaging in an activity that has a relationship to QIS and CS but does not directly involve programming the computer.
- Design: Students create a language-inspecific design that could be used to create an implementation for a QIS-related concept, but for which a code-level implementation is not required. This could include designing storage (identifying variables and their types) or computation (identifying functions, their uses, and their interfaces).
- Implementation: Students write some code utilizing specific CS skills that implements something related to QIS.
- Investigation: Students perform an investigation that requires using or writing code that gives insight into something related to QIS.
There are limitations currently to integrating certain aspects of quantum information science. For example, programming for quantum computing is still in its infancy, and there exist fewer than a dozen algorithm kernels that can be applied to real-world problems. The topic of algorithms is not directly in the K-12 QISE Key Concepts for two reasons. First, there is not yet a method for taking the kernels and adapting them for different problem domains using a programming language. Second, the level of programming and QISE experience necessary to truly understand those algorithms is more than what would reasonably fit in high school. While one can gain an intuitive understanding of a few toy algorithms that are stepping stones to useful ones, programming a quantum computer is not part of the K-12 QISE Key Concepts, and thus we do not include this in the current framework document.
Note: The QISE K-12 CS Key Concepts were updated in January 2025. More information about the updated QISE K-12 key concepts and a PDF of those key concepts is available at the bottom of this page. The information on this page differs slightly from the Computer Science + QISE Framework PDF because it merges the new key concepts with the originally identified learning outcomes.
Explore the QISE K-12 Key Concepts - Computer Science Framework
Quantum Information Science
Quantum information science (QIS) exploits quantum principles to transform how information is acquired, encoded, manipulated, and applied. Quantum information science encompasses quantum computing, quantum communication, and quantum sensing, and spurs other advances in science and technology.
- Quantum information science combines information theory and computer science, following the laws of quantum mechanics, to process information in fundamentally new ways.
- Quantum information science has already produced and
enhanced high-impact technologies such as the Global Positioning System (GPS), which depends on the extreme precision of atomic clocks based on the quantum states of atoms. - Quantum sensing takes advantage of the fact that quantum systems are extremely sensitive to their surroundings to detect and measure physical properties with the highest precision allowed by quantum mechanics.
Note: The definition of QIS could be discussed as a precursor to any of the other concepts, or in discussions of career opportunities in the field.
Quantum State
A quantum state is a mathematical representation of the complete state of a quantum system consisting of one or more qubits.
- The state of a single qubit must describe the probability of each possible measurement outcome for its bit value (0 vs 1) and phase.
- The state of a single qubit can be represented as a point on a unit sphere (called the Bloch sphere), with the position indicating the probability of measuring phase and 0 vs 1.
- The state of a single qubit can be represented by two complex numbers (called bra-ket notation), from which you can calculate the phase and probability of measuring 0 or 1.
- The state of an n-qubit system can be represented by 2″ complex numbers, organized in a 1-d array (implementing vector notation), from which you can calculate the probability of measuring any combination of measurement outcomes.
HS.CS.2a.1
Quantum states are represented by directions or vectors in an abstract space
Learning Outcomes:
CS Learning Outcome: Students will be able to identify when an array is needed.
QIS Learning Outcome: Students will identify that quantum states are stored as vectors (arrays)
Possible Activity:
Introductory Example: When teaching arrays and giving examples of the uses of arrays, quantum states can be used as an example of a situation requiring an array. A single qubit needs to be stored in an array rather than just a single variable because of the complexity of the state. Teachers can choose the depth to which they explain what it is about a qubit state that requires an array.
Curriculum Connection:
- (ECS) Computing & Data Analysis
HS.CS.2a.2
Description:
Quantum states are represented by directions or vectors in an abstract space
Learning Outcomes:
CS Learning Outcome: Students will be able to, given a piece of data, determine how to break up that data and store it in a simple data structure such as an array or set of variables
QIS Learning Outcome: Students will be able to state the components of quantum state and understand the relationship between that and its vector representation.
Possible Activity:
Design a Solution: Design how to store the information that expresses a quantum state. This would require students
to identify what information needs to be stored and what types / structures are appropriate for their storage.
Curriculum Connection:
- (ECS) Computing & Data Analysis
Standards Alignment (CSTA):
- 3A-CS-01, Grades 9-10 – Explain how abstractions hide the underlying implementation details of computing systems embedded in everyday objects.
HS.CS.2a.3
Description:
Quantum states are represented by directions or vectors in an abstract space
Learning Outcomes:
CS Learning Outcome: Students will be able to write code that can create and manipulate elements in an array.
QIS Learning Outcome: Students will understand the vector structure of a quantum state.
Possible Activity:
Implement a Solution: Store a quantum state in a list (or array) in a way that makes it possible to manipulate,
normalize, and answer questions about the quantum state. Optionally, this activity can also cover complex numbers,
signed and unsigned numbers.
Curriculum Connection:
- (ECS) Computing & Data Analysis
- (CSP) Create Project
Standards Alignment (CSTA):
- 3A-AP-14, Grades 9-10 – Use lists to simplify solutions, generalizing computational problems instead of repeatedly using simple variables.
HS.CS.2a.4
Description:
Quantum states are represented by directions or vectors in an abstract space
Learning Outcomes:
CS Learning Outcome:
- Students will be able to pass and manipulate arrays in functions.
- Students will understand that arrays are passed by reference, so that when a change is made to an array within a function, those changes are reflected after the function returns.
QIS Learning Outcome: Students will understand the vector structure of a quantum state.
Possible Activity:
Implement a Solution: Write functions that accept a quantum state as an array and perform operations that change their values (such as the example below in which they set the state). For example:
void set_qustate_values(float qustate[2], float val0, float val1);
Curriculum Connection:
- (ECS) Computing & Data Analysis
HS.CS.2b.1
Description:
The direction of the quantum state vector expresses the probabilities of all of the possible outcomes of a set of measurements. Quantum manipulations in the physical world follow vector operations, incorporating complex numbers and negative values. This captures a behavior of physical quantum systems that cannot be described solely by the arithmetic of probability.
Learning Outcomes:
CS Learning Outcome: Students will be able to pass arrays into and read values from those arrays from within functions.
QIS Learning Outcome:
- Students will understand the relationship between the quantum state vector and the probability of measurement outcomes.
- Vectors store probability magnitudes
- Probability magnitudes must be squared to obtain the probability
Possible Activity:
Implement a Solution: Write a function that, given a quantum state as an array as well as a position in the array (corresponding to the position in the qustate in which a particular outcome’s information is stored), determines the probability of the measurement being that outcome. For example,
float get_probability(float qustate[2], int position)
{ float val = qustate[position]; return val*val; }
Curriculum Connection:
- (ECS) Computing & Data Analysis
HS.CS.2b.2
Description:
The direction of the quantum state vector expresses the probabilities of all of the possible outcomes of a set of measurements. Quantum manipulations in the physical world follow vector operations, incorporating complex numbers and negative values. This captures a behavior of physical quantum systems that cannot be described solely by the arithmetic of probability.
Learning Outcomes:
CS Learning Outcome:
- Students will be able to create nested loops to perform 2-d calculations
- Students will be able to pass 1-d and 2-d arrays into functions
- Students will be able to read and write values into arrays within functions
- Students will know that any changes made to an array from within a function persist after the function returns
QIS Learning Outcome:
- Students will understand that quantum operations in the real world follow vector operations.
- Students will be able to use matrix multiply to apply gates to qubit state
Possible Activity:
Implement a Solution: Write a function that performs general gate operations by using matrix multiplication. The matrix multiplications can be implemented with functions by using nested loops with 2-d arrays and using the fact that arrays are pass-by-reference. For example,
void apply_gate(float qustate[2], float gate[2][2]);
HS.CS.2b.3
The direction of the quantum state vector expresses the probabilities of all of the possible outcomes of a set of measurements. Quantum manipulations in the physical world follow vector operations, incorporating complex numbers and negative values. This captures a behavior of physical quantum systems that cannot be described solely by the arithmetic of probability.
Learning Outcomes:
CS Learning Outcome:
- Students will be able to write a new class that models a structure with certain shared attributes and behaviors. This requires many skills, such as:
- Students will be able to use private/public/etc. to limit visibility of data in the class.
- Students will be able to declare and use arrays.
- Students will be able to store data in classes and limit their scope to instance methods.
- Students will be able to pass 1-d and 2-d arrays into functions.
- Students will be able to implement algorithms requiring nested loops.
QIS Learning Outcome:
- Students will understand the relationship between the quantum state vector elements and the probability of measurement outcomes.
- Students will be able to calculate the probability magnitude given the probability and vice-versa.
- Students will understand how to use matrix multiplication with quantum state vectors to implement quantum gate operations.
Possible Activity:
Implement a Solution: Implement a class (Python, Java, or other object-oriented language) to hold quantum state, including storing the state in an array of complex numbers and having accessors/mutators to operate with/on the class instances.
HS.CS.2c.1
Description:
Quantum systems are fragile. For instance, measurement almost always disturbs a quantum system in a way that cannot be ignored. This fragility influences the design of computational algorithms and communication and sensing protocols.
Learning Outcomes:
CS Learning Outcome: Students will identify the need for error correction and implement error correcting codes.
QIS Learning Outcome: Students will understand how the fragility of quantum states make them susceptible to errors.
Possible Activity:
Implement a Solution: Make a communication scheme with whistles or keychain LED lights in Morse code and send messages to each other. Then talk about the potential mistakes that could occur and how they might be able to protect against them (using their own error correction schemes). Introduce the rectangle extra-bit parity scheme. Students could code functions that secure data (e.g., the credit card verification code) and then detect and fix errors (depending on the level of protection). Relate this to QIS by describing the types of errors that quantum computers are susceptible to, the fact that there are 7 physical qubits to protect 1 logical qubit (as opposed to the classical version where just 1 parity bit can be used to detect a single error).
HS.CS.2c.1
Description:
Quantum systems are fragile. For instance, measurement almost always disturbs a quantum system in a way that cannot be ignored. This fragility influences the design of computational algorithms and communication and sensing protocols.
Learning Outcomes:
CS Learning Outcome:
- Students will identify algorithms as being part of or not part of a classification of algorithms that are computationally intensive to solve but computationally simple to check.
- Students will be able to calculate the computational complexity of an algorithm.
- Students will be able to identify the value in optimizations that reduce computational complexity of the algorithm at the potential risk of incorrect results for this class of problems.
QIS Learning Outcome:
- Students will understand that quantum computing algorithms sometimes produce incorrect results due to errors.
- Students will be able to articulate that quantum computing algorithms that may give wrong results can still be faster than classical algorithms if they reduce the computational complexity sufficiently and are fast to check.
Possible Activity:
Explore a Concept: Introduce the idea of one-way functions and algorithms – operations that are easy to perform one direction but very challenging (time-consuming) to perform the other direction (e.g. factoring vs. multiplication, solving N-queens vs verifying N-queens). Have students brainstorm their own examples of such problems. Relate this to QIS as such: Some QIS algorithms are very fast but also inaccurate. The reason they have a gain is that even running those algorithms several times with verification is faster than running the accurate (classical) version.
Implement a Solution: Have students implement the solution and the verification code for an algorithm in this class and inspect the code to gain intuition as to what determines the runtime of large problems sizes for such problems. Relate this to QIS as such: Some QIS algorithms are very fast but also inaccurate. The reason they have a gain is that even running those algorithms several times with verification is faster than running the accurate (classical) version.
Quantum Measurement
In order to obtain information from a qubit, a measurement is performed.
- A single measurement does not reveal the complete state (the probability of measuring each outcome) – it only returns a single value.
- Performing a measurement causes a change to the qubit state, collapsing the complex state into the single measured outcome. Subsequent measurements without additional operations will yield the same result.
- Repeated measurements on identically prepared quantum systems is required to determine the full quantum state.
- Quantum states cannot be copied or duplicated.
- Quantum applications are designed to carefully manipulate fragile quantum systems without intermediate measurements to increase the probability that the final measurement will produce the intended result.
HS.CS.3a.1
Description:
A measurement is an interaction with the quantum system that transforms a state with multiple possible outcomes into a “collapsed” state that now has only one outcome: the measured outcome.
Learning Outcomes:
CS Learning Outcome:
- Students will understand the difference between return value and modifying state.
- Students will be able to modify the state of arrays.
- Students will be able to use random number generators to model randomness.
QIS Learning Outcome:
- Students will be able to compute the probability of a measurement outcome.
- Students will understand how to determine the post-measurement state given a measurement outcome.
Possible Activity:
Implement a Solution: Write a function that calls a random number generator and includes the following:
- Measures the quantum state, qustate, and returns the result as the return value
- Changes the state of qustate to collapse the superposition int measure(int qustate[])
HS.CS.3a.2
Description:
A measurement is an interaction with the quantum system that transforms a state with multiple possible outcomes into a “collapsed” state that now has only one outcome: the measured outcome.
Learning Outcomes:
CS Learning Outcome:
- Students will be able to create a program that models elements of a phenomenon or process.
- Students will be able to create interactive data visualizations.
QIS Learning Outcome:
- Students will be able to compute the probability of a measurement outcome.
- Students will understand how to determine the post-measurement state given a measurement outcome.
Possible Activity:
Implement a Solution: Create a Scratch project that models the superposition state visually. When the measurement
button is pressed, it performs a measurement, taking it out of superposition and into the measured state. Optionally
add another element that can change the measurement basis (e.g., H/V to +/- 45).
Curriculum Connection:
- (ECS) Programming unit
HS.CS.3b.1
Description:
A quantum state determines the probability of the outcome of a single quantum measurement, but one outcome rarely reveals complete information about the system.
Learning Outcomes:
CS Learning Outcome: Students will be able to use random number generators to simulate random phenomena that exist in the real world.
QIS Learning Outcome: Students will understand the probabilistic nature of quantum measurements.
Possible Activity:
Investigate a QIS Concept: Investigate the relationship between probabilistic events and the number of instances of those events using weather predictions as a context. First discuss what predictions actually mean. What does a 70% chance of rain mean? If it doesn’t rain, was the prediction wrong? When we perform simulations, we can see multiple possible results and draw conclusions from them. Then have students write an algorithm that predicts whether or not it will rain based on a given percent possibility. Run it once. Run it 10 times. Run it 100 times. Record the result of each trial and calculate the average result. Describe the trend as you run more trials.
Standards Alignment:
- (CSP) Big Idea 3: Algorithms and Programming (AAP)
Related CS Topics:
- Data
- Simulations
- Modeling
- Algorithms
HS.CS.3b.2
Description:
A quantum state determines the probability of the outcome of a single quantum measurement, but one outcome rarely reveals complete information about the system.
Learning Outcomes:
CS Learning Outcome: Students will be able to collect and present data to highlight relationships and support claims.
QIS Learning Outcome: Students will understand the probabilistic nature of quantum measurements.
Possible Activity:
Explore a Concept: Collect data on 100+ days of weather predictions and record the chance of rain vs the outcome (did it rain on each day). Calculate and plot the percent chance it did rain vs the percent chance it was supposed to rain for each percentage present (which is why we want as much data as possible). How does the accuracy increase as the number of days tracked increase? Are some percentages more “accurate” than others?
Related CS Topics:
- Data
- Research
HS.CS.3b.3
Description:
A quantum state determines the probability of the outcome of a single quantum measurement, but one outcome rarely reveals complete information about the system.
Learning Outcomes:
CS Learning Outcome: Students will be able to propose cause-and-effect relationships and make predictions.
QIS Learning Outcome: Students will understand that one outcome rarely reveals complete information about the system.
Possible Activity:
Explore a Concept: Assume that students have already implemented a function, int measure(int qustate[]), that returns measurement outcomes and changes the quantum state qustate. First, challenge students to write an inverse function that, given the final quantum state, can determine the state prior to measurement (they will not be able to do it). Then, lead a discussion about what information the result of a measurement can and cannot tell about the quantum state prior to measurement. Finally, tie this to QIS by explaining that there does not exist a measurement of the full quantum state, so this is a realistic constraint that QIS has.
HS.CS.3c.1
Description:
Repeated measurements on identically prepared quantum systems are required to determine more complete information about the state.
Learning Outcomes:
CS Learning Outcome:
- Students will be able to create loops.
- Students will be able to use random number generators to simulate random phenomena that exist in the real world.
QIS Learning Outcome: Students will understand how repeated measurements can give more complete information about a quantum state.
Possible Activity:
Investigate a QIS Concept: First, ask the students what the probability is of rolling a 7 with two 6-sided dice (theoretical probability).
Then, have them write a function with the following header: int roll()
The function will roll two 6-sided dice and return their sum.
Loop the function call 10 times and count the number of sevens that were rolled. Compute the experimental probability.
How close is this to the theoretical probability?
Loop the function call 1000 times and count the number of sevens that were rolled. Compute the experimental probability. How close is this to the theoretical probability?
Now loop it 10,000 times. Is the result any closer to the theoretical probability?
Discuss the relationship between the number of times rolled and the distance between actual and theoretical results.
Curriculum Connection:
- (ECS) Computing & Data Analysis
Curriculum/Standards Alignment (CSTA):
- 3A-CS-01, Grades 9-10 – Abstraction (using the roll function in another function to compute the probability)
- 3A-IC-26, Grades 9-10 – Demonstrate ways a given algorithm applies to problems across disciplines
HS.CS.3c.2
Description:
Repeated measurements on identically prepared quantum systems are required to determine more complete information about the state.
Learning Outcomes:
CS Learning Outcome: Students will be able to collect and present the same data in various visual formats.
QIS Learning Outcome: Students will understand how repeated measurements can give more complete information about a quantum state.
Possible Activity:
Investigate a QIS Concept: Have students prepare a particular quantum state. Create visualization of data from the repeated measurements of the identically prepared systems with histograms and tables.
- The percentage of different outcomes
- The accuracy vs number of trials
Related CS Topics:
- Data
HS.CS.3c.3
Description:
Repeated measurements on identically prepared quantum systems are required to determine more complete information about the state.
Learning Outcomes:
CS Learning Outcome: Students will use data to highlight or propose cause-and-effect relationships, predict outcomes, or communicate an idea.
QIS Learning Outcome: Students will understand how repeated measurements can give more complete information about a quantum state.
Possible Activity:
Investigate a QIS Concept: Given a coin or a die, develop an algorithm that uses repeated measurements to determine how well the coin or die is manufactured. Is the coin or die equally likely to have every value?
Related CS Topics:
- Algorithm development
- Loops
- Simulations
HS.CS.3c.4
Description:
Repeated measurements on identically prepared quantum systems are required to determine more complete information about the state.
Learning Outcomes:
CS Learning Outcome:
- Students will be able to incorporate portions of an existing program into one’s own work, to develop something new or add more advanced features.
- Students will be able to create loops.
QIS Learning Outcome: Students will understand how repeated measurements can give more complete information about a quantum state.
Possible Activity:
Implement a Solution: Given identically-prepared qubits (with the same unknown state) and only one public function (measure), write a program that measures each qubit and estimates what the original state might have been. Students are provided a function, int measure(int qustate[]) that, given a qubit state, returns a single measurement outcome and changes the quantum state qustate. (potential code solution below)
int ones = 0;
int num_qubits = 100;
For (int i = 0; i <= num_qubits; i++) {
if (qubit[i].measure() == 1) {
ones++;
}
}
printf(“The original state was approximately %f |0> + %f|1> with some
phase.\n”, 1-sqrt(ones/num_qubits), sqrt(ones/num_qubits));
Standards Alignment (CSTA):
- 2-AP-16 Incorporate existing code, media, and libraries into original programs, and give attribution.
- 3B-AP-16 Demonstrate code reuse by creating programming solutions using libraries and APIs.
Related CS Topics:
- Algorithm development
- Loops
- Libraries
HS.CS.3c.5
Description:
Repeated measurements on identically prepared quantum systems are required to determine more complete information about the state.
Learning Outcomes:
CS Learning Outcome:
- Students will be able to incorporate portions of an existing program into one’s own work, to develop something new or add more advanced features.
- Students will be able to create loops.
QIS Learning Outcome: Students will understand how repeated measurements can give more complete information about a quantum state.
Possible Activity:
Investigate a QIS Concept: Given an object with unknown state and only three public functions: initialize, run_algorithm, and measure, write a program that will determine the final state of the qubit after initializing and running the algorithm. Students would write a program that repeats many times, iterating through initializing, running the algorithm, then performing the measurement. (partial solution code below)
For (int i = 0; i <= num_trials; i++) {
qb.initialize();
qb.algorithm();
ones_count += qb.measure();
}
probability = ones_count / num_trials;
Related CS Topics:
- Data encapsulation
- Algorithm development
- Loops
- Initialization (constructors)
- Simulations
HS.CS.3d.1
Description:
Because of the limitations of quantum measurement (providing only partial information and disturbing the system), quantum states cannot be copied or duplicated.
Learning Outcomes:
CS Learning Outcome: Students will understand the difference between variables (storage) and values.
QIS Learning Outcome: Students will understand that classical states can be copied, in contrast to quantum states which cannot be copied or duplicated.
Possible Activity:
Explore a Concept: Identify all of the places in some given program in which values get replicated. Tie to QIS by discussing the fact that quantum data may not be replicated, only moved, so that makes quantum calculations very difficult.
Related CS Topics:
- Variables (storage) vs. values.
- Function calls / call stack, pass by value
HS.CS.3d.2
Description:
Because of the limitations of quantum measurement (providing only partial information and disturbing the system), quantum states cannot be copied or duplicated.
Learning Outcomes:
CS Learning Outcome:
- Students will be able to compare and refine multiple algorithms for the same task and determine which is the most appropriate.
- Students will be able to decompose (break down) the steps needed to solve a problem into a precise sequence of instructions.
QIS Learning Outcome:
- Students will understand that classical states can be copied, in contrast to quantum states which cannot be copied or duplicated.
- Students will understand that the no-cloning theorem creates a challenge for designing quantum algorithms.
Possible Activity:
Implement a Solution: Write a program that does some operation without copying or duplicating any values. Variables can be reused, and values can be moved, but values cannot be replicated. Tie to QIS by discussing the fact that quantum data may not be replicated, only moved, so that makes quantum calculations very difficult. For example, write a program that swaps two variables, x and y, without copying any values. This is related to the SWAP gate in quantum computing.
Note: The swap algorithm is taught in CSP and CSA as a standard algorithm. An alternate algorithm that does not rely on copying values is required for this activity. [For example: x = x + y (just adding), y = x – y (just subtracting), x = x – y (just subtracting)]
Related CS Topics:
- Variables (storage) vs. values.
- Function calls / call stack, pass by value
Qubits
The quantum bit, or qubit, is the fundamental unit of quantum information.
- Unlike a classical bit, each qubit can represent not only a single 0 or 1, but hold both in superposition, with a probability of a measurement outcome of 0 or 1. The probabilities must add to 100%.
- Beyond holding 0 or 1, a qubit also has a phase, which can also be held in superposition and measured.
- A set of n classical bits can hold only one of 2n possible states, but a set of n qubits can hold a superposition of any combination of these states.
- Qubits can be implemented with a variety of technologies like polarization states of light, energy states of an atom, or spin states of an electron.
- Qubits are fragile; environmental disturbances and measurement almost always affect the computation.
HS.CS.4b.1
Description:
At a particular moment in time, a set of n classical bits can exist in only one of 2n possible states, but a set of n qubits can exist in a superposition of all of these states. This capability allows quantum information to be stored and processed in ways that would be difficult or impossible to do classically.
Learning Outcomes:
CS Learning Outcome:
- Students will understand binary representation and exponents.
- Students will understand computer storage requirements.
QIS Learning Outcome: Students will understand the capability of quantum information to be stored and processed in ways that would be difficult or impossible to do classically.
Possible Activity:
Explore a Concept: After presenting some basics on how classical bits are stored and quantum qubits are stored and what they represent, pose the following question: Given n qubits, calculate how many possible basis states there are.
Related CS Topics:
- Binary representation
- Storage requirements
HS.CS.4b.2
Description:
At a particular moment in time, a set of n classical bits can exist in only one of 2n possible states, but a set of n qubits can exist in a superposition of all of these states. This capability allows quantum information to be stored and processed in ways that would be difficult or impossible to do classically.
Learning Outcomes:
CS Learning Outcome: Students will be able to write a new class that models a structure with certain shared attributes and behaviors.
QIS Learning Outcome: Students will understand how qubits store quantum information.
Possible Activity:
Implement a Solution: Write a class, Qubits, that stores the state for a number of qubits in array format. Assign any number of methods that operate on that state, but the following are necessary:
Qubits(int num_qubits);
Int[] measureState();
Have students discuss the following questions about the above class:
- Given n qubits, how long must the array in Qubits be?
- How much memory does this take?
Related CS Topics:
- Object-oriented concepts
- Encapsulation
HS.CS.4b.3
Description:
At a particular moment in time, a set of n classical bits can exist in only one of 2n possible states, but a set of n qubits can exist in a superposition of all of these states. This capability allows quantum information to be stored and processed in ways that would be difficult or impossible to do classically.
Learning Outcomes:
CS Learning Outcome: Students will understand computer storage requirements.
QIS Learning Outcome: Students will understand how qubits store quantum information.
Possible Activity:
Explore a Concept: Watch a video on how quantum information is stored and processed. Discuss similarities and differences between QIS storage and processing as compared to classical storage and processing.
Entanglement
Entanglement, an inseparable relationship between multiple qubits, is a key property of quantum systems necessary for obtaining a quantum advantage in most QIS applications.
- When multiple qubits in superposition are entangled, the measurement outcome of one affects the state of the other(s).
- An entangled quantum system of two or more qubits cannot be described solely by expressing the individual quantum states of each qubit.
HS.CS.5a.1
Description:
When multiple quantum systems in superposition are entangled, their measurement outcomes are correlated. Entanglement can cause correlations that are different from what is possible in a classical system.
Learning Outcomes:
CS Learning Outcome: Students will be able to use data to highlight or propose cause-and-effect relationships, predict outcomes, or communicate an idea.
QIS Learning Outcome: Students will understand that entangled states have correlated measurement outcomes.
Possible Activities:
The following two activities use analogies and manipulatives to describe what is generally happening during quantum entanglement.
Explore a Concept: Perform a brainstorming activity of analogies related to entanglement (e.g., a butterfly wing beats here and has an effect there). Start general and then go more specific. In what ways are these analogies similar and dissimilar to quantum entanglement? Students will brainstorm different relationships and dependencies they know about and then talk about how similar and dissimilar those are to quantum entanglement.
Explore a Concept: The teacher puts a red ball or a blue ball in a box, and puts a second matching ball in a second box. The teacher knows whether both balls are red or both are blue, but the students don’t know what the colors will be until they look into the boxes. With quantum balls, the teacher can prepare the balls in a superposition of red and blue. When students look into the boxes, the balls will always be the same color, but no one, not even the teacher, knew the colors before the measurement (this can be accomplished by having pairs of balls that are velcroed together. The instructor does not look at the color prior to placing the balls in the boxes). Students will be able to, given an analogy with correlated outcomes, identify the ways in which the analogy is similar and dissimilar to quantum entanglement. The teacher could explain that quantum entanglement is a correlation where no one knows the outcome until the qubits are measured. However, unlike the balls in the boxes, that lack of knowledge is the fact that the outcome is not predetermined. It is not that the instructor closed their eyes, but that the ball color isn’t determined until the moment of measurement.
Related CS Topics:
- Object-oriented concepts
- Encapsulation
HS.CS.5a.2
Description:
When multiple quantum systems in superposition are entangled, their measurement outcomes are correlated. Entanglement can cause correlations that are different from what is possible in a classical system.
Learning Outcomes:
CS Learning Outcome:
- Students will be able to create a program that models elements of a phenomenon or process.
- Students will be able to use random number generators to model randomness.
QIS Learning Outcome: Students will understand that entangled states have correlated measurement outcomes.
Possible Activities:
Implement a Solution: Write a function that, with the use of a random number generator, given an original 2-qubit
quantum state, qustate:
- Performs a single measurement of a single qubit.
- Changes the state of the qustate to collapse the superposition.
- If the qubit is entangled with another qubit, updates that second qubit in the 2-qubit quantum state given the result of the measurement of the first.
HS.CS.5b.1
Description:
An entangled quantum system of multiple qubits cannot be described solely by specifying an individual quantum state for each qubit.
Learning Outcomes:
CS Learning Outcome: Students will be able to represent data using multiple encoding schemes.
QIS Learning Outcome: Students will understand that an entangled quantum system of multiple qubits cannot be described solely by specifying an individual quantum state for each qubit.
Possible Activities:
Explore a Concept: Given a set of two-qubit quantum states (expressed in visual, vector, or ket notation, depending on what has been presented in the course), identify which are entangled. Alternatively, write out a two-qubit entangled quantum state.
HS.CS.5b.1
Description:
An entangled quantum system of multiple qubits cannot be described solely by specifying an individual quantum state for each qubit.
Learning Outcomes:
CS Learning Outcome: Students will be able to decompose (break down) the steps needed to solve a problem into a precise sequence of instructions.
QIS Learning Outcome: Students will understand that an entangled quantum system of multiple qubits cannot be described solely by specifying an individual quantum state for each qubit.
Possible Activities:
Implement a Solution: Write a function that, given a 2-qubit quantum state, will determine whether or not it is entangled. The mathematical problem of determining whether a 2-qubit state is entangled can be solved with Algebra 1 material.
Coherence/Decoherence
For quantum information applications to be successfully completed, fragile quantum states must be preserved, or kept coherent.
- Undesired interaction with the surrounding environment causes decoherence, which erodes superposition and entanglement. Decoherence can be caused by light, vibration, heat, or magnetic fields.1
- The amount and type of shielding to prevent decoherence depends on the qubit technology being used.2
- High decoherence rates limit the number of qubits and quantum operations that can be accurately performed.
- A fault-tolerant quantum computer corrects all errors that occur during quantum computation, including those arising from decoherence, but error correction requires significantly more resources than the original computation.
1 These topics are more relevant for physics and chemistry classes.
2 This topic is more of an engineering and materials science research issue and not as directly
relevant for a computer science class.
HS.CS.6c.1
Description:
High decoherence rates limit the length and complexity of quantum computations; implementing methods that correct errors can mitigate this issue.
Learning Outcomes:
CS Learning Outcome: Students will be able to decompose (break down) the steps needed to solve a problem into a precise sequence of instructions.
QIS Learning Outcome: Students will understand that an entangled quantum system of multiple qubits cannot be described solely by specifying an individual quantum state for each qubit.
Possible Activities:
Investigate a QIS Concept: Students will investigate the effect of errors on different computational applications. Students will first write a function that, given a value, randomly introduces an error into that value given a certain error range. Then they will take a variety of applications (music clip, video clip, ASCII file, bank transaction log) and determine the severity of the errors introduced compared with the severity of the outcome of the error. These are not quantitative severities, but qualitative measures of the effects.
HS.CS.6c.2
High decoherence rates limit the length and complexity of quantum computations; implementing methods that correct errors can mitigate this issue.
Learning Outcomes:
CS Learning Outcome:
- Students will understand classical error detection and correction and the idea of parity.
- Students will be able to create 2-d arrays and nested loops.
QIS Learning Outcome: Students will learn that methods can be implemented to correct errors that occur during computation.
Possible Activity:
Explore a Concept & Implement a Solution: First engage students in an activity involving a deck of cards. Create a grid of playing cards (about 5×5), some face up and some face down. Make sure that when you lay them out, there are an even number of face-down cards in every row and column. Then turn your back and have someone flip one over. Then turn back around and figure out which one it is (row & column of flipped card now has an odd number of face-down cards). See if they can figure out what pattern you’re looking for. Explain that the last row and column are parity values, and the real data is the grid other than the parity values.
- Write a function that will take in a 2-d array of values (the last column and row of which are parity bits). It finds and corrects a single error value.
- Write a function that takes in a 2-d array of data values in ROWS-1 rows and COLS-1 columns. This function adds parity bits in the last row and column.
void detect_and_correct(data[ROWS][COLS]);
void add_parity(data[ROWS][COLS]);
HS.CS.6c.3
High decoherence rates limit the length and complexity of quantum computations; implementing methods that correct errors can mitigate this issue.
Learning Outcomes:
CS Learning Outcome:
- Students will understand classical error detection and correction and the idea of parity.
- Students will be able to create functions using 1-d arrays.
QIS Learning Outcome: Students will learn that methods can be implemented to correct errors that occur during computation.
Possible Activity:
Implement a Solution: Write a function that takes in a 13 digit ISBN number passed as an int or a static array. Perform a checksum on the number and return a boolean indication whether or not the ISBN number is valid or not. Can also be done with a 10 digit ISBN number or a UPC code although the algorithms for each would be different.
boolean checkSum(int isbn); boolean checkSum(int[] isbn);
Related CS Topics:
- Classical error detection
- Arrays
- Functions
Quantum Computing
Quantum computers, which use qubits and quantum operations, will solve certain complex computational problems more efficiently than classical computers.
- Entanglement, superposition, and phase are key properties of quantum systems that provide quantum computing its computational advantage over classical computing.
- There are several quantum application areas that quantum computers may accelerate: breaking current cryptography protocols, molecular simulations, and optimizations.
- Qubits can represent information compactly; more information can be stored and processed using 100 qubits than with the largest conceivable classical supercomputer.
- Quantum data can be kept in a superposition of exponentially many classical states during processing, giving quantum computers a significant speed advantage for certain computations such as factoring large numbers (exponential speed-up) and performing searches through all possible solutions to a problem (quadratic speed-up). However, there is no speed advantage for many other types of computations.
HS.CS.7a.1
Description:
Qubits can represent information compactly; more information can be stored and processed using 100 qubits than with the largest conceivable classical supercomputer.
Learning Outcomes:
CS Learning Outcome:
- Students will understand computer storage requirements.
- Students will be able to organize and present collected data visually to highlight relationships and support a claim.
QIS Learning Outcome: Students will understand how qubits store and process quantum information.
Possible Activity:
Design a Solution: Discuss how many bits are needed to represent the state of 1 qubit, 2 qubits, or n qubits, on a classical computer. The key idea is that the number of bits required goes up exponentially with the number of qubits. Develop an equation (where F is the number of bits of a single floating-point number) that calculates the number of bits required to store 1, 2, and n qubits. Assume that a floating-point number requires 64 bits for a real number.
HS.CS.7a.2
Qubits can represent information compactly; more information can be stored and processed using 100 qubits than with the largest conceivable classical supercomputer.
Learning Outcomes:
CS Learning Outcome:
- Students will be able to write a new class that models a structure with certain shared attributes and behaviors.
- Students will be able to create arrays or dynamically-allocated arrays.
QIS Learning Outcome: Students will understand how qubits store and process quantum information.
Possible Activity:
Implement a Solution: Create a class or structure that will hold the data required to model n qubits. Allocate the size based on the parameter n. Depending on how sophisticated you want to get, you can have them write functions like:
- Return the probability of the following measurement outcome for each qubit (n outcomes):
- Return the probability of a single qubit having the following measurement output (given no other measurements):
float probability(int[n] measurement_outcome)
float probability (int measurement_outcome, int qubit)
HS.CS.7b.1
Description:
Quantum data can be kept in a superposition of exponentially many classical states during processing, giving quantum computers a significant speed advantage for certain computations such as factoring large numbers (exponential speed-up) and performing searches (quadratic speed-up). However, there is no speed advantage for many other types of computations.
Learning Outcomes:
CS Learning Outcome: Students will be able to compare tradeoffs associated with computing technologies.
QIS Learning Outcome: Students will understand how quantum computers can have a computational advantage over classical computers.
Possible Activity:
Explore a Concept: Invite students to reason through the prisoner’s dilemma. Discuss the similarities/differences between the outcome of the prisoner’s dilemma when completed using a classical algorithm and when completed using a quantum algorithm (the introduction of entanglement). (Appropriate for the following courses: Game Theory, Discrete Math, AP CSP)
Standards Alignment (CSTA):
- 2-IC-20 – Compare tradeoffs associated with computing technologies that affect people’s everyday
activities and career options
Related Topics:
- Algorithm Development
- Computational Complexity (This topic is not commonly taught at the high school level)
HS.CS.7b.2
Description:
Quantum data can be kept in a superposition of exponentially many classical states during processing, giving quantum computers a significant speed advantage for certain computations such as factoring large numbers (exponential speed-up) and performing searches (quadratic speed-up). However, there is no speed advantage for many other types of computations.
Learning Outcomes:
CS Learning Outcome:
- Students will understand the concept of computational complexity.
- Students will be able to use data to highlight or propose cause-and-effect relationships, predict outcomes, or communicate an idea.
QIS Learning Outcome: Students will understand how quantum computers can have a computational advantage over classical computers.
Possible Activity:
Investigate a Solution: Introduce a basic quantum algorithm portrayed as a game, like Deutsch’s algorithm. Teach the algorithm conceptually as a game where behind a door is either a tiger or a bag of money or something like that, etc. https://arxiv.org/abs/2005.07874
Have the students implement this game classically and analyze the computational complexity (and space requirements) of their own solutions. After that, explain that there exists a quantum algorithm that can solve this in X time (with Y qubits).
HS.CS.7b.3
Description:
Quantum data can be kept in a superposition of exponentially many classical states during processing, giving quantum computers a significant speed advantage for certain computations such as factoring large numbers (exponential speed-up) and performing searches (quadratic speed-up). However, there is no speed advantage for many other types of computations.
Learning Outcomes:
CS Learning Outcome:
- Students will understand the concept of computational complexity.
- Students will understand the difference in runtime between some recursive solutions and iterative solutions.
QIS Learning Outcome: Students will understand how quantum computers can have a computational advantage over classical computers.
Possible Activity:
Investigate a Solution: With students, work on the iterative and recursive solutions to calculating the nth value in the Fibonacci sequence (or work through two different sorting algorithms). Have students run the function on increasingly large numbers, plotting the input number with the runtime. Optionally, can formally present computational complexity to calculate the complexity of each algorithm.
Quantum tie-in: Choose a problem that has a computational complexity advantage in quantum. Present the complexity of each and state that because of quantum’s unique features, there are quantum algorithms that will perform the work in fewer steps. Also mention that the clock rate for quantum computers is significantly slower, so reiterate what computational complexity is good for – comparing very large problems in which the constants don’t matter, not small problems that are solved quickly already on a slow computer.
HS.CS.7b.4
Description:
Quantum data can be kept in a superposition of exponentially many classical states during processing, giving quantum computers a significant speed advantage for certain computations such as factoring large numbers (exponential speed-up) and performing searches (quadratic speed-up). However, there is no speed advantage for many other types of computations.
Learning Outcomes:
CS Learning Outcome: Students will understand that different computational techniques are appropriate for different applications (AP CS A)
QIS Learning Outcome: Students will understand how quantum computers can have a computational advantage over classical computers.
Possible Activity:
Explore a Concept: Given a list of applications, have students identify what techniques they should use. The techniques can vary: arrays vs linked lists, recursion vs iteration, quantum vs classical. The idea is to get a problem, identify its characteristics, and decide what techniques are appropriate. Present the classes of problems that are appropriate for each:
- arrays vs linked list (more static vs more dynamic data)
- recursion vs iteration (tree-shaped computation vs linear computation)
- quantum vs classical (searches, factoring, molecular simulation vs database storage, streaming, simple calculations).
Make a set of cards that have different pictures and descriptions of different applications. The cards are marked as to what they are supposed to categorize about it. Do different rounds, with students first only categorizing arrays vs linked lists. Students are in small groups (2-3 students), and they need to discuss each one. They each make three piles – array, linked list, disagree or unsure. Then go through each and vote, discussing any disagree / unsure categorizations. This isn’t necessarily about being right or wrong, it’s about holding things up for discussion when they aren’t 100% clear so you can understand the decision criteria better. (Based on Is It Alive? from science curricula)
HS.CS.7b.4
Description:
Quantum data can be kept in a superposition of exponentially many classical states during processing, giving quantum computers a significant speed advantage for certain computations such as factoring large numbers (exponential speed-up) and performing searches (quadratic speed-up). However, there is no speed advantage for many other types of computations.
Learning Outcomes:
CS Learning Outcome:
- Students will understand the concept of computational complexity.
- Students will be able to organize and present collected data visually to highlight relationships and support a claim.
QIS Learning Outcome: Students will understand how quantum computers can have a computational advantage over classical computers.
Possible Activity:
Investigate a Solution: Have students write algorithms for prime factoring an integer n. (Using, for example, the Sieve of Eratosthenes).
Record and graph the time needed to factor as n increases. Talk about the exponential time needed to factor numbers. The fact that factoring is time-consuming and difficult for classical computers is the basis for widely-used public key cryptography. Quantum computers are useful because they can factor numbers much faster. Present the complexity of Shor’s algorithm (but not the algorithm itself) and have them graph that curve (starting at a higher spot since quantum computers will be slower on small problems) and compare to what they graphed.
Quantum Communication
Quantum communication uses entanglement or a transmission channel, such as optical fiber, to transfer quantum information between different locations.
- Quantum teleportation is a protocol that uses entanglement to destroy quantum information at one location and recreate it at a second site, without transferring physical qubits.
- Quantum cryptography uses the fragility of quantum systems to detect an eavesdropper’s interloping measurement.
HS.CS.8a.1
Description:
Quantum teleportation is a protocol that uses entanglement to destroy quantum information at one location and recreate it at a second site, without transferring physical qubits.
Learning Outcomes:
CS Learning Outcome:
- Students will be able to model processes by creating and following algorithms (sets of step-by-step instructions) to complete tasks.
- Students will be able to model the role of protocols in transmitting data across networks and the Internet.
QIS Learning Outcome: Students will be able to describe the quantum teleportation protocol.
Possible Activity:
Explore a Concept: Have students role-play the teleportation protocol with students playing the role of Alice and Bob. Talk about the concepts of entanglement, measurement, no-cloning involved in the teleportation protocol. Teleportation allows transfer of a qubit, but students should know that faster-than-light communication is not possible through this process.
Related CS Concepts:
- Emerging ideas and technology
- Innovations in computing technology
HS.CS.8b.1
Description:
Quantum cryptography enhances privacy based on quantum physics principles and cannot be circumvented. Due to the fragility of quantum systems, an eavesdropper’s interloping measurement will almost always be detected.
Learning Outcomes:
CS Learning Outcome:
- Students will be able to model processes by creating and following algorithms (sets of step-by-step instructions) to complete tasks.
- Students will be able to model the role of protocols in transmitting data across networks and the Internet.
QIS Learning Outcome: Students will be able to describe the BB84 quantum key distribution algorithm.
Possible Activity:
Explore a Concept: Have students role-play the BB84 quantum key distribution algorithm. Students can play the roles of the sender Alice, the receiver Bob, and the eavesdropper Eve.
Related CS Concepts:
- Emerging ideas and technology
- Innovations in computing technology
HS.CS.8b.2
Description:
Quantum cryptography enhances privacy based on quantum physics principles and cannot be circumvented. Due to the fragility of quantum systems, an eavesdropper’s interloping measurement will almost always be detected.
Learning Outcomes:
CS Learning Outcome: Students will discuss real-world cybersecurity problems and how personal information can
be protected.
QIS Learning Outcome: Students will understand how the BB84 quantum key distribution allows for privacy through private key cryptography.
Possible Activity:
Explore a Concept: Show students a few private key cryptography protocols, such as XOR of key with the message. Provide a few messages for students to encode and decode, first with known starting points and answers, then allow them to send messages to each other.
Relate to quantum computing by discussing the issues of distributing the secret key and why quantum cryptography helps enhance security for this type of encryption.
Curriculum/Standards Alignment (CSTA):
- 1B-NI-05 – Discuss real-world cybersecurity problems and how personal information can be protected.
HS.CS.8b.3
Description:
Quantum cryptography enhances privacy based on quantum physics principles and cannot be circumvented. Due to the fragility of quantum systems, an eavesdropper’s interloping measurement will almost always be detected.
Learning Outcomes:
CS Learning Outcome: Students will understand how encryption algorithms work and their relationship to computing technology.
QIS Learning Outcome: Students will understand the impact of quantum key distribution on society
Possible Activity:
Explore a Concept: Present the challenge of distributing a secure key over insecure channels. Have students brainstorm different ideas, and draw upon spy movies (e.g. Mission Impossible and 007) and real historical contexts for realistic and amusing examples. Present quantum algorithms, including the proven security of BB84, and how this is stronger than classical methods.
Curriculum/Standards Alignment:
- (CSP) 5.1 Beneficial and Harmful Effects
- (CSP) IOC-1.A Explain how an effect of a computing innovation can be both beneficial and harmful.
- (CSP) IOC-1.B Explain how a computing innovation can have an impact beyond its intended purpose.
- (CSP) 5.C – Describe the impact of a computing innovation.
- (CSP) 5.E – Evaluate the use of computing based on legal and ethical factors.
- (CSTA) 1A-IC-16 – Compare how people live and work before and after the implementation or adoption of new computing technology.
- (CSTA) 3A-NI-06 – Recommend security measures to address various scenarios based on factors such as efficiency, feasibility, and ethical impacts.
Quantum Operations
Quantum operations, or quantum gates, are used to modify quantum state.
- Quantum operations affect a qubit’s state, changing the probability of measuring 0 or 1, its phase, or both.
- Some quantum operations act on a single qubit, whereas others act on two or more qubits.
- Each quantum operation is expressed mathematically as a 2-d array (matrix). Given a 1-d array (vector) that describes the starting quantum state of one or more qubits, the resulting state can be calculated using matrix multiplication.
- All quantum operations must be reversible.
- Quantum operations are implemented without performing a measurement.
Members of Computer Science + QISE Framework Group
The purpose of the QISE K-12 Key Concepts CS Focus Group was to create a document that would be useful to curriculum developers and teachers, providing guidance about places where high school computer science learning goals can be satisfied at the same time as content in the QISE K-12 Key Concepts.
The focus group brought together 6 experts, educators familiar with teaching and research of computer science concepts at high school and/or university levels. The members were:
- *Diana Franklin, University of Chicago, Chicago, IL
- Michael Rogers, King College Prep, Chicago, IL
- Daniel Rozanski, Pittsgrove School District, Pittsgrove, NJ
- Catherine Tabor, Canutillo ISD, El Paso, TX
- Tom Wong, Creighton University, Omaha, NE
- *Brent Yen, University of Chicago, Chicago, IL
*Designates working group lead, convener, and framework editor.
QISE K-12 CS Key Concepts for CS Classes (released Jan 2025)
This document, QIS K-12 Key Concepts for CS Classes, is a companion to the QIS K-12 Key Concepts. The latter document is written for QIS overall, trying to encompass the perspectives of many fields, including physics, computer science, mathematics, and chemistry. The purpose of this document is to introduce and express computational concepts within QIS in a way that is accessible, engaging, and relevant to today’s computer science learners and their teachers. This document can be the starting point for a framework, learning trajectories, and activities for computer science courses.
From a high level, there are a few differences between this document and the QIS K-12 Key Concepts –
- Concepts have been added (Quantum Operations), reordered (Qubits), and removed (Quantum Sensing).
- Some concepts have been reworded to use language and provide background information that is accessible to middle-school and high-school CS students.
- Some supporting fundamentals (sub-concepts) have been added, removed, and reworded.
Inclusion in the QIS K-12 CS Key Concepts is –
- Material would be accessible given what students cover in existing mathematics and CS courses.
- Material is relevant to or builds upon classical CS instruction.
However, this does not imply the authors believe all of this material should be taught in K-12 CS classrooms. We recognize that there are many potential emerging technologies, including data science, machine learning, and AI. Therefore, quantum computing exists in an ecosystem of emerging technologies.
We are releasing this new document (QIS K-12 Key Concepts for CS Classes) for feedback from the community. A companion version of the QIS-CS Framework will be released at a later date.
Please provide any feedback that you would like to share about the QIS Key Concepts for CS Classrooms document: