We give a finite presentation by generators and relations for the group O n (Z[1/2]) of ndimensional 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. 3 Let j be the greatest integer such that N e j = e j 4 Let v = N e j 5 Let k = lde(v) 6 Let w = 2 k v 7 case k = 0 do 8 Let v = (−1) τ e a for some a such that 1 ≤ a ≤ j and some τ ∈ Z 2 9 if a = j then W = (−1) τ [j] // note that τ = 1 in this case 10 if a < j then W = X [a,j] (−1) τ [a] 11 end 12 case k > 0 do 13 Let a, b, c, d be the indices of the first four odd entries of w 14Let τ a , τ b , τ c , τ d ∈ Z 2 be such that (−1) τ i w i ≡ 1 (mod 4) for i ∈ {a, b, c, d}