liveBook · Manning

Controlled quantum operation

As explained in Building Quantum Software with Python

A multicontrolled transformation is a quantum transformation applied to a target qubit only when every specified control qubit has the required control value.

A controlled quantum operation applies a gate to a target qubit only for amplitude pairs whose control-qubit positions contain the required value. With controls set to 1, the operation limits quantum parallelism to selected parts of the state. section 4.4

Implement a controlled operation by narrowing the amplitude pairs before applying the ordinary gate transformation:

  • Generate pairs of outcomes that differ only at the target position. section 4.4.1
  • For one control, retain pairs whose control position contains 1; for multiple controls, require 1 at every control position. section 4.4.1 section 4.4.2
  • Recombine each retained pair with the selected gate, leaving all other amplitudes unchanged. section 4.4

Two controls on a three-qubit state

Applying an X operation with controls [1, 2] and target 0 selects only the outcomes 110 and 111, or indices 6 and 7. The operation swaps those two amplitudes while leaving the other six unchanged. section 4.4.2

Figure 4.27 Pair processing for applying a controlled X gate to a three-qubit state with target qubit 0 and control qubit 2
figure

Visualize controlled-X processing as highlighted amplitude pairs; the control selects which butterfly-like pairs participate. section 4.4

How Building Quantum Software with Python covers it

How deep it goes
Descends to Python pair filtering and amplitude recombination, while deferring physical implementation costs and coherence effects.
Examples
Uses three-qubit state diagrams, controlled-X swaps, Python simulator functions, and repeated controlled rotations in phase estimation.
What it assumes
Assumes quantum states, amplitudes, qubit positions, and single-qubit gate transformations; builds controlled pair selection from those ideas.
What you can do after
Apply it via Python state-vector functions that select control-qualified pairs and invoke an existing single-qubit gate transformation.
How it connects
Connects controlled operations to quantum parallelism, amplitude recombination, butterfly diagrams, and quantum phase estimation.

Also explained in

Compare how 2 books explain controlled quantum operation →

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.