Question 1: Configuration Trajectories, Reversible Embedding, and Workspace Cleaning §
In Chapter 1, computation is formulated as a sequence of discrete updates between configurations: \(c_t \to c_{t+1}\). A computational rule \(\tau: \mathcal{C} \to \mathcal{C}\) is deterministic if every configuration has at most one successor, and reversible if every configuration has at most one predecessor.
Consider the 3-input Boolean majority function \(\operatorname{Maj}(x_1, x_2, x_3)\), which outputs \(1\) if two or more inputs are \(1\), and \(0\) otherwise:
\[\operatorname{Maj}(x_1, x_2, x_3) = (x_1 \land x_2) \lor (x_2 \land x_3) \lor (x_3 \land x_1).\]
(a) Colliding Trajectories and Information Loss: View the evaluation of \(\operatorname{Maj}\) as an update from 3-bit input configurations to 1-bit output configurations. Construct its truth table. How many distinct input trajectories merge into output \(0\), and how many into output \(1\)? Given only the final output configuration, can the predecessor be recovered? Explain why trajectory collisions physically necessitate thermodynamic heat dissipation of at least \(k_B T \ln 2\) per discarded bit according to Landauer’s principle.
(b) Algebraic Normal Form: Express \(\operatorname{Maj}(x_1, x_2, x_3)\) as a polynomial over the binary field \(\mathbb{F}_2\) using only addition modulo \(2\) (\(\oplus\)) and multiplication (\(\land\)). Verify that your polynomial correctly computes the function for all eight configurations.
(c) Reversible Function Embedding: To eliminate trajectory collisions, embed \(\operatorname{Maj}\) into a bijective mapping on a 4-bit configuration space:
\[(x_1, x_2, x_3, y) \mapsto (x_1, x_2, x_3, y \oplus \operatorname{Maj}(x_1, x_2, x_3)).\]
Prove that this mapping is a permutation of the 16 configurations. Synthesize it using an explicit cascade of elementary Toffoli gates targeting the output wire \(y\).
(d) Uncomputing Workspace Footprints: Suppose an algorithm evaluates a complex function with the aid of an auxiliary workspace bit \(w\) initialized to \(0\), yielding \((x, 0_w, 0_y) \xrightarrow{U} (x, g(x)_w, f(x)_y)\). Explain why resetting \(w\) to \(0\) by an irreversible reset dissipates energy. Derive Bennett’s compute–copy–uncompute procedure from the invertibility of reversible circuits (\(U^{-1}U = I\)), showing how it restores the workspace configuration to \(0\) without destroying the computed result \(f(x)\).
Show worked solutionHide worked solution
(a) Colliding Trajectories and Landauer’s Principle:
Evaluating \(\operatorname{Maj}(x_1, x_2, x_3)\) on all \(2^3 = 8\) input configurations:
- Configurations mapping to \(0\): \((0,0,0)\), \((0,0,1)\), \((0,1,0)\), \((1,0,0)\) (\(4\) configurations).
- Configurations mapping to \(1\): \((0,1,1)\), \((1,0,1)\), \((1,1,0)\), \((1,1,1)\) (\(4\) configurations).
The operation maps an 8-element configuration space to a 2-element space. Because 4 distinct input configurations collapse into each output configuration, the mapping is many-to-one (non-injective). Given only the output bit, the predecessor configuration cannot be uniquely reconstructed: 2 bits of configuration entropy are destroyed. By Landauer's principle, any physical process that merges logical trajectories reduces the information entropy of the computational degrees of freedom, transferring at least \(\Delta S = k_B \ln 4 = 2 k_B \ln 2\) of entropy to the thermal environment as heat dissipation \(Q \ge 2 k_B T \ln 2\).
(b) Polynomial over the Binary Field:
Over \(\mathbb{F}_2\), the disjunction \(a \lor b = a \oplus b \oplus ab\). For the majority function, no two products \(x_1 x_2\), \(x_2 x_3\), and \(x_3 x_1\) can simultaneously equal \(1\) unless at least two variables are \(1\). If exactly two inputs are \(1\), exactly one product is \(1\) and the others are \(0\), giving sum \(1\). If all three inputs are \(1\), all three products are \(1\), giving \(1 \oplus 1 \oplus 1 = 1\). If fewer than two inputs are \(1\), all products are \(0\), giving \(0\). Thus, over \(\mathbb{F}_2\):
\[\operatorname{Maj}(x_1, x_2, x_3) = x_1 x_2 \oplus x_2 x_3 \oplus x_3 x_1.\]
Verification across all eight configurations:
- On \(000\): \(0 \oplus 0 \oplus 0 = 0\).
- On \(001, 010, 100\): exactly one variable is \(1\), all pairwise products are \(0\), yielding \(0\).
- On \(011, 101, 110\): exactly one pair is \(1\), yielding \(1\).
- On \(111\): all three pairs are \(1\), yielding \(1 \oplus 1 \oplus 1 = 1\).
The algebraic normal form matches the truth table identically.
(c) Reversible Embedding and Toffoli Cascade:
The mapping \(\tau_{\text{rev}}: (x_1, x_2, x_3, y) \mapsto (x_1, x_2, x_3, y \oplus \operatorname{Maj}(x))\) is an involution: applying \(\tau_{\text{rev}}\) twice yields \((x_1, x_2, x_3, (y \oplus \operatorname{Maj}(x)) \oplus \operatorname{Maj}(x)) = (x_1, x_2, x_3, y)\), the identity mapping. Because \(\tau_{\text{rev}}^2 = I\), it is a bijection (a permutation of order 2) on the 16 configurations, ensuring no trajectories collide.
An elementary Toffoli gate \(\text{CCNOT}(a, b; c)\) maps \((a, b, c) \mapsto (a, b, c \oplus ab)\). Since \(\operatorname{Maj}(x) = x_1 x_2 \oplus x_2 x_3 \oplus x_3 x_1\), we apply three successive Toffoli gates all targeting the output wire \(y\):
- \(\text{CCNOT}(x_1, x_2; y)\): updates target to \(y \oplus x_1 x_2\).
- \(\text{CCNOT}(x_2, x_3; y)\): updates target to \(y \oplus x_1 x_2 \oplus x_2 x_3\).
- \(\text{CCNOT}(x_3, x_1; y)\): updates target to \(y \oplus x_1 x_2 \oplus x_2 x_3 \oplus x_3 x_1 = y \oplus \operatorname{Maj}(x)\).
The control configurations \(x_1, x_2, x_3\) are strictly preserved, preventing any trajectory collision.
(d) Uncomputing Workspace Footprints:
Resetting the workspace wire \(w\) by an irreversible reset operation (\(w \mapsto 0\)) merges the trajectories \(w = 0\) and \(w = 1\), dissipating Landauer heat. In quantum computing, retaining garbage in \(w\) is even more consequential: the entangled workspace configuration \(\sum_x \ket{x}\ket{g(x)}_w\ket{f(x)}_y\) prevents destructive interference between different \(x\) computational paths.
Bennett’s compute–copy–uncompute protocol resolves this in three reversible stages:
- Compute: Apply reversible circuit \(U\): \((x, 0_w, 0_t) \xrightarrow{U} (x, g(x)_w, f(x)_t)\), where \(w\) holds workspace garbage and \(t\) holds the answer.
- Copy: Apply a CNOT gate from target wire \(t\) to a fresh output wire \(y\) initialized to \(0\): \((x, g(x)_w, f(x)_t, 0_y) \xrightarrow{\text{CNOT}} (x, g(x)_w, f(x)_t, f(x)_y)\).
- Uncompute: Apply the inverse circuit \(U^{-1}\) to the input, workspace, and intermediate wires: \((x, g(x)_w, f(x)_t, f(x)_y) \xrightarrow{U^{-1}} (x, 0_w, 0_t, f(x)_y)\).
Because \(U^{-1}U = I\), the workspace configuration returns deterministically to \(0_w\) and intermediate wire to \(0_t\) without any information erasure or heat dissipation.