Generators and Relations for the Group On(Z[1/2])

We give a finite presentation by generators and relations for the group O n (Z[1/2]) of n-dimensional orthogonal matrices with entries in Z[1/2].We then obtain a similar presentation for the group of n-dimensional orthogonal matrices of the form M/ √ 2 k , where k is a nonnegative integer and M is an integer matrix.Both groups arise in the study of quantum circuits.In particular, when the dimension is a power of 2, the elements of the latter group are precisely the unitary matrices that can be represented by a quantum circuit over the universal gate set consisting of the Toffoli gate, the Hadamard gate, and the computational ancilla.Proof.Because u i ≡ 1 (mod 2), we have u i ≡ 1, 3 (mod 4).And since -3 ≡ 1 (mod 4) there exists τ i ∈ Z 2 such that (-1) τ i u i ≡ 1 (mod 4).The claim then follows by computation.Note that w 2 j ≡ 1 (mod 4) if and only if w j is odd and that w 2 j ≡ 0 (mod 4) if and only if w j is even.Hence the number of w j such that w 2 j ≡ 1 (mod 4) is a multiple of 4. Let w a 1 , . . ., w a 4q be the odd entries of w in order of increasing index.We can apply Lemma 3.1 to w a 1 , . . ., w a 4 , then to w a 5 , . . ., w a 8 , and so on until the entries of w are all even.This yields a sequence2 n be a unit vector.If lde(v) = 0, then v = ±e j for some 1 ≤ j ≤ n, where e j is the j-th standard basis vector.Proof.If k = 0 then v ∈ Z n .Since v is a unit vector we then get ∑ v 2 j = 1.Since the v j are integers, there must be exactly one j such that v j = ±1 while all the other entries of v are 0.Lemma 3.4.Let v ∈ Z 1 2 n be a unit vector and let 1 ≤ j ≤ n.Then there exists a sequence of generatorsProof.By induction on lde(v).If lde(v) = 0 then v = ±e j ′ for some j ′ , by Lemma 3.3.If e j ′ = e j there is nothing to do.Otherwise, we can map v to e j by applying an optional (-1) generator followed by an optional X generator.Now if lde(v) = k > 0 then by Lemma 3.2 there exists a sequence G p , . . ., G 1 of elements of G n such that lde(G p • • • G 1 v) < lde(v).By induction, there exists a sequence G p+1 , . . ., G q such that GLemma 3.4 can be used iteratively on the columns of an arbitrary element of O n Z 1 2 to reduce it to the identity matrix.Theorem 3.5.Let M be an n × n matrix.Then M ∈ O n Z 1 2 if, and only if, M can be written as a product of elements of G n .Proof.The right-to-left direction follows from the fact that G n ⊆ O n Z 1 2 .For the left-to-right direction, apply Lemma 3.4 to reduce the rightmost column of M to e n , then proceed recursively.The algorithm establishing the left-to-right direction of Theorem 3.5 is the exact synthesis algorithm.For future reference, an explicit description is given in Algorithm 1.Intuitively, Algorithm 1 terminates because each iteration of the algorithm rewrites the input matrix into one that is closer to the identity.We introduce a notion of level which makes this intuition precise.Definition 3.6.Let M ∈ O n Z 1 2 .The level of M is the triple ( j, k, ℓ), where • j is the largest element of [n] such that Me j = e j , or j = 0 if no such index exists;• k = lde(Me j ), or k = 0 if j = 0; and • ℓ is the number of odd entries in 2 k (Me j ), or ℓ = 0 if k = 0.