liveBook · Manning

Target qubit

As explained in Building Quantum Software with Python

A target qubit is the qubit position whose differing bit values determine which quantum-state amplitudes are paired for recombination.

A target qubit is the position selected by a quantum gate to determine which state amplitudes are recombined. In binary outcome labels, each pair differs only at that qubit’s position; all such pairs can be updated in parallel. section 4.3 section 1.4.3

Use the target index to find amplitude pairs in a simulator:

  • Index qubits from right to left, with the rightmost binary digit as qubit 0. section 4.3.1
  • For target t, pair each outcome whose digit t is 0 with the outcome obtained by adding 2^t to its decimal index. section 4.3.1
  • Apply the gate’s two-by-two matrix to every pair, preserving the state’s organization around the selected stride. section 12.3.1

Three-qubit pairing

For target t = 0, outcomes 000 and 001 form a pair, so their decimal indices differ by 1. For t = 1, 000 pairs with 010, differing by 2; for t = 2, 000 pairs with 100, differing by 4. Applying Hadamard gates to targets 0, 1, and 2 transforms the initialized state [1, 0, 0, 0, 0, 0, 0, 0] into eight equal amplitudes of approximately 0.3536. section 4.3.1 section 4.3.4

Figure 4.15 The pairs of outcomes for applying a single-qubit gate to a three-qubit system with the target qubit in position 0
figure

Visualize the target-0 pairing pattern across a three-qubit state before implementing the indexing logic. section 4.3.1

How Building Quantum Software with Python covers it

How deep it goes
Explains binary indexing, decimal strides, matrix recombination, and simulator implementation, while deferring general state transformations.
Examples
Uses three-qubit binary pairs, Hadamard transformations, uniform distributions, simulator output, and butterfly diagrams.
What it assumes
Assumes binary-to-decimal indexing and basic qubit states while building multi-qubit amplitude pairing from elementary gates.
What you can do after
Apply it via a quantum-state simulator to select amplitude pairs and verify single- or multi-qubit transformations.
How it connects
Connects quantum gates, amplitudes, controlled transformations, unitary matrices, butterfly diagrams, and the classical FFT algorithm.

Also explained in

Compare how 2 books explain target qubit →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Building Quantum Software with Python. The section links point to the parts of the book it draws on.