Hubble Asteroid Hunter III. Physical properties of newly found asteroids
Exact synthesis of unitaries generated by Clifford and T gates
1. Exact Synthesis of Unitaries Generated by Clifford+T
Gates
Yi-Hsin Ma
Apr 2019
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 1 / 57
2. Reference
Vadym Kliuchnikov, Dmitri Maslov and Michele Mosca. Fast and
efficient exact synthesis of single qubit unitaries generated by Clifford
and T gates
Brett Giles, Peter Selinger. Exact synthesis of multiqubit Clifford+T
circuits
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 2 / 57
3. Outline
1 Introduction
2 Exact Synthesis of Single Qubit Gates
3 Appendix A
4 Exact Synthesis of Multiple Qubits Gates
5 Appendix B
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 3 / 57
5. Introduction
Introduction
Unitaries Synthesis Problems.
Classified by number of qubits.
Single Qubit Unitary Decomposition
Multiple Qubit Unitary Decomposition
Classified by Error
Exact Decomposition
Approximate Decomposition
Solovay-Kitaev Algorithm
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 5 / 57
6. Introduction The Solovay-Kitaev Theorem
The Solovay-Kitaev Theorem
Definition 1.1
An instruction set G for an n-qubits is a finite set of quantum gates
satisfying:
1 All gates g ∈ G are in SU(2n)
2 For each g ∈ G, the inverse g† is also in G
3 G is a universal set for SU(2n), i.e. the group generated by G is dense
in SU(2n).
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 6 / 57
7. Introduction The Solovay-Kitaev Theorem
The Solovay-Kitaev Theorem
Definition 1.1
An instruction set G for an n-qubits is a finite set of quantum gates
satisfying:
1 All gates g ∈ G are in SU(2n)
2 For each g ∈ G, the inverse g† is also in G
3 G is a universal set for SU(2n), i.e. the group generated by G is dense
in SU(2n).
Definition 1.2
Suppose S and W are subsets of SU(2). Then S is said to form an -net
for W , where > 0, if every point in W is within a distance of some
point in S.
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 6 / 57
8. Introduction The Solovay-Kitaev Theorem
The Solovay-Kitaev Theorem
Let G := {g ...g1|gi ∈ G} be the set of SU(2) which are implementable
with G with length .
Theorem 1.3 (Solovay-Kitaev Theorem)
Let G be an instruction set for a single qubit. Let > 0 be given. Then G
is an -net in SU(2) for = O(logc(1/ )), where c ≈ 4
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 7 / 57
9. Introduction The Solovay-Kitaev Theorem
The Solovay-Kitaev Theorem
Let G := {g ...g1|gi ∈ G} be the set of SU(2) which are implementable
with G with length .
Theorem 1.3 (Solovay-Kitaev Theorem)
Let G be an instruction set for a single qubit. Let > 0 be given. Then G
is an -net in SU(2) for = O(logc(1/ )), where c ≈ 4
What Solovay-Kitaev Algorithm Do?
To compile an quantum algorithm into an efficient fault-tolerance
form using Hadamard, T, and C-NOT gates.
To produce sequence of gate with length O(logc(1
)), which requires
time O(logd (1
)), c, d ∈ Z.
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 7 / 57
10. Introduction The Solovay-Kitaev Theorem
The Solovay-Kitaev Theorem
Let G := {g ...g1|gi ∈ G} be the set of SU(2) which are implementable
with G with length .
Theorem 1.3 (Solovay-Kitaev Theorem)
Let G be an instruction set for a single qubit. Let > 0 be given. Then G
is an -net in SU(2) for = O(logc(1/ )), where c ≈ 4
What Solovay-Kitaev Algorithm Do?
To compile an quantum algorithm into an efficient fault-tolerance
form using Hadamard, T, and C-NOT gates.
To produce sequence of gate with length O(logc(1
)), which requires
time O(logd (1
)), c, d ∈ Z.
It does not guarantee
Finding an exact decomposition if there is one.
Whether the exact decomposition exists.
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 7 / 57
11. Exact Synthesis of Single Qubit Gates
Exact Synthesis of Single Qubit Gates
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 8 / 57
12. Exact Synthesis of Single Qubit Gates Preliminaries
Some algebra
Let
ω = e
2πi
8 =
1
√
2
+
i
√
2
H =
1
√
2
1 1
1 −1
, T =
1 0
0 ω
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 9 / 57
13. Exact Synthesis of Single Qubit Gates Preliminaries
Some algebra
Let
ω = e
2πi
8 =
1
√
2
+
i
√
2
H =
1
√
2
1 1
1 −1
, T =
1 0
0 ω
Z[ω] := a + bω + cω2
+ dω3
a, b, c, d ∈ Z
Z
1
√
2
, i :=
∞
n=0
an
1
√
2
n
+ bn
1
√
2
n
i an, bn ∈ Z
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 9 / 57
14. Exact Synthesis of Single Qubit Gates Preliminaries
The Main Theorem (Single Qubit)
Theorem 2.1
The set of 2 × 2 unitaries over the ring Z[ 1√
2
, i] is equivalent to the set of
those unitaries implementable exactly as single-qubit circuits constructed
using H and T gates only.
Note that ”⊇” is straightforward, since both H and T is over the ring
Z[ 1√
2
, i]. The other side is more difficult to proof.
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 10 / 57
15. Exact Synthesis of Single Qubit Gates Preliminaries
General Form of the Unitaries
Any unitary U can be represented as
U =
z −w∗eiφ
w z∗eiφ ,
where det(U) = eiφ should belong to Z[ 1√
2
, i], which gives that eiφ = ωk.
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 11 / 57
16. Exact Synthesis of Single Qubit Gates Preliminaries
General Form of the Unitaries
Any unitary U can be represented as
U =
z −w∗eiφ
w z∗eiφ ,
where det(U) = eiφ should belong to Z[ 1√
2
, i], which gives that eiφ = ωk.
Hence we have the general form of the matrix we interested as
U =
z −w∗ωk
w z∗ωk
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 11 / 57
17. Exact Synthesis of Single Qubit Gates Preliminaries
Reducing Unitary Implementation to State Preparation
Goal: Find the implementation of unitary matrix U using only H and T
gates.
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 12 / 57
18. Exact Synthesis of Single Qubit Gates Preliminaries
Reducing Unitary Implementation to State Preparation
Goal: Find the implementation of unitary matrix U using only H and T
gates.
First, we reduce the problem into state preparation, which means to find
ˆU = U ...U1 such that ˆU|0 =
z
w
, where U1, ..., U ∈ {H, T}.
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 12 / 57
19. Exact Synthesis of Single Qubit Gates Preliminaries
Reducing Unitary Implementation to State Preparation
Goal: Find the implementation of unitary matrix U using only H and T
gates.
First, we reduce the problem into state preparation, which means to find
ˆU = U ...U1 such that ˆU|0 =
z
w
, where U1, ..., U ∈ {H, T}.
Since ˆU ∈ U(2) ∩ M2×2(Z[ 1√
2
, i]), let ˆU =
z −w∗ωk
w z∗ωk .
Hence, we can multiply ˆU by a power of T to get U
ˆUTk−k
=
z −w∗ωk
w z∗ωk Tk−k
=
z −w∗ωk
w z∗ωk = U
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 12 / 57
20. Exact Synthesis of Single Qubit Gates Preliminaries
Reducing unitary implementation to state preparation
Lemma 2.2
Any single-qubit state with entries in the ring Z[ 1√
2
, i] can be prepared
using only H and T gates given the initial state |0 .
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 13 / 57
21. Exact Synthesis of Single Qubit Gates Preliminaries
Reducing unitary implementation to state preparation
Lemma 2.2
Any single-qubit state with entries in the ring Z[ 1√
2
, i] can be prepared
using only H and T gates given the initial state |0 .
Observation
Power of
√
2 in the
denominator of the entries is
the same.
Power of
√
2 in the
denominator of |zn|2 increases
by 1 after multiplication by
HT.
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 13 / 57
22. Exact Synthesis of Single Qubit Gates Preliminaries
Smallest Denominator Exponent
Definition 2.3 (smallest denominator exponent)
The smallest denominator exponent, sde(z) of z ∈ Z[ 1√
2
, i] is the smallest
integer value k such that z
√
2
k
∈ Z[ω]. If there is no such k, the smallest
denominator exponent is infinite.
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 14 / 57
23. Exact Synthesis of Single Qubit Gates Preliminaries
Smallest Denominator Exponent
Definition 2.3 (smallest denominator exponent)
The smallest denominator exponent, sde(z) of z ∈ Z[ 1√
2
, i] is the smallest
integer value k such that z
√
2
k
∈ Z[ω]. If there is no such k, the smallest
denominator exponent is infinite.
Example
For z1 = 1
√
2
5 (ω3 + 1), sde(z1) = 5.
For z2 = 1
√
2
5 (ω3 − ω) = − 1
√
2
4 , sde(z2) = 4.
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 14 / 57
24. Exact Synthesis of Single Qubit Gates Preliminaries
Greatest Denominator Exponent
Definition 2.4 (greatest dividing exponent)
The greatest dividing exponent, gde(z, x), of base x ∈ Z[ω] with respect
to z ∈ Z[ω] is the integer value k such that xk divides z and x does not
divide quotient z
xk . If no such k exists, the greatest dividing exponent is
said to be infinite.
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 15 / 57
25. Exact Synthesis of Single Qubit Gates Preliminaries
Greatest Denominator Exponent
Definition 2.4 (greatest dividing exponent)
The greatest dividing exponent, gde(z, x), of base x ∈ Z[ω] with respect
to z ∈ Z[ω] is the integer value k such that xk divides z and x does not
divide quotient z
xk . If no such k exists, the greatest dividing exponent is
said to be infinite.
Example
For z1 =
√
2
5
ω, gde(z1,
√
2) = 5.
For z2 =
√
2
4
(ω + ω3) =
√
2
4
(
√
2i), gde(z2,
√
2) = 5.
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 15 / 57
26. Exact Synthesis of Single Qubit Gates Some Important Lemmas
Some Important Lemmas
Lemma 2.5
Let u = z
w be a state with entries in Z[ 1√
2
, i] and sde(|z|2) ≥ 4. Then
there exits integer k ∈ {0, 1, 2, 3} such that:
sde(|(HTk
u)1|2
) = sde(|z|2
) − 1
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 16 / 57
27. Exact Synthesis of Single Qubit Gates Some Important Lemmas
Some Important Lemmas
Lemma 2.5
Let u = z
w be a state with entries in Z[ 1√
2
, i] and sde(|z|2) ≥ 4. Then
there exits integer k ∈ {0, 1, 2, 3} such that:
sde(|(HTk
u)1|2
) = sde(|z|2
) − 1
Lemma 2.6
Let u = z
w be a state over Z[ 1√
2
, i] such that sde(|z|2) ≥ 1 or
sde(|w|2) ≥ 1, then
sde(|z|2
) = sde(|w|2
), sde(z) = sde(w)
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 16 / 57
28. Exact Synthesis of Single Qubit Gates The Algorithm for Decomposition
Idea of Algorithm
Lemma 2.6 implies that sde(|(HTku)2|2) = sde(|w|2) − 1 too.
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 17 / 57
29. Exact Synthesis of Single Qubit Gates The Algorithm for Decomposition
Idea of Algorithm
Lemma 2.6 implies that sde(|(HTku)2|2) = sde(|w|2) − 1 too.
Both entries of the state have the same sde(| · |2), and their sde(| · |2)
decrease by 1 each time we apply HTk on condition that sde(|z|2) ≥ 4.
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 17 / 57
30. Exact Synthesis of Single Qubit Gates The Algorithm for Decomposition
Idea of Algorithm
Lemma 2.6 implies that sde(|(HTku)2|2) = sde(|w|2) − 1 too.
Both entries of the state have the same sde(| · |2), and their sde(| · |2)
decrease by 1 each time we apply HTk on condition that sde(|z|2) ≥ 4.
Iterating such procedure, at the end we can find k1, ..., ks−3 ∈ {0, 1, 2, 3},
where s = sde(|z|2) such that
HTks−3
...HTk1
z
w
=
zs−3
ws−3
, sde(|zs−3|2
) = 3
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 17 / 57
31. Exact Synthesis of Single Qubit Gates The Algorithm for Decomposition
Idea of Algorithm
Define sde|·|2
( ˆU) = sde(|u|2) where u is an entry of ˆU.
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 18 / 57
32. Exact Synthesis of Single Qubit Gates The Algorithm for Decomposition
Idea of Algorithm
Define sde|·|2
( ˆU) = sde(|u|2) where u is an entry of ˆU.
Since the set S3 := { ˆU ∈ U(2)|sde|·|2
( ˆU) ≤ 3} is finite and small.
It takes little efforts to find ˆU ∈ S3 where its first column equals
zn−3
wn−3
.
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 18 / 57
33. Exact Synthesis of Single Qubit Gates The Algorithm for Decomposition
Idea of Algorithm
Define sde|·|2
( ˆU) = sde(|u|2) where u is an entry of ˆU.
Since the set S3 := { ˆU ∈ U(2)|sde|·|2
( ˆU) ≤ 3} is finite and small.
It takes little efforts to find ˆU ∈ S3 where its first column equals
zn−3
wn−3
.
Hence,
zn−3
wn−3
= HTkn−3
...HTk1
z
w
= ˆU|0 ⇒ T−k1
H...T−kn−3
H ˆU|0 =
z
w
U = T−k1
H...T−kn−3
H ˆUTk−k
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 18 / 57
34. Exact Synthesis of Single Qubit Gates The Algorithm for Decomposition
Algorithm 1 Decomposition of a unitary matrix over Z[ 1√
2
, i]
Input: Unitary U =
z00 z01
z10 z11
over Z[ 1√
2
, i].
Output: Sequence Sout of H and T gates that implements U.
1: //S3 : set of all unitaries over Z[ 1√
2
, i] such that for all ˆU ∈ S3, sde|·|( ˆU) ≤ 3
2: queue Sout ← ∅
3: s ← sde(|z00|2)
4: while s > 3 do
5: state ← unfound
6: for all k ∈ {0, 1, 2, 3} do
7: while state = unfound do
8: z00 = [HT−k U]00
9: if sde(|z00|2) = s − 1 then
10: state ← found
11: add Tk H to Sout
12: s ← sde(|z00|2)
13: U ← HT−k U
14: end if
15: end while
16: end for
17: end while
18: lookup sequence Srem for U in S3
19: add Srem into Sout
20: return Sout
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 19 / 57
36. Appendix A
Appendix
The goal of the appendix is to show that if eiφ ∈ Z[ 1√
2
, i] and |eiφ|2 = 1,
then eiφ = ωk where k ∈ {0, 1, 2, · · · , 7}.
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 21 / 57
37. Appendix A
Appendix
The goal of the appendix is to show that if eiφ ∈ Z[ 1√
2
, i] and |eiφ|2 = 1,
then eiφ = ωk where k ∈ {0, 1, 2, · · · , 7}.
Let z = eiφ and z
√
2
sde(z)
= x ∈ Z[ω],
x can be expressed as x = x0 + x1ω + x2ω2 + x3ω3, where x0, x1, x2, x3 ∈ Z.
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 21 / 57
38. Appendix A
Appendix
The goal of the appendix is to show that if eiφ ∈ Z[ 1√
2
, i] and |eiφ|2 = 1,
then eiφ = ωk where k ∈ {0, 1, 2, · · · , 7}.
Let z = eiφ and z
√
2
sde(z)
= x ∈ Z[ω],
x can be expressed as x = x0 + x1ω + x2ω2 + x3ω3, where x0, x1, x2, x3 ∈ Z.
We can further expressed |x|2 = P(x) +
√
2Q(x), and P(x), Q(x) are:
P(x) := x2
0 + x2
1 + x2
2 + x2
3 ,
Q(x) := x0(x1 − x3) + x2(x1 + x3).
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 21 / 57
39. Appendix A
Appendix
Proposition 3.1
Let x ∈ Z[ω]. If gde(x,
√
2) = 0, then P(x), Q(x) have different parity.
i.e. if one of P(x) or Q(x) is even, then another must be odd.
Moreover, gde(|x|2, 2) = 0.
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 22 / 57
40. Appendix A
Appendix
Proof.
gde(x,
√
2) = 0 implies gde(
√
2x, 2) = 0. Let x = x0 + x1ω + x2ω2 + x3ω3
⇒
√
2x = (x1 − x3) + (x0 + x2)ω + (x1 + x3)ω3 + (x2 − x0)ω3
Hence, at least x1 − x3 or x2 − x0 is odd.
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 23 / 57
41. Appendix A
Appendix
Proof.
gde(x,
√
2) = 0 implies gde(
√
2x, 2) = 0. Let x = x0 + x1ω + x2ω2 + x3ω3
⇒
√
2x = (x1 − x3) + (x0 + x2)ω + (x1 + x3)ω3 + (x2 − x0)ω3
Hence, at least x1 − x3 or x2 − x0 is odd.
WLOG. Let x1 − x3 is odd. For P(x) and Q(x) modulo two, we have
P(x) = (x1 + x3) + (x0 + x2) mod 2
Q(x) = (x1 + x3)(x0 + x2) mod 2
We conclude that P(x) and Q(x) have different parity.
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 23 / 57
42. Appendix A
Appendix
Proof.
gde(x,
√
2) = 0 implies gde(
√
2x, 2) = 0. Let x = x0 + x1ω + x2ω2 + x3ω3
⇒
√
2x = (x1 − x3) + (x0 + x2)ω + (x1 + x3)ω3 + (x2 − x0)ω3
Hence, at least x1 − x3 or x2 − x0 is odd.
WLOG. Let x1 − x3 is odd. For P(x) and Q(x) modulo two, we have
P(x) = (x1 + x3) + (x0 + x2) mod 2
Q(x) = (x1 + x3)(x0 + x2) mod 2
We conclude that P(x) and Q(x) have different parity.
The above immediately implies gde(|x|2, 2) = 0.
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 23 / 57
43. Appendix A
Appendix
For z = eiφ ∈ Z[ 1√
2
, i], let z = x
(
√
2)k
where k = sde(z).
|z|2 = 1 implies |x|2 = P(x) +
√
2Q(x) = 2k.
⇒ |x|2 =
1, if k = 0
0, otherwise
mod 2.
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 24 / 57
44. Appendix A
Appendix
For z = eiφ ∈ Z[ 1√
2
, i], let z = x
(
√
2)k
where k = sde(z).
|z|2 = 1 implies |x|2 = P(x) +
√
2Q(x) = 2k.
⇒ |x|2 =
1, if k = 0
0, otherwise
mod 2.
Assume k > 0, then by Prop 3.1 ⇒ gde(|x|2, 2) = 0.
Which means |x|2 = 0 mod 2. Contradiction.
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 24 / 57
45. Appendix A
Appendix
For z = eiφ ∈ Z[ 1√
2
, i], let z = x
(
√
2)k
where k = sde(z).
|z|2 = 1 implies |x|2 = P(x) +
√
2Q(x) = 2k.
⇒ |x|2 =
1, if k = 0
0, otherwise
mod 2.
Assume k > 0, then by Prop 3.1 ⇒ gde(|x|2, 2) = 0.
Which means |x|2 = 0 mod 2. Contradiction.
Hence k = 0 ⇒ z = eiφ ∈ Z[ω]. Let z = z0 + z1ω + z2ω2 + z3ω3.
⇒ |z|2 = (z2
0 + z2
1 + z2
2 + z2
3 ) +
√
2(z1z0 + z2z1 + z3z2 − z0z3) = 1
Which implies z = ωk, k ∈ {0, 1, · · · , 7}.
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 24 / 57
46. Exact Synthesis of Multiple Qubits Gates
Exact Synthesis of Multiple Qubits Gates
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 25 / 57
47. Exact Synthesis of Multiple Qubits Gates
The Main Theorem (Multiple Qubits)
Theorem 4.1
For n > 1, the set of 2n × 2n unitaries over Z[ 1√
2
, i] is equivalent to the
set of unitaries implementable exactly as circuits with Clifford and T gates
built using (n+1) qubits, where the last qubit is an ancillary qubit which
is set to |0 at the beginning and is required to be |0 at the end.
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 26 / 57
48. Exact Synthesis of Multiple Qubits Gates
The Ancillary Qubit May be Necessary
Consider, for example the controlled-T gates.
1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 ω
which has determinant ω.
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 27 / 57
49. Exact Synthesis of Multiple Qubits Gates
The Ancillary Qubit May be Necessary
Consider, for example the controlled-T gates.
1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 ω
which has determinant ω.
However, any Clifford gate and T gate viewed as matrices over a set of
two qubits has a determinant that is a power of the imaginary number i.
Hence it is impossible to implement the controlled-T without adding an
ancillay qubit.
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 27 / 57
50. Exact Synthesis of Multiple Qubits Gates Preliminaries
Clifford Group
Pauli matrices
I =
1 0
0 1
, X =
0 1
1 0
, Y =
0 −i
i 0
, Z =
1 0
0 −1
.
The Pauli group on n qubits is
Pn = {±1, ±i} × {I, X, Y , Z}⊗n
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 28 / 57
51. Exact Synthesis of Multiple Qubits Gates Preliminaries
Clifford Group
Pauli matrices
I =
1 0
0 1
, X =
0 1
1 0
, Y =
0 −i
i 0
, Z =
1 0
0 −1
.
The Pauli group on n qubits is
Pn = {±1, ±i} × {I, X, Y , Z}⊗n
The Clifford group on n qubits is the set of unitaries that normalize the
Pauli group.
Cn = {U : UPnU†
= Pn}
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 28 / 57
52. Exact Synthesis of Multiple Qubits Gates Preliminaries
Clifford Group
Theorem 4.2
Cn = Hi , Pi , CNOTi,j /U(1), where
H =
1
√
2
1 1
1 −1
, P =
1 0
0 i
, CNOT =
1 0 0 0
0 1 0 0
0 0 0 1
0 0 1 0
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 29 / 57
53. Exact Synthesis of Multiple Qubits Gates Preliminaries
One- and Two- Level Matrix
Let U is a 2 × 2-matrix
U =
a b
c d
A two-level matrix U[j,l] of type U is a n × n-matrix, where j = l is
defined by
U[j,l] =
I
a b
I
c d
I
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 30 / 57
54. Exact Synthesis of Multiple Qubits Gates Preliminaries
One- and Two- Level Matrix
Let U is a 2 × 2-matrix
U =
a b
c d
A two-level matrix U[j,l] of type U is a n × n-matrix, where j = l is
defined by
U[j,l] =
I
a b
I
c d
I
If a is a scalar, a[j] for the one-level matrix
a[j] =
I
a
I
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 30 / 57
55. Exact Synthesis of Multiple Qubits Gates Preliminaries
One- and Two- Level Matrix
Each of one- and two-level matrices of types X, H, T, and ω can be
further decomposed into controlled-not gates and multiply-controlled X,
H, T, and ω-gates.
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 31 / 57
56. Exact Synthesis of Multiple Qubits Gates Preliminaries
One- and Two- Level Matrix
Each of one- and two-level matrices of types X, H, T, and ω can be
further decomposed into controlled-not gates and multiply-controlled X,
H, T, and ω-gates.
We first decompose the unitary using one- and two-level matrix of type H,
T, X, and ω.
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 31 / 57
57. Exact Synthesis of Multiple Qubits Gates Preliminaries
One- and Two- Level Matrix
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 32 / 57
58. Exact Synthesis of Multiple Qubits Gates Preliminaries
An Example for Unitary Decomposition
Consider the matrix
U =
1
√
2
3
−ω3 + ω − 1 ω2 + ω + 1 ω2 −ω
ω2 + ω −ω3 + ω2 −ω2 − 1 ω3 + ω
ω3 + ω2 −ω3 − 1 2ω2 0
−1 ω 1 −ω3
which is unitary and over Z[ 1√
2
, i].
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 33 / 57
59. Exact Synthesis of Multiple Qubits Gates Preliminaries
Decomposition into Two-Level Matrices
Lemma 4.3 (Matrix Decomposition)
Let U be a unitary n × n-matrix with entries in D[ω]. Then there exists a
sequence U1, ..., Uh of one- and two-level unitary matrices of types
X, H, T, and ω such that U = U1...Uh.
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 34 / 57
60. Exact Synthesis of Multiple Qubits Gates Preliminaries
Decomposition into Two-Level Matrices
Lemma 4.3 (Matrix Decomposition)
Let U be a unitary n × n-matrix with entries in D[ω]. Then there exists a
sequence U1, ..., Uh of one- and two-level unitary matrices of types
X, H, T, and ω such that U = U1...Uh.
Proof.
It suffices to show that there exist one- and two-level unitary matrices
V1, . . . , Vh of types X, H, T, and ω such that Vh · · · V1U = I.
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 34 / 57
61. Exact Synthesis of Multiple Qubits Gates Preliminaries
Decomposition into Two-Level Matrices
Lemma 4.3 (Matrix Decomposition)
Let U be a unitary n × n-matrix with entries in D[ω]. Then there exists a
sequence U1, ..., Uh of one- and two-level unitary matrices of types
X, H, T, and ω such that U = U1...Uh.
Proof.
It suffices to show that there exist one- and two-level unitary matrices
V1, . . . , Vh of types X, H, T, and ω such that Vh · · · V1U = I.
First use the column lemma (Lemma4.10) to find V1, . . . , Vh1 such that
the leftmost column of Vh1 · · · V1U is e1. Because Vh1 · · · V1U is unitary, it
is of the form
1 0
0 U
Now recursively find row operations to reduce U to the identity matrix.
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 34 / 57
62. Exact Synthesis of Multiple Qubits Gates Preliminaries
Proof of Theorem4.1
Theorem 4.1
For n > 1, the set of 2n × 2n unitaries over Z[ 1√
2
, i] is equivalent to the
set of unitaries implementable exactly as circuits with Clifford and T gates
built using (n+1) qubits, where the last qubit is an ancillary qubit which
is set to |0 at the beginning and is required to be |0 at the end.
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 35 / 57
63. Exact Synthesis of Multiple Qubits Gates Preliminaries
Proof of Theorem4.1
Theorem 4.1
For n > 1, the set of 2n × 2n unitaries over Z[ 1√
2
, i] is equivalent to the
set of unitaries implementable exactly as circuits with Clifford and T gates
built using (n+1) qubits, where the last qubit is an ancillary qubit which
is set to |0 at the beginning and is required to be |0 at the end.
Proof.
(⊇) This way is trivial.
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 35 / 57
64. Exact Synthesis of Multiple Qubits Gates Preliminaries
Proof of Theorem4.1
Theorem 4.1
For n > 1, the set of 2n × 2n unitaries over Z[ 1√
2
, i] is equivalent to the
set of unitaries implementable exactly as circuits with Clifford and T gates
built using (n+1) qubits, where the last qubit is an ancillary qubit which
is set to |0 at the beginning and is required to be |0 at the end.
Proof.
(⊇) This way is trivial.
(⊆) Let U is a unitary 2 × 2 matrix over D[ω]. By Lemma4.3(Matrix
Decomposition) U can be decomposed into one- and two-level matrices of
types X, H, T and ω.
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 35 / 57
65. Exact Synthesis of Multiple Qubits Gates Preliminaries
Proof of Theorem4.1
Theorem 4.1
For n > 1, the set of 2n × 2n unitaries over Z[ 1√
2
, i] is equivalent to the
set of unitaries implementable exactly as circuits with Clifford and T gates
built using (n+1) qubits, where the last qubit is an ancillary qubit which
is set to |0 at the beginning and is required to be |0 at the end.
Proof.
(⊇) This way is trivial.
(⊆) Let U is a unitary 2 × 2 matrix over D[ω]. By Lemma4.3(Matrix
Decomposition) U can be decomposed into one- and two-level matrices of
types X, H, T and ω.
Each of such matrix can be further decomposed into controlled-not gates
and multiply-controlled X, H, T and ω-gates. These gates have
well-known exact representations in Clifford+T with ancillas.
This finishes the proof.
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 35 / 57
66. Exact Synthesis of Multiple Qubits Gates Preliminaries
Preliminaries
Let
D := Z
1
2
=
a
2n
a ∈ Z, n ∈ N
D[ω] := a + bω + cω2
+ dω3
a, b, c, d ∈ D
It is easy to show that D[ω] = Z 1√
2
, i .
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 36 / 57
67. Exact Synthesis of Multiple Qubits Gates Preliminaries
Preliminaries
Definition 4.4 (Residue Map)
The residue map ρ is a surjective ring homomorphism: Z[ω] → Z2[ω],
defined by
ρ(a + bω + cω2
+ dω3
) = ¯a + ¯bω + ¯cω2
+ ¯dω3
where ¯(·) is the parity function, ¯a = a mod 2.
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 37 / 57
68. Exact Synthesis of Multiple Qubits Gates Preliminaries
Preliminaries
Definition 4.4 (Residue Map)
The residue map ρ is a surjective ring homomorphism: Z[ω] → Z2[ω],
defined by
ρ(a + bω + cω2
+ dω3
) = ¯a + ¯bω + ¯cω2
+ ¯dω3
where ¯(·) is the parity function, ¯a = a mod 2.
Definition 4.5 (k-residue)
Let t ∈ D[ω], k ∈ N such that
√
2
k
t ∈ Z[ω].
(We call k is a denominator exponent for t)
The k-residue of t, denoted by ρk(t) is defined to be
ρk(t) = ρ(
√
2
k
t)
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 37 / 57
69. Exact Synthesis of Multiple Qubits Gates Preliminaries
Preliminaries
Definition 4.6 (Reducibility)
x ∈ Z2[ω] is reducible if it is of the form
√
2y, for some y ∈ Z2[ω].
Moreover, we say that x is twice reducible iff x = 0000.
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 38 / 57
70. Exact Synthesis of Multiple Qubits Gates Preliminaries
Preliminaries
Definition 4.6 (Reducibility)
x ∈ Z2[ω] is reducible if it is of the form
√
2y, for some y ∈ Z2[ω].
Moreover, we say that x is twice reducible iff x = 0000.
Lemma 4.7
For x ∈ Z2[ω], these are equivalent:
(I) x is reducible;
(II) x ∈ {0000, 0101, 1010, 1111};
(III)
√
2x = 0000;
(IV) x†x = 0000;
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 38 / 57
71. Exact Synthesis of Multiple Qubits Gates Preliminaries
Table 2. Some operation on residues
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 39 / 57
72. Exact Synthesis of Multiple Qubits Gates Decomposition into Two-Level Matrices
Row Operation
Lemma 4.8 (Row Operation)
Let u1, u2 ∈ D[ω] be entries of a column. Let u = (u1, u2)T is of
denominator exponent k > 0 and k-residue ρk(u) = (x1, x2), such that
x†
1x1 = x†
2x2. Then there exist a sequence of matrices U1, ..., Uh, each of
which is H or T, such that v = U1...Uhu has denominator exponent k − 1,
or equivalently, ρk(v) is defined and reducible.
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 40 / 57
73. Exact Synthesis of Multiple Qubits Gates Decomposition into Two-Level Matrices
Row Operation
Lemma 4.8 (Row Operation)
Let u1, u2 ∈ D[ω] be entries of a column. Let u = (u1, u2)T is of
denominator exponent k > 0 and k-residue ρk(u) = (x1, x2), such that
x†
1x1 = x†
2x2. Then there exist a sequence of matrices U1, ..., Uh, each of
which is H or T, such that v = U1...Uhu has denominator exponent k − 1,
or equivalently, ρk(v) is defined and reducible.
This lemma is used to find a sequence of two-level matrices of type H and
T such that after applying the sequence to a column, the power of
√
2 at
the denominator can vanish.
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 40 / 57
74. Exact Synthesis of Multiple Qubits Gates Decomposition into Two-Level Matrices
Row Operation
Proof.
It can be seen from the table that x†
1x1 is either 0000, 1010, or 0001.
Case 1: x†
1x1 = x†
2x2 = 0000. In this case, ρk(u) is already reducible.
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 41 / 57
75. Exact Synthesis of Multiple Qubits Gates Decomposition into Two-Level Matrices
Row Operation
Proof.
It can be seen from the table that x†
1x1 is either 0000, 1010, or 0001.
Case 1: x†
1x1 = x†
2x2 = 0000. In this case, ρk(u) is already reducible.
Case 2: x†
1x1 = x†
2x2 = 1010. From Table 2, we know
x1, x2 ∈ {0011, 0110, 1100, 1001}. Then there exists m ∈ {0, 1, 2, 3}
such that x1 = ωmx2.
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 41 / 57
76. Exact Synthesis of Multiple Qubits Gates Decomposition into Two-Level Matrices
Row Operation
Proof.
It can be seen from the table that x†
1x1 is either 0000, 1010, or 0001.
Case 1: x†
1x1 = x†
2x2 = 0000. In this case, ρk(u) is already reducible.
Case 2: x†
1x1 = x†
2x2 = 1010. From Table 2, we know
x1, x2 ∈ {0011, 0110, 1100, 1001}. Then there exists m ∈ {0, 1, 2, 3}
such that x1 = ωmx2.
Let v = HTmu. Then
ρk(
√
2v) = ρk
1 1
1 −1
1 0
0 ωm
u1
u2
= ρk
u1 + ωmu2
u1 − ωmu2
=
x1 + ωmx2
x1 − ωmx2
=
0000
0000
⇒ ρk(
√
2v) is trice reducible⇒ ρk(v) is reducible.
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 41 / 57
77. Exact Synthesis of Multiple Qubits Gates Decomposition into Two-Level Matrices
Row Operation
Proof (Cont.)
Case 3: x†
1x1 = x†
2x2 = 1010. From Table 2, x1, x2 ∈ A B, where
A = {0001, 0010, 0100, 1000}, B = {1110, 1101, 1011, 0111}.
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 42 / 57
78. Exact Synthesis of Multiple Qubits Gates Decomposition into Two-Level Matrices
Row Operation
Proof (Cont.)
Case 3: x†
1x1 = x†
2x2 = 1010. From Table 2, x1, x2 ∈ A B, where
A = {0001, 0010, 0100, 1000}, B = {1110, 1101, 1011, 0111}.
There exists an m such that x1 + ωmx2 = 1111. Let u = HTmu.
ρk(
√
2u ) = ρk
u1 + ωmu2
u1 − ωmu2
=
x1 + ωmx2
x1 − ωmx2
=
1111
1111
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 42 / 57
79. Exact Synthesis of Multiple Qubits Gates Decomposition into Two-Level Matrices
Row Operation
Proof (Cont.)
Case 3: x†
1x1 = x†
2x2 = 1010. From Table 2, x1, x2 ∈ A B, where
A = {0001, 0010, 0100, 1000}, B = {1110, 1101, 1011, 0111}.
There exists an m such that x1 + ωmx2 = 1111. Let u = HTmu.
ρk(
√
2u ) = ρk
u1 + ωmu2
u1 − ωmu2
=
x1 + ωmx2
x1 − ωmx2
=
1111
1111
By Lemma4.7 this is reducible ⇒ u has denominator exponent k.
Let ρk(u ) = (y1, y2). Because
√
2 y1 =
√
2 y2 = 1111,
we see from Table 2 that y1, y2 ∈ {0011, 0110, 1100, 1001} and
y†
1 y1 = y†
2 y2 = 1010. Therefore, u satisfies Case 2.
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 42 / 57
80. Exact Synthesis of Multiple Qubits Gates Decomposition into Two-Level Matrices
Row Operation
Proof (Cont.)
Case 3: x†
1x1 = x†
2x2 = 1010. From Table 2, x1, x2 ∈ A B, where
A = {0001, 0010, 0100, 1000}, B = {1110, 1101, 1011, 0111}.
There exists an m such that x1 + ωmx2 = 1111. Let u = HTmu.
ρk(
√
2u ) = ρk
u1 + ωmu2
u1 − ωmu2
=
x1 + ωmx2
x1 − ωmx2
=
1111
1111
By Lemma4.7 this is reducible ⇒ u has denominator exponent k.
Let ρk(u ) = (y1, y2). Because
√
2 y1 =
√
2 y2 = 1111,
we see from Table 2 that y1, y2 ∈ {0011, 0110, 1100, 1001} and
y†
1 y1 = y†
2 y2 = 1010. Therefore, u satisfies Case 2.
Proceeding as in Case 2, we find m such that
v = HTm u = HTm HTmu has denominator exponent k − 1.
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 42 / 57
81. Exact Synthesis of Multiple Qubits Gates Decomposition into Two-Level Matrices
Column Lemma
Lemma 4.9
Consider a vector u ∈ Z[ω]n. If u 2 = 1, then
ui =
ωk, if i = j
0, otherwise
Proof.
Let ui = ai ω3 + bi ω2 + ci ω + di ⇒ u 2 = i ui
2 = i u†
i ui
= i a2
i + b2
i + c2
i + d2
i + (ci di + bi ci + ai bi − di ai )
√
2
Since 1 is an integer ⇒ i (ci di + bi ci + ai bi − di ai ) = 0
⇒ i a2
i + b2
i + c2
i + d2
i = 1
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 43 / 57
82. Exact Synthesis of Multiple Qubits Gates Decomposition into Two-Level Matrices
Column Lemma
Lemma 4.10 (Column Lemma)
Consider an unit vector u ∈ D[ω]n. Then there exist a sequence U1...Uh of
one- and two-level unitary matrices of types X, H, T, and ω such that
U1...Uhu = e1, the first standard basis vector.
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 44 / 57
83. Exact Synthesis of Multiple Qubits Gates Decomposition into Two-Level Matrices
Column Lemma
Lemma 4.10 (Column Lemma)
Consider an unit vector u ∈ D[ω]n. Then there exist a sequence U1...Uh of
one- and two-level unitary matrices of types X, H, T, and ω such that
U1...Uhu = e1, the first standard basis vector.
The Column Lemma is used for reducing a column into e1.
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 44 / 57
84. Exact Synthesis of Multiple Qubits Gates Decomposition into Two-Level Matrices
Column Lemma
Proof.
By induction. Let k = maxi (sde(ui )), u = (u1, ..., un)T .
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 45 / 57
85. Exact Synthesis of Multiple Qubits Gates Decomposition into Two-Level Matrices
Column Lemma
Proof.
By induction. Let k = maxi (sde(ui )), u = (u1, ..., un)T .
Base case: k = 0. ⇒ u ∈ Z[ω]n. We know u = 1, hence by
Lemma4.9 only one entry uj of u is equal to ω−m, otherwise 0.
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 45 / 57
86. Exact Synthesis of Multiple Qubits Gates Decomposition into Two-Level Matrices
Column Lemma
Proof.
By induction. Let k = maxi (sde(ui )), u = (u1, ..., un)T .
Base case: k = 0. ⇒ u ∈ Z[ω]n. We know u = 1, hence by
Lemma4.9 only one entry uj of u is equal to ω−m, otherwise 0.
Let u = X[1,j]u if j = 1 otherwise u = u. ⇒ u = (ω−m, 0, ..., 0)T .
We have ωm
[1]u = e1.
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 45 / 57
87. Exact Synthesis of Multiple Qubits Gates Decomposition into Two-Level Matrices
Column Lemma
Proof.
By induction. Let k = maxi (sde(ui )), u = (u1, ..., un)T .
Base case: k = 0. ⇒ u ∈ Z[ω]n. We know u = 1, hence by
Lemma4.9 only one entry uj of u is equal to ω−m, otherwise 0.
Let u = X[1,j]u if j = 1 otherwise u = u. ⇒ u = (ω−m, 0, ..., 0)T .
We have ωm
[1]u = e1.
Induction Case: k > 0. ⇒ Let v =
√
2
k
u ∈ Z[ω]n, x = ρk(u) = ρ(v).
Since u 2 = 1 ⇒ v 2 = i v†
i vi = 2k ⇒ i x†
i xi = 0000.
⇒ There are an even number of j such that x†
j xj = 0001, 1010
respectively.
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 45 / 57
88. Exact Synthesis of Multiple Qubits Gates Decomposition into Two-Level Matrices
Column Lemma
Proof.
By induction. Let k = maxi (sde(ui )), u = (u1, ..., un)T .
Base case: k = 0. ⇒ u ∈ Z[ω]n. We know u = 1, hence by
Lemma4.9 only one entry uj of u is equal to ω−m, otherwise 0.
Let u = X[1,j]u if j = 1 otherwise u = u. ⇒ u = (ω−m, 0, ..., 0)T .
We have ωm
[1]u = e1.
Induction Case: k > 0. ⇒ Let v =
√
2
k
u ∈ Z[ω]n, x = ρk(u) = ρ(v).
Since u 2 = 1 ⇒ v 2 = i v†
i vi = 2k ⇒ i x†
i xi = 0000.
⇒ There are an even number of j such that x†
j xj = 0001, 1010
respectively.
Apply Lemma4.8(Row operation), then we can find a sequence U over
one-, two-level unitary matrices of H and T such that Uu is reducible.
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 45 / 57
89. Exact Synthesis of Multiple Qubits Gates Decomposition into Two-Level Matrices
An Example for Unitary Decomposition
Now, We are ready to demonstrate the decomposition of a unitary over
Z[ 1√
2
, i] using the techniques shown in the proofs of previous lemmas.
Consider the matrix
U =
1
√
2
3
−ω3 + ω − 1 ω2 + ω + 1 ω2 −ω
ω2 + ω −ω3 + ω2 −ω2 − 1 ω3 + ω
ω3 + ω2 −ω3 − 1 2ω2 0
−1 ω 1 −ω3
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 46 / 57
90. Exact Synthesis of Multiple Qubits Gates Decomposition into Two-Level Matrices
An Example for Unitary Decomposition
It has denominator exponent 3. Its 3-, 4-, and 5-residues are:
ρ3(U) =
1011 0111 0100 0010
0110 1100 0101 1010
1100 1001 0000 0000
0001 0010 0001 1000
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 47 / 57
91. Exact Synthesis of Multiple Qubits Gates Decomposition into Two-Level Matrices
An Example for Unitary Decomposition
It has denominator exponent 3. Its 3-, 4-, and 5-residues are:
ρ3(U) =
1011 0111 0100 0010
0110 1100 0101 1010
1100 1001 0000 0000
0001 0010 0001 1000
ρ4(U) =
1010 0101 1010 0101
1111 1111 0000 0000
1111 1111 0000 0000
1010 0101 1010 0101
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 47 / 57
92. Exact Synthesis of Multiple Qubits Gates Decomposition into Two-Level Matrices
An Example for Unitary Decomposition
It has denominator exponent 3. Its 3-, 4-, and 5-residues are:
ρ3(U) =
1011 0111 0100 0010
0110 1100 0101 1010
1100 1001 0000 0000
0001 0010 0001 1000
ρ4(U) =
1010 0101 1010 0101
1111 1111 0000 0000
1111 1111 0000 0000
1010 0101 1010 0101
ρ5(U) = 0
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 47 / 57
93. Exact Synthesis of Multiple Qubits Gates Decomposition into Two-Level Matrices
An Example for Unitary Decomposition
We start with the first column u of U:
u =
1
√
2
3
−ω3 + ω − 1
ω2 + ω
ω3 + ω2
−1
ρ3(u) =
1011
0110
1100
0001
=
x1
x2
x3
x4
x†
1x1
x†
2x2
x†
3x3
x†
4x4
=
0001
1010
1010
0001
.
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 48 / 57
94. Exact Synthesis of Multiple Qubits Gates Decomposition into Two-Level Matrices
An Example for Unitary Decomposition
We start with the first column u of U:
u =
1
√
2
3
−ω3 + ω − 1
ω2 + ω
ω3 + ω2
−1
ρ3(u) =
1011
0110
1100
0001
=
x1
x2
x3
x4
x†
1x1
x†
2x2
x†
3x3
x†
4x4
=
0001
1010
1010
0001
.
x2 and x3 satisfy case 2 of Lemma 4.8.⇒ Apply H[2,3]T3
[2,3]
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 48 / 57
95. Exact Synthesis of Multiple Qubits Gates Decomposition into Two-Level Matrices
An Example for Unitary Decomposition
We start with the first column u of U:
u =
1
√
2
3
−ω3 + ω − 1
ω2 + ω
ω3 + ω2
−1
ρ3(u) =
1011
0110
1100
0001
=
x1
x2
x3
x4
x†
1x1
x†
2x2
x†
3x3
x†
4x4
=
0001
1010
1010
0001
.
x2 and x3 satisfy case 2 of Lemma 4.8.⇒ Apply H[2,3]T3
[2,3]
x1 and x4 satisfy case 3 of Lemma 4.8.⇒ Apply H[1,4]T[1,4]H[1,4]T2
[1,4]
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 48 / 57
96. Exact Synthesis of Multiple Qubits Gates Decomposition into Two-Level Matrices
An Example for Unitary Decomposition
Apply V = H[1,4]T[1,4]H[1,4]T2
[1,4]H[2,3]T3
[2,3] to u
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 49 / 57
97. Exact Synthesis of Multiple Qubits Gates Decomposition into Two-Level Matrices
An Example for Unitary Decomposition
Apply V = H[1,4]T[1,4]H[1,4]T2
[1,4]H[2,3]T3
[2,3] to u
⇒ v(1) = Vu = 1
√
2
2
0
0
ω2 + ω
−ω + 1
, ρ2(v(1)) =
0000
0000
0110
0011
⇒
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 49 / 57
98. Exact Synthesis of Multiple Qubits Gates Decomposition into Two-Level Matrices
An Example for Unitary Decomposition
Apply V = H[1,4]T[1,4]H[1,4]T2
[1,4]H[2,3]T3
[2,3] to u
⇒ v(1) = Vu = 1
√
2
2
0
0
ω2 + ω
−ω + 1
, ρ2(v(1)) =
0000
0000
0110
0011
⇒
Apply H[3,4]T[3,4] to v(1) ⇒ v(2) = H[3,4]T[3,4]v(1) = 1√
2
0
0
ω
ω2
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 49 / 57
99. Exact Synthesis of Multiple Qubits Gates Decomposition into Two-Level Matrices
An Example for Unitary Decomposition
Apply V = H[1,4]T[1,4]H[1,4]T2
[1,4]H[2,3]T3
[2,3] to u
⇒ v(1) = Vu = 1
√
2
2
0
0
ω2 + ω
−ω + 1
, ρ2(v(1)) =
0000
0000
0110
0011
⇒
Apply H[3,4]T[3,4] to v(1) ⇒ v(2) = H[3,4]T[3,4]v(1) = 1√
2
0
0
ω
ω2
Apply H[3,4]T3
[3,4] to v(2) ⇒ v(3) = H[3,4]T3
[3,4]v(2) =
0
0
0
ω
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 49 / 57
100. Exact Synthesis of Multiple Qubits Gates Decomposition into Two-Level Matrices
An Example for Unitary Decomposition
Apply ω7
[1]X[1,4] to v(3) ⇒ v(4) = ω7
[1]X[1,4]v(3) =
1
0
0
0
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 50 / 57
102. Exact Synthesis of Multiple Qubits Gates Decomposition into Two-Level Matrices
An Example for Unitary Decomposition
Continue with the rest of the columns, we find
W2 = ω6
[2]H[2,4]T3
[2,4]H[2,4]T[2,4]
W3 = ω4
[3]H[3,4]T3
[3,4]H[3,4], W4 = ω5
[4]
We then have U = W †
1 W †
2 W †
3 W †
4
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 51 / 57
103. Exact Synthesis of Multiple Qubits Gates The No-Ancilla Case
The No-Ancilla Case
Theorem 4.11
Under the hypotheses of Theorem 4.1, assume that det U = 1. Then U
can be exactly represented by a Clifford+T circuit with no ancillas.
W =
ω 0
0 ω−1
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 52 / 57
104. Exact Synthesis of Multiple Qubits Gates The No-Ancilla Case
The No-Ancilla Case
Proof.
In order to decompose the unitary without the use of ancillary qubits. We
use the two-level matrices of types iX, T−m(iH)Tm, W and one-level
matrix of type ωm to implement the unitary.
Note that these matrices can be further decomposed into Clifford and T
gates without ancillary qubits.
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 53 / 57
105. Exact Synthesis of Multiple Qubits Gates The No-Ancilla Case
The No-Ancilla Case
Proof.
In order to decompose the unitary without the use of ancillary qubits. We
use the two-level matrices of types iX, T−m(iH)Tm, W and one-level
matrix of type ωm to implement the unitary.
Note that these matrices can be further decomposed into Clifford and T
gates without ancillary qubits.
Replacing HTm with T−m(iH)Tm in the procedure we do in Lemma4.8.
We have
√
2T−m
(iH)Tm u1
u2
= ω2 u1 + u2ωm
u1ω−m − u2
We further substitute iX[i,j] for X[i,j], W[k,k+1] for ω[k] where k < 2n.
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 53 / 57
106. Exact Synthesis of Multiple Qubits Gates The No-Ancilla Case
The No-Ancilla Case
Proof.
In order to decompose the unitary without the use of ancillary qubits. We
use the two-level matrices of types iX, T−m(iH)Tm, W and one-level
matrix of type ωm to implement the unitary.
Note that these matrices can be further decomposed into Clifford and T
gates without ancillary qubits.
Replacing HTm with T−m(iH)Tm in the procedure we do in Lemma4.8.
We have
√
2T−m
(iH)Tm u1
u2
= ω2 u1 + u2ωm
u1ω−m − u2
We further substitute iX[i,j] for X[i,j], W[k,k+1] for ω[k] where k < 2n.
For k = 2n we must use ω[2n] since we cannot use W[2n,2n+1]. Because the
unitary U as well as the matrices we use to implement are all of
determinant 1, we have det(ωm
[2n]) = 1. Which means it is no need to use
any ω[2n] gates.
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 53 / 57
107. Exact Synthesis of Multiple Qubits Gates The No-Ancilla Case
The No-Ancilla Case
Corollary 4.12
Let U be a unitary 2n × 2n matrix. Then the following are equivalent:
(a) U can be exactly represented by a quantum circuit over the
Clifford+T gate set on n qubits with no ancillas.
(b) The entries of U belong to the ring
det U = 1, if n ≥ 4;
det U ∈ {−1, 1}, if n = 3;
det U ∈ {i, −1, −i, 1}, if n = 2;
det U ∈ {ω, i, ω3
, −1, ω5
, −i, ω7
, 1}, if n = 1.
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 54 / 57
109. Appendix B
Appendix B
Objective To show that any arbitrary two-level matrix of type U can be
built from single qubit and CNOT gates.
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 56 / 57
110. Appendix B
Appendix B
Objective To show that any arbitrary two-level matrix of type U can be
built from single qubit and CNOT gates.
Example We wish to implement the two-level matrix U of type ˜U
U =
a 0 0 0 0 0 0 c
0 1 0 0 0 0 0 0
0 0 1 0 0 0 0 0
0 0 0 1 0 0 0 0
0 0 0 0 1 0 0 0
0 0 0 0 0 1 0 0
0 0 0 0 0 0 1 0
b 0 0 0 0 0 0 d
Where ˜U =
a c
b d
is a unitary matrix.
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 56 / 57
111. Appendix B
Appendix B
In this example, only states |000 and |111 is affected by U.
We use Gray code to connect these two states
Yi-Hsin Ma Exact Synthesis of Unitaries Generated by Clifford+T Gates Apr 2019 57 / 57