0% found this document useful (0 votes)
3 views7 pages

Shallow Quantum Circuits IGL Paper

The document presents a quantum algorithm designed to recover fixed points of a random permutation using a quantum query approach, analogous to classical machine learning methods. It discusses the mathematical background of linear algebra, permutation groups, and quantum mechanics, and details the workings of the algorithm, including specific cases and lemmas related to permutations and quantum states. The authors propose a method for recovering sparse vectors in high dimensions through a convex program, leveraging random matrices and measurements to extract information about the permutation.

Uploaded by

Enan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views7 pages

Shallow Quantum Circuits IGL Paper

The document presents a quantum algorithm designed to recover fixed points of a random permutation using a quantum query approach, analogous to classical machine learning methods. It discusses the mathematical background of linear algebra, permutation groups, and quantum mechanics, and details the workings of the algorithm, including specific cases and lemmas related to permutations and quantum states. The authors propose a method for recovering sparse vectors in high dimensions through a convex program, leveraging random matrices and measurements to extract information about the permutation.

Uploaded by

Enan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Shallow Quantum Circuits, Permutations, and

Quantum Query Algorithms


IGL Scholars: Hassan Boukhamseen, Caleb Chiang,
Sparsh Srivastava, Rishab Tirupathi, Mingqi Wang
Graduate Mentor: Ivor Yidong Chen
Faculty Advisor: Marius Junge
March 17, 2023

1 Abstract
We show that given a random permutation π, it is possible to recover the fixed points of
π using a quantum algorithm we constructed. The form of our algorithm is based on a
quantum query algorithm, which is guaranteed to have a bounded form [2]. The quantum
query algorithm we designed can be understood as the quantum analog to a classical machine
learning algorithm, where the random permutation can be viewed as a quantum oracle
operator. We feed sets of random values into our algorithm to apply to the oracle and fit
the observations to a model to retrieve information about the oracle.

2 Background
2.1 Linear Algebra
Definition 2.1. A Hilbert space is a finite-dimensional complex vector space equipped with
an inner product ⟨v|w⟩.
A matrix M can have several relevant properties. Specifically, M is called:
• unitary if M M † = M † M = I.
• self-adjoint if M † = M .
• positive semidefinite if it is self-adjoint and its eigenvalues are all nonnegative.
• a density matrix if it is positive semidefinite and Tr(M ) = 1.
Here M † is given by M T , i.e. it is the conjugate transpose of M , where each element of
M is reflected across its main diagonal and replacedPwith its complex conjugate.
The trace of A, denoted Tr(A), is given by i=1 aii , i.e. the sum of the diagonal
n

elements.

1
2.2 Permutation Group
Definition 2.2. Fix n ∈ N. A permutation is a bijection π from {1, 2, . . . , n} to itself.

The set of all such permutations with the operation of composition forms a group called
the symmetric group (of {1, . . . , n}). This group has n! elements.

Example 2.3. S3 is the set of all permutations of {1, 2, 3}. The permutation (123) which
sends 1 → 2 → 3 → 1 is one of the elements of S3 .

The canonical way to write down a permutation π ∈ Sn is to decompose it into disjoint


cycles. Each of these cycles can be then written as a product of transpositions, that is,
cycles of length 2.

Example 2.4. (123) ∈ S3 , the same permutation from before, sends (1, 2, 3) to (2, 3, 1). This
is equivalent to (13)(12), i.e. swapping the first and third, then first and second elements.

2.3 Actions and Orbits


Definition 2.5. Let G be a group with identity e. Then · : G × X → X is a group action
if:

• e · x = x for any x ∈ X

• g · (h · x) = (gh) · x for any x ∈ X and g, h ∈ G.

The orbit of x ∈ X, denoted G · x, is then given by G · x = {g · x : g ∈ G}.


Let π ∈ Sn be decomposed into disjoint cycles. Then the orbit of an element x ∈
{1, . . . , n} (with the action as π) is simply the set of numbers in the cycle it belongs to.

2.4 Quantum Mechanics & Computing


Unlike classical bits, quantum bits (qubits) can be in superpositions of 0 and 1. They
are thus represented by vectors in C2 . We manipulate qubits with quantum gates. In
particular, unitary quantum gates can be represented by unitary matrices. A quantum
circuit is a composition of quantum gates. Unfortunately unlike classical computation,
making a measurement of the qubit affects its state (collapse of a quantum state).

2.5 Permuting Qubits


Assume that we have n qubits. Since each qubit can be represented as a vector in C2 , this
system is described by the space C2 ⊗ C2 ⊗ · · · ⊗ C2 . In particular it has dimension 2n . A
| {z }
n
state of this system could thus be described as v1 ⊗ v2 ⊗ · · · ⊗ vn , where each vj ∈ C2 .
A permutation in Sn acting on this state thus corresponds to permuting these vectors.
For example, (123) ∈ Sn from before sends v1 ⊗ v2 ⊗ v3 to v2 ⊗ v3 ⊗ v1 .

2
3 A Specific Case: n = 1
On a system with n-qubits, an unknown permutation Mπ is applied and the goal is to learn
which permutation is used from data. Recall the action of Mπ is given by:

(3.1)

Mπ |v1 ⟩ ⊗ ... ⊗ |vn ⟩ = vπ(1) ⊗ ... ⊗ vπ(n) .

The key function to consider is:

ϕ(π) = Eθ (Rθ∗ Mπ Rθ ) (3.2)


 
1 0
where π ∈ Sn is a permutation, Rθ := exp(iθi Z) with Z = , and the
N
1≤i≤n 0 −1
expectation is taken with respect to the uniform probability measure: i.e.
Y 1 Z 2π
Eθ (f ) = dθi f (θ1 , ..., θn ).
1≤i≤n
2π 0

Before tackling this for any n ∈ N, it is useful to calculate ϕ(π) for small n to obtain
an understanding of the behavior of ϕ. Furthermore because we can represent each matrix
as a tensor product of n matrices (by cycle decomposition and the definition of Rθ above),
examining the n = 1 case is especially useful.   
eiθ 0 a b
When n = 1, we have Rθ = exp(iθZ) = . Letting Mπ = , we obtain
0 e−iθ c d
that
 −iθ    iθ 
∗ e 0 a b e 0
A := Rθ Mπ Rθ =
0 eiθ c d 0 e−iθ
 
a be2iθ
= .
ce−2iθ d
 
a 0
Integrating this from 0 to 2π and dividing by 2π gives . In particular this implies
0 d
that ϕ(π) sends Mπ to its diagonal entries; if Mπ = M1 ⊗ M2 for example, ϕ(Mπ ) = ϕ(M1 ) ⊗
ϕ(M2 ), which results in a diagonal matrix.

4 Quantum Query Circuits for Low Complexity Permu-


tation
It turns out that equation 3.2 can be calculated explicitly in general:

Lemma 4.1. Let |eA ⟩ ∈ (C2 )⊗n be the following basis vector:
c
|eA ⟩ := |0⟩A ⊗ |1⟩A

3
   
0 1
where the vector in the i-th tensor factor is |1⟩ := if i ∈ A and it is |0⟩ :=
1 0
otherwise. Then we have:

ϕ(π) |eA ⟩ = |eA ⟩ (4.1)

if and only if π(A) = A. And


ϕ(π) |eA ⟩ = 0 (4.2)
if and only if π(A) ̸= A.
Proof. The proof is by explicit calculation:
O O
ϕ(π) |eA ⟩ = Eθ (Rθ∗ Mπ Rθ ) |eA ⟩ = Eθ ( Rθ∗i Mπ Rθi ) |eA ⟩
1≤i≤n 1≤i≤n
O O O
Rθ∗i

= Eθ ( Rθπ(i) ) |eA ⟩ = Eθ ( exp i(θπ(i) − θi )Z ) |eA ⟩ (4.3)
1≤i≤n 1≤i≤n 1≤i≤n
Y Y 
= Eθ exp i(θi − θπ(i) ) exp −i(θi − θπ(i) ) |eA ⟩ .
i∈A i∈A
/
R 2π
Since 2π
1
0
dθ exp(inθ) = δn,0 , the expectation in equation 4.3 is non-zero only if the expo-
nent is identically 0. The exponent can be rewritten as:
X X
(θi − θπ(i) ) + (θπ(i) − θi ) (4.4)
i∈A i∈A
/

and this exponent is if and only if both summands are i.e. i∈A θπ(i) and
P P
0 0: i∈A θi =
.
P P
i∈A
/ θi = i∈A
/ θπ(i)
If π(A) ̸= A, there exists an index j ∈ A such that π(j) ∈ / A. Then i∈A θi ̸= i∈A θπ(i) .
P P
Hence it is necessary π(A) = A. On the other hand, if π(A) = A, it is clear that the exponent
is identically 0. The claim of this lemma follows since
Y Y 
Eθ exp i(θi − θπ(i) ) exp −i(θi − θπ(i) ) = 1
i∈A i∈A
/

if π(A) = A and it is 0 otherwise.


Lemma 4.2. For two permutations π1 , π2 ∈ Sn , ϕ(π1 ) = ϕ(π2 ) if and only if π1 (A) = π2 (A)
for all A ∈ 2[n] where we use 2[n] to denote the power set of [n] = {1, ..., n}.
Proof. By lemma 4.1, for any permutation π ∈ Sn , ϕ(π) |eA ⟩ = δπ(A)=A |eA ⟩. Therefore
ϕ(π1 ) = ϕ(π2 ) if and only if for all A ∈ 2[n] , ϕ(π1 ) |eA ⟩ = ϕ(π2 ) |eA ⟩. This holds if and only
if for all A, π1 (A) = π2 (A).
In particular, this shows that the function ϕ is not injective. However, to learn the
permutation π, we choose to learn ϕ(π) first. Although we cannot fully recover π from ϕ(π),
information from ϕ(π) can still be valuable to uncover the orbit structure of π.
In terms of the basis {|eA ⟩}A∈2[n] of (C2 )⊗n , the matrix ϕ(π) is a diagonal matrix whose
entries can be written as ⟨eA | ϕ(π) |eA ⟩ = δA=π(A) . Alternatively, we represent ϕ(π) as a

4
vector of dimension 2n . More precisely, we have ϕ(π) ∈ ℓ21 . In this representation, ϕ(π)
n

is a 0 − 1 vector. If we know all of the 2n entries of this vector, we know all information
contained in this vector. However, it is generally impossible to have complete access to all
2n entries. The idea of compressed sensing is to use a few measurements to recover a sparse
0 − 1 vector in high dimensions.[1] Below we work with the set-up of exact recovery.
Exact recovery of a sparse vector can be achieved by a simple convex program. Let M
be a p × 2n -random matrix whose entries are i.i.d. Bernoulli random variables taking values
in {± √1p } with equal probability. Then the following convex program has a unique solution
with high probability, given the vector ϕ(π) is sparse:

minn ||x||1 subject to the constraint M x = M ϕ(π) . (4.5)


x∈ℓ21

The uncertainty comes in with the random matrix. Once M is sampled, with high probability,
this convex program has a unique solution and the solution is exactly ϕ(π). Note M ϕ(π)
is observed information which is used in this convex program to learn what ϕ(π) is. It
is known that if p = O(2m ), then the convex program can recover sparse vector upto 2m
non-zero entries. Later we will see that the parameter p is the number of times that the
measurement procedures must be repeated in order to recover ϕ(π).
The i-th entry of the vector M ϕ(x) ∈ ℓp2 is given by:
X X X
Mi,A ϕ(π)A = Mi,A ⟨eA | ϕ(π) |eA ⟩ = tr(ϕ(π) Mi,A |eA ⟩ ⟨eA |) . (4.6)
A A A

Let Oi := A Mi,A |eA ⟩ ⟨eA | be the (pseudo-)measurements, our goal is to design a query
P
circuit that implements this measurement procedure.
Since M is a Bernoulli random matrix, we can rewrite its entries as Mi,A = Mi,A+ −
− Mi,A
where Mi,A +
= Mi,A if Mi,A > 0 and it is 0 otherwise. Similarly, Mi,A

= Mi,A if Mi,A < 0 and
it is 0 otherwise. Note both M and M are matrices.
+ −

Now we are ready to give the procedure of recovering ϕ(π).

1. Sample from p × 2n i.i.d. Bernoulli distributions and form the random matrix M .
Decompose M into M + and M − .

2. Given M + , we prepare the following input state:


1 X +
ρ+
in := Mi,A |eA ⟩S ⊗ |eA ⟩A (4.7)
N+ A

where we used an ancillary system of dimension 2n (the same dimension as the actual
system) and N + is a normalization constant that only depends on the number of non-
zero entries in the i-th row of the matrix M + .

3. Feed the input state ρ+


in SA
|0⟩C into the following circuit:

5
where the first subsystem (system0 ) is the 2n dimensional ancillary system, the second
subsystem (system1 ) is the actual system of n-qubits, the third subsystem (control)
is a single control qubit, and the last subsystem is the classical register to store the
measurement outcome. The gate Rθ is a rotation gate acting on the actual system,
and H is the Hadamard gate acting on the control qubit. The gate Mπ is a controlled
permutation gate where the control qubit is the single qubit in the control subsystem.
And M is a projective measurement on the control qubit.
The input state ρ+ in SA |0⟩C feeds ρin to the first and second subsystem (the original
+

n-qubits and its ancillary system), and |0⟩C feeds a |0⟩-state to the control system.
The full effect of the circuit can be written as:
1
ρ+ (Rθ ⊗ idA ρ+ +

in |0⟩C 7→ √ in SA ) |0⟩C + (Rθ ⊗ idA ρin SA ) |1⟩C
2
1
7→ √ (Rθ ⊗ idA ρ+ +

in SA ) |0⟩C + (Mπ Rθ ⊗ idA ρin SA ) |0⟩C
2 (4.8)
1
7→ (Rθ ⊗ idA ρ+ +
in SA + Mπ Rθ ⊗ idA ρin SA ) |0⟩C
2
+ (Rθ ⊗ idA ρ+ +

in SA − Mπ Rθ ⊗ idA ρin SA ) |1⟩C .

Denote this final state as ρ+ f inal SAC . Since the measurement is only on the control
qubit, it acts on the partial trace of the final state: trSA ( ρ+ f inal SAC ρf inal ). The
+

partial trace can be computed:


1 1 X + 2 ∗
trSA ( ρ+ +

f inal SAC ρ f inal ) = 1 + (Mi,A ) ⟨eA | R θ M π Rθ |e A ⟩ |0⟩C ⟨0|C
2 (N + )2 A
1 1 X + 2
(Mi,A ) ⟨eA | Rθ∗ Mπ Rθ |eA ⟩ |1⟩C ⟨1|C

+ 1− + 2
2 (N ) A
(4.9)

4. Measure on the control qubit. It yields the state |0⟩ with probability:
1 1 X + 2
P(State is |0⟩) = (Mi,A ) ⟨eA | Rθ∗ Mπ Rθ |eA ⟩ .

1+ + 2
2 (N ) A

. It yields the state |1⟩ with probability:


1 1 X + 2
P(State is |1⟩) = (Mi,A ) ⟨eA | Rθ∗ Mπ Rθ |eA ⟩ .

1− + 2
2 (N ) A

6
5. In this post-processing step, we subtract the probabilities:
1 X + 2
P(State is |0⟩) − P(State is |1⟩) = (Mi,A ) ⟨eA | Rθ∗ Mπ Rθ |eA ⟩ . (4.10)
(N + )2 A

Since Mi,A
+
is either √1
p
or 0, we can rewrite

1 X + 2 1 X
+ 2
(Mi,A ) ⟨e A | Rθ

Mπ Rθ |e A ⟩ = √ + 2
+
Mi,A ⟨eA | Rθ∗ Mπ Rθ |eA ⟩ . (4.11)
(N ) A p(N ) A

Note the parameter p is a hyperparameter of this procedure and N + is the num-


ber of non-zero entries in the i-th row of M + . Hence both parameters are known
once
P the random matrix M is fixed. By a simple rescaling, we have now computed
+ ∗
A Mi,A ⟨eA | Rθ Mπ Rθ |eA ⟩.

6. Repeat step (2) to (5) for all i ∈ {1, ..., p}.

7. Repeat step (2) to (6) for M − .

8. We now have + ∗
π Rθ |eA ⟩ and

θ Mπ Rθ |eA ⟩ for all i ∈

P P
A Mi,A ⟨eA | Rθ MP A Mi,A ⟨eA | R
{1, ..., p}. Hence we can calculate A Mi,A +
⟨eA | Rθ∗ Mπ Rθ |eA ⟩− A Mi,A −
⟨eA | Rθ∗ Mπ Rθ |eA ⟩.
P
This is the vector M ϕ(π) we want to compute.

9. Run the sparse recovery convex program on this vector and with high probability we
have recovered ϕ(π) exactly.

5 References
References
[1] Emmanuel Candes, Justin Romberg, and Terence Tao. Stable Signal Recovery from
Incomplete and Inaccurate Measurements. 2005. doi: 10.48550/ARXIV.MATH/0503066.
url: https://arxiv.org/abs/math/0503066.
[2] Srinivasan Arunachalam, Jop Briët, and Carlos Palazuelos. “Quantum Query Algo-
rithms Are Completely Bounded Forms”. In: SIAM Journal on Computing 48.3 (Jan.
2019), pp. 903–925. doi: 10.1137/18m117563x. url: https://doi.org/10.1137%
2F18m117563x.

You might also like