Skip to main content

Welcome to a Grasp lesson

Create a free account to keep studying and create your own study path.

Lesson 20

Multi-Qubit Measurement Probabilities

Recommended resources

Hello! In our last lesson, we established that measuring a qubit in superposition causes the state to collapse into a definite classical outcome. We saw that for a single qubit in state , the probability of measuring 0 is and the probability of measuring 1 is .

Today, we'll build directly on that foundation. We're moving from single qubits to the more complex and powerful world of multi-qubit systems. Our goal is to calculate measurement outcome probabilities for a multi-qubit circuit. This involves two key skills: calculating the probability of measuring a specific combination of all bits (e.g., 01), and calculating the probability of measuring just one part of the system (e.g., the first qubit being 0).

1. The Born Rule for Multiple Qubits

The rule for calculating measurement probabilities in multi-qubit systems is a natural extension of the single-qubit case. A system of qubits is described by a state vector with complex amplitudes, one for each possible classical outcome.

Here, is the basis state corresponding to the binary representation of the integer . For example, in a 3-qubit system, is shorthand for .

The Born rule states that the probability of measuring the system and finding it in the specific basis state is the squared magnitude of its corresponding amplitude, .

Just as with a single qubit, the sum of all these probabilities must equal 1.

The following resource provides a detailed walkthrough of this principle, using a specific 3-qubit superposition state called the W-state as an example.

Multi-Qubit Measurements

This reading from the "Learn Quantum Computing using Python" textbook explains how to calculate measurement probabilities for a full multi-qubit state.

Please read the section titled "3.1 Full State Measurement." Focus on the example provided with the |\textit{w}\rangle state: |\textit{w}\rangle = \frac{1}{\sqrt{3}}|001\rangle + \frac{i}{\sqrt{3}}|010\rangle - \frac{1}{\sqrt{3}}|100\rangle Follow the calculation showing that the probability of measuring each of the three basis states in the superposition is 1/3, while the probability of measuring any other state (like |000\rangle or |111\rangle) is zero. Also, review the Qiskit code that verifies this result experimentally.


2. Partial Measurements: Measuring a Single Qubit

A more common and interesting scenario is when we measure only a subset of the qubits in a circuit. For example, in a 3-qubit system, what is the probability of measuring the first qubit and getting a 1, regardless of what the other two are?

The rule is straightforward: you sum the probabilities of all the full-state outcomes that match your partial measurement criterion.

Let's continue with the W-state from the previous section:

(Remember that in Qiskit's little-endian convention, this would be written with qubit 0 on the right, so the states are ).

Let's find the probability of measuring the last qubit, , and getting 0.

  1. Identify all basis states in the superposition where is 0: These are and .
  2. Find the probability of measuring each of those states:
  3. Sum these probabilities:

This process is explained very clearly in the following short video.

Quantum Computing Course: 2.4 Measuring Singular Qubits

This video from Quantum Soar gives a concise, intuitive explanation of how to calculate the probability of measuring a single qubit in a multi-qubit system.

Watch the first 45 seconds of the video. The narrator explains the core principle: "we do this by looking at all the superposition states where the [target] cubit is [the desired value], then summing up the probabilities of measuring those states."

State Collapse after Partial Measurement

Just as with a full measurement, a partial measurement also collapses the quantum state. However, it only collapses it partially. The superposition is eliminated with respect to the qubit that was measured, and the overall state must be renormalized so the new probabilities sum to 1.

The next section of the reading you started provides the formal procedure for this.

Partial State Measurement

This section continues the W-state example to demonstrate the mathematics of partial measurement and state collapse.

Now, read the section titled "3.2 Partial State Measurement." It will walk you through the same calculation we just did for P(q_0=0) and P(q_0=1). Most importantly, pay attention to how the state vector changes after the measurement. For instance, if you measure q_0=0, the post-measurement state becomes a normalized superposition of just |010\rangle and |100\rangle.


3. A Practical Example: From Math to Code

It's one thing to do these calculations on paper, but it's another to see them match a real simulation. Sometimes, a mismatch can reveal subtle but crucial details about the quantum computing framework you're using.

Let's analyze a common scenario where a developer's calculations don't match their Qiskit simulation results.

Calculating measurement probabilities from a quantum circuit

This Stack Exchange thread shows a user who is confused by their simulation results, and the answer reveals two important practical details about Qiskit.

First, read the question. The user builds a simple 2-qubit circuit, calculates the expected final state vector, and predicts non-zero probabilities for measuring |00\rangle, |10\rangle, and |11\rangle. However, their Qiskit simulation never produces |11\rangle. Next, read the answer. The expert provides two explanations. Intuition: The CRY gate has q_1 as the control. Since q_1 starts in the |0\rangle state, the controlled rotation on q_0 is never activated. This is a great conceptual check. Explicit Calculation: This is the key part. The expert points out that the user's matrix for the CRY gate was incorrect for the circuit they built. The user's matrix had q_0 as the control, but the circuit diagram shows q_1 as the control. Furthermore, the answer highlights Qiskit's little-endian qubit ordering (q1q0), which means the bitstring you see in the results might be the reverse of what you expect from the mathematical tensor product order.

This example is a valuable lesson in bridging theory and practice. The mathematical rules for probability are universal, but their application in a specific framework like Qiskit requires careful attention to conventions like gate definitions and qubit ordering.


Conclusion

In this lesson, we generalized the concept of measurement from single to multi-qubit systems. You now have the tools to predict the outcome of any measurement on any quantum circuit, given its state vector.

Key Takeaways:

  • Full State Measurement: The probability of measuring a multi-qubit system in a specific basis state is given by the Born rule: , where is the amplitude of that state.
  • Partial State Measurement: To find the probability of a specific outcome for a subset of qubits (e.g., ), you sum the probabilities of all the full basis states that are consistent with that outcome.
  • Post-Measurement Collapse: After a partial measurement, the state collapses. Components of the superposition that are inconsistent with the measurement outcome are eliminated, and the new state vector is renormalized.
  • Theory vs. Practice: When implementing circuits, it is crucial to pay attention to the specific conventions of your framework (like Qiskit's little-endian ordering) to ensure your theoretical calculations match the simulated results.

Preview of the Next Lesson:
We have now covered all the essential theoretical pillars of the quantum circuit model: representing states with vectors, manipulating them with unitary gates, and predicting measurement outcomes. You're ready to start building. In the next lesson, we will begin Module 3 by focusing on the practical side of things: setting up your own Qiskit development environment. This will be our first step towards writing and running your own quantum programs from scratch.