The Exercise
Order finding for a number coprime to , with , uses the operator that multiplies by modulo , . With a first register in the superposition and a second prepared in , applying to the second when the first holds leaves the two registers in . The exercise asks for the same state from addition in place of multiplication: a transform that adds modulo to the second register when the first holds , , applied with the second register prepared in .
Multiplication and Addition Modulo
The first register has dimension , with basis states for ; the second has dimension , with basis states for . A basis state of the pair is written .
For natural numbers and with , multiplication by modulo is the map on the labels of the second register given by (1)✦ When and are coprime, the operator of order finding is the permutation of the basis states of the second register defined by , .✦
For a natural number , addition of modulo is the map on the same labels given by (2) and the adder modulo is the permutation of the basis states of the second register defined by : (3)
The Transform and the Two States
The permutation of the transform is the map on label pairs of the two registers that applies to the addition of modulo : (4)✦ The transform is the permutation matrix of , the matrix on the two registers that moves each basis state as moves its labels: (5)✦ For this is , the transform of the exercise.
The state of order finding from the powers of is the vector of the two registers (6) and the state from the transform is applied to the sum of the first register’s basis states with the second register in : (7)
The Claim
Theorem 1. Let and be coprime natural numbers with , let the second register have dimension , and let the first have any dimension . Then the state (7) that prepares from the second register in equals the state (6) that the powers of prepare from : (8)✦
What Is Checked
The claim is stated over the states (6) and (7): the first built from the operator and its multiplication map , the second from the transform and, through its permutation , from the adders and their addition maps .
About these constructions the library proves that is injective when and are coprime, being invertible modulo , and that is injective for every . An injective map of the labels to themselves is a bijection.