qiskit-advocate / qamp-spring-23

Qiskit advocate mentorship program (QAMP) Spring 23 cohort (April - July 2023)
12 stars 2 forks source link

Comprehensive Tutorial on Two Qubit Decomposition (KAK + Weyl Chamber) #33

Open mpham26uchicago opened 1 year ago

mpham26uchicago commented 1 year ago

Description

The aim of this project is to create a comprehensive tutorial on Two Qubit Decomposition by applying the KAK decomposition method and Weyl Chamber analysis in the context of quantum computing.

The KAK decomposition method is a powerful tool for breaking down any two-qubit quantum gate into a combination of simpler gates that are easier to implement on quantum hardware. This tutorial will cover the theory behind KAK decomposition, as well as step-by-step instructions for how to apply it to any two-qubit gate.

In addition to the KAK decomposition method, this tutorial will also cover the Weyl Chamber analysis. The Weyl Chamber is a geometric representation of all possible two-qubit gates, and understanding it can help researchers and practitioners in quantum computing to identify the best gate sequences for achieving a desired transformation.

I already got the bulk of the KAK decomposition, now I want to understand the derivation of the Weyl chamber from this paper.

Deliverables

At the end of the project, I aim to create a comprehensive tutorial showing the step-by-step imlementation of KAK on two qubits and bringing the canonical parameters to the Weyl chamber.

The deliverable will be a jupyter notebook, or maybe a page in the qiskit textbook, that walks the reader through the nitty gritty of Lie algebra and how that leads to the above results.

Mentors details

Mentor 1:

Number of mentees

1

Type of mentees

I will be continue building on parts of the tutorial I already built for KAK. GitHub: Minh Pham

mpham26uchicago commented 1 year ago

Can you please help add the "mentor needed" instead of the "mentee needed" labels to this issue? @GemmaDawson

GemmaDawson commented 1 year ago

@jayakumarksrit & @poig - please add a comment to this issue so that I may assign it to you 😊

jayakumarksrit commented 1 year ago

@GemmaDawson interested in this project to act as Mentor

poig commented 1 year ago

@GemmaDawson

jayakumarksrit commented 1 year ago

@GemmaDawson please add @poig to this issue as mentee. Thanks in advance !

jayakumarksrit commented 1 year ago

@GemmaDawson please add @poig to this issue as mentee. Thanks in advance !

@GemmaDawson Gentle reminder please add @poig to this issue as mentee. Thanks in Advance !

poig commented 1 year ago

#33 Checkpoint_1.pptx

mpham26uchicago commented 1 year ago

Checkpoint 2 (Draft):

So far, we have created three notebooks.

The first one covers background on Cartan decomposition with applications to KAK. Here, we start by introducing Lie algebra definitions and theorems related to Cartan involution and adjoint orbits. We also introduce an example of KAK on one qubit which is precisely YZY Euler decomposition. This eventually builds up to two qubit decomposition using type AI Cartan involution and the magic-basis correspondence.

In the second notebook, we introduce more Lie algebra background: structure constants, root system, Weyl group / Weyl chamber. Ultimate, we demonstrate that the periodicity of the non-locality in the 3-Torus allows for symmetry reduction that results in the Weyl tetrahedron.

Finally, we give step by step coding demonstration of the full two-qubit decomposition on the third notebook. We also more on technicalities related to numerical implementations.

Going forward, we look to clean up the details of the implentation as well as simplify some of the language and adding more visualizations.

image

Figure: Steps of symmetry-reduction in the Weyl chamber

The aforementioned notebook stored is here

poig commented 1 year ago

Checkpoint 2:

So far, we have created three notebooks.

First Notebook

The first notebook Cartan Decomposition - KAK.ipynb, covers the mathematical background of Cartan decomposition with applications to KAK. Here, we begin with introducing Lie algebra definitions, theorems, and proof related to Cartan involution and adjoint orbits, which will later be applied to decompose a random unitary matrix(SU(2), SU(4)), with this we give a direct implementation example of KAK on one qubit which is precisely YZY Euler decomposition using numpy and scipy with the mentioned algorithm from the paper [0806.4015] Constructive Quantum Shannon Decomposition from Cartan Involutions (arxiv.org). This eventually builds up to a two-qubit decomposition with a 4-steps algorithm using type AI Cartan involution and the magic-basis correspondence, and obtain the XX, YY, ZZ terms.

Procedure of how to implement two-qubit decomposition

Step 1. Compute $M^2 = \Theta(U^\dagger)U = U^T U$

Step 2. Diagonalize $M^2 = PDP^\dagger$. Since $D$ is diagonal, we have that $D \in \exp(\mathfrak{h})$. Furthermore, by $\mathfrak{h}$-adjoint theorem, $P \in \exp(\mathfrak{k})$.

Step 3. We have $M = PD^{1/2}P^\dagger$, thus $A = D^{1/2}$ and $K_2 = P^\dagger$. So

$$U = K^\prime M = K^\prime (K_2^\dagger A K_2)$$

Then $K^\prime = UM^\dagger$. Thus $K_1 = K^\prime K_2^\dagger$

Step 4. Observe that the dimension of $SO(4)$ and $SU(2) \otimes SU(2)$ coincides. As such, there is a homomorphism between the two Lie algebras (and Lie group) by the conjugation of the "magic basis"

$$Ad_B (\mathfrak{so}(4)) = \mathfrak{su}(2) \oplus \mathfrak{su}(2)$$

where $B$ is the matrix (up to switching columns)

$$B = \frac{1}{\sqrt2} \begin{pmatrix} 1 & 0 & 0 & i \ 0 & i & 1 & 0 \ 0 & i & -1 & 0 \ 1 & 0 & 0 & -i \end{pmatrix}$$

Importantly, $Ad_B$ maps $\mathfrak{h}$ to another Cartan subalgebra by

$$Ad_B(\text{IZ}) = -\text{YY}, \quad Ad_B(\text{ZI}) = \text{XX}, \quad Ad_B(\text{ZZ}) = \text{ZZ}$$

Second notebook

In the second notebook Weyl Chamber.ipynb, we introduce more Lie algebra background, including structure constants, root system, Weyl group / Weyl chamber. Afterward, we explain how to compute weyl group $W(G, K)$ which finds the root system by using the killing form on the linear combination of product operator basis, then use to construct a plane and compute the reflection of $u$ which interestingly using the similar formula with the diffusion operator from Grover’s search algorithm!!! Then we explain how to obtain the geometric structure of the 3-torus, the geometric representation of two-qubit gates, and the algorithm for computing canonical class vectors. Ultimately, we demonstrate that the periodicity of the 3-Torus allows for symmetry reduction that results in the Weyl tetrahedron.

Figure: Steps of symmetry-reduction in the Weyl chamber

image

Third notebooks

Finally Full Two Qubit KAK Implementation.ipynb, we give a step-by-step demonstration of the full two-qubit decomposition with Weyl chamber from scratch, that focuses more on technicalities to numerical implementations.

There is an extra notebook Lie Theory Theorems.ipynb which proves some lie algebra questions we have.

Future plan

Going forward, we look to clean up the details of the implementation as well as simplify some of the languages and add more visualizations, that we hope more people can understand the difficult concept without struggling too much with the broad mathematical background but also explain in detail for those who are interested.

The aforementioned notebooks stored is here

poig commented 1 year ago

Final Showcase.pdf