-
Notifications
You must be signed in to change notification settings - Fork 209
[Demo] Add: Unitary synthesis with recursive KAK decompositions #1372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 33 commits
Commits
Show all changes
50 commits
Select commit
Hold shift + click to select a range
169c6ce
text draft. no code. no gate counts. no circuit diagrams
dwierichs 77d2c55
figures
dwierichs d3d9eeb
add figures
dwierichs 1548c98
references
dwierichs 089d84c
work over
dwierichs a080644
extend table
dwierichs c2d2a95
link. trigger.
dwierichs d805c1e
comma
dwierichs fb15ed6
"
dwierichs ed0d695
}
dwierichs 674439d
paper->article
dwierichs 74cec4d
metadata
dwierichs 5d9d9c9
add thumbnail
dwierichs d1456bd
block zxz drawing
dwierichs 085f0b1
first review batch
dwierichs 39f8a51
examples
dwierichs f9f4775
whitespace
dwierichs fddda75
qubit count
dwierichs d65c96c
matrix mult
dwierichs a3c021b
Merge branch 'master' into unitary-synthesis-kak
dwierichs 534ca80
review
dwierichs 9752d63
add images
dwierichs 492c2d4
whitespace
dwierichs 66b9ff2
update recursive_QSD image
dwierichs 72ad3e8
gate counts
dwierichs c9a48e2
conclusion
dwierichs 3447d73
to do
dwierichs 46b4e3d
finish gate counts. plot
dwierichs 6d5fe05
code width. diagonal decomp image
dwierichs 0f4a0ca
code width. diagonal decomp image
dwierichs f8b38f1
polish
dwierichs 105095d
image files. so many image files.
dwierichs dd591c6
Merge branch 'master' into unitary-synthesis-kak
dwierichs e86997f
cleanup
dwierichs 05f99da
review
dwierichs 6712c26
KGD diagram
dwierichs f8862d4
qsd_optimization figure
dwierichs 7180340
Merge branch 'master' into unitary-synthesis-kak
dwierichs 29ff17c
space
dwierichs c14140f
Merge branch 'master' into unitary-synthesis-kak
dwierichs b76e1d5
figsize
dwierichs 623e1a2
Merge branch 'unitary-synthesis-kak' of github.com:PennyLaneAI/qml in…
dwierichs 77edb17
Apply suggestions from code review
dwierichs a87b364
sentence explaining rank
dwierichs 6d45dff
Merge branch 'unitary-synthesis-kak' of github.com:PennyLaneAI/qml in…
dwierichs d0bdf09
consistency
dwierichs 77861d3
block-zxz diagram
dwierichs 2eafab5
dates
dwierichs e7782ea
Merge branch 'master' into unitary-synthesis-kak
dwierichs f2cba8e
final touch
dwierichs File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Binary file added
BIN
+55.5 KB
...demo_thumbnails/large_demo_thumbnails/thumbnail_large_unitary_synthesis_kak.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+54.3 KB
...demo_thumbnails/opengraph_demo_thumbnails/OGthumbnail_unitary_synthesis_kak.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+14.4 KB
...tic/demo_thumbnails/regular_demo_thumbnails/thumbnail_unitary_synthesis_kak.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+68 KB
_static/demonstration_assets/unitary_synthesis_kak/AIII_generic_CSG.pdf
Binary file not shown.
Binary file added
BIN
+19.8 KB
_static/demonstration_assets/unitary_synthesis_kak/AIII_generic_CSG.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions
20
_static/demonstration_assets/unitary_synthesis_kak/AIII_generic_CSG.tex
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
\documentclass[]{standalone} | ||
\usepackage{amsmath,quantikz,graphicx,xcolor} | ||
|
||
|
||
\begin{document} | ||
% \begin{align*} | ||
\begin{quantikz} | ||
& & \gate{R_Y}\wire[d][3]{q} & \\ | ||
& \qwbundle{n-3} & |[operator]| & \\ | ||
& & |[operator]| & \\ | ||
& & |[operator]| & | ||
\end{quantikz} | ||
= | ||
\begin{quantikz} | ||
& & \gate{R_Y(\theta_0)} & \gate{R_Y(\theta_1)} & \gate{R_Y(\theta_2)} & \ \ldots \ & \gate{R_Y(\theta_{2^{n-1}-1})} & \\ | ||
& \qwbundle{n-3} & \octrl{-1} & \octrl{-1} & \octrl{-1} & \ \ldots \ & \ctrl{-1} & \\ | ||
& & \octrl{-1} & \octrl{-1} & \ctrl{-1} & \ \ldots \ & \ctrl{-1} & \\ | ||
& & \octrl{-1} & \ctrl{-1} & \octrl{-1} & \ \ldots \ & \ctrl{-1} & | ||
\end{quantikz} | ||
\end{document} |
Binary file added
BIN
+43.9 KB
_static/demonstration_assets/unitary_synthesis_kak/AIII_generic_complete.pdf
Binary file not shown.
Binary file added
BIN
+12.7 KB
_static/demonstration_assets/unitary_synthesis_kak/AIII_generic_complete.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions
17
_static/demonstration_assets/unitary_synthesis_kak/AIII_generic_complete.tex
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
\documentclass[]{standalone} | ||
\usepackage{amsmath,quantikz,graphicx,xcolor} | ||
|
||
|
||
\begin{document} | ||
% \begin{align*} | ||
\begin{quantikz} | ||
& & \gate[2]{U(2^n)} &\\ | ||
& \qwbundle{n-1} & & | ||
\end{quantikz} | ||
= | ||
\begin{quantikz} | ||
& & |[operator]| & \gate{R_Y}\wire[d]{q} & |[operator]| &\\ | ||
& \qwbundle{n-1} & \gate{U(2^{n-1})}\wire[u]{q} & |[operator]| & \gate{U(2^{n-1})}\wire[u]{q} & | ||
\end{quantikz} | ||
|
||
\end{document} |
Binary file added
BIN
+43.6 KB
_static/demonstration_assets/unitary_synthesis_kak/A_generic_complete.pdf
Binary file not shown.
Binary file added
BIN
+10.4 KB
_static/demonstration_assets/unitary_synthesis_kak/A_generic_complete.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions
17
_static/demonstration_assets/unitary_synthesis_kak/A_generic_complete.tex
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
\documentclass[]{standalone} | ||
\usepackage{amsmath,quantikz,graphicx,xcolor} | ||
|
||
|
||
\begin{document} | ||
% \begin{align*} | ||
\begin{quantikz} | ||
& \ghost{R_Z} & |[operator]| &\\ | ||
& \qwbundle{n-1} & \gate{U(2^{n-1})}\wire[u]{q} & | ||
\end{quantikz} | ||
= | ||
\begin{quantikz} | ||
& & & \gate{R_Z}\wire[d]{q} & &\\ | ||
& \qwbundle{n-1} & \gate{U(2^{n-1})} & |[operator]| & \gate{U(2^{n-1})} & | ||
\end{quantikz} | ||
|
||
\end{document} |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
49 changes: 49 additions & 0 deletions
49
_static/demonstration_assets/unitary_synthesis_kak/KAK_generic.tex
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
\documentclass[]{standalone} | ||
\usepackage{amsmath,quantikz,graphicx,xcolor} | ||
|
||
\begin{document} | ||
% \begin{align*} | ||
\begin{quantikz} | ||
& \gate[2]{G} & \\ | ||
&& | ||
\end{quantikz} | ||
= | ||
\begin{quantikz} | ||
& \gate[2]{K_2} & \gate[2]{A} & \gate[2]{K_1} & \\ | ||
&&&& | ||
\end{quantikz} | ||
% \end{align*} | ||
% Iterate the above: | ||
|
||
% \begin{align*} | ||
% \begin{quantikz} | ||
% & \ctrl[open]{1} & \ctrl[open]{1} & \ctrl{1} & \ctrl{1} & \\ | ||
% & \ctrl[open]{1} & \ctrl{1} & \ctrl[open]{1} & \ctrl{1} & \\ | ||
% & \gate{A} & \gate{B} & \gate{C} & \gate{D} & | ||
% \end{quantikz} | ||
% &= | ||
% \begin{quantikz} | ||
% & \ctrl[open]{1} & \ctrl{1} & \\ | ||
% & \gate[2]{A\oplus B} & \gate[2]{C\oplus D} & \\ | ||
% & & & | ||
% \end{quantikz}\\ | ||
% &= | ||
% \begin{quantikz} | ||
% & & \ctrl{1} & \\ | ||
% & \gate[2]{A\oplus B} & \gate[2]{A^\dagger C\oplus B^\dagger D} & \\ | ||
% & & & | ||
% \end{quantikz}\\ | ||
% &= | ||
% \begin{quantikz} | ||
% & & & \ctrl{1} & \ctrl{1} & \\ | ||
% & \ctrl[open]{1} & \ctrl{1} & \ctrl[open]{1} & \ctrl{1} & \\ | ||
% & \gate{A} & \gate{B} & \gate{A^\dagger C} & \gate{B^\dagger D} & | ||
% \end{quantikz}\\ | ||
% &= | ||
% \begin{quantikz} | ||
% & & & \ctrl{2} & \ctrl{1} & \\ | ||
% & & \ctrl{1} & & \ctrl{1} & \\ | ||
% & \gate{A} & \gate{A^\dagger B} & \gate{A^\dagger C} & \gate{C^\dagger A B^\dagger D} & | ||
% \end{quantikz} | ||
% \end{align*} | ||
\end{document} |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions
17
_static/demonstration_assets/unitary_synthesis_kak/QSD.tex
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
\documentclass[]{standalone} | ||
\usepackage{amsmath,quantikz,graphicx,xcolor} | ||
|
||
|
||
\begin{document} | ||
% \begin{align*} | ||
\begin{quantikz} | ||
& & \gate[2]{U(2^n)} &\\ | ||
& \qwbundle{n-1} & & | ||
\end{quantikz} | ||
= | ||
\begin{quantikz} | ||
& & & \gate{R_Z}\wire[d]{q} & & \gate{R_Y}\wire[d]{q} & & \gate{R_Z}\wire[d]{q} & &\\ | ||
& \qwbundle{n-1} & \gate{U(2^{n-1})} & |[operator]| & \gate{U(2^{n-1})} & |[operator]| & \gate{U(2^{n-1})} & |[operator]| & \gate{U(2^{n-1})} & | ||
\end{quantikz} | ||
|
||
\end{document} |
Binary file added
BIN
+49.9 KB
_static/demonstration_assets/unitary_synthesis_kak/block_zxz_optimization.pdf
Binary file not shown.
Binary file added
BIN
+70.3 KB
_static/demonstration_assets/unitary_synthesis_kak/block_zxz_optimization.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
46 changes: 46 additions & 0 deletions
46
_static/demonstration_assets/unitary_synthesis_kak/block_zxz_optimization.tex
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
\documentclass[]{article} | ||
\usepackage{amsmath,quantikz,graphicx,xcolor,amssymb,amsfonts} | ||
|
||
\definecolor{yellow}{HTML}{E2A300} | ||
\definecolor{blue}{HTML}{4D53C8} | ||
\definecolor{green}{HTML}{52BD7C} | ||
\definecolor{red}{HTML}{D7333B} | ||
|
||
|
||
|
||
\begin{document} | ||
\begin{align*} | ||
\hspace{-5cm}\begin{quantikz} | ||
& & \gate[3]{U(2^n)} &\\ | ||
& & &\\ | ||
& \qwbundle{n-2} & & | ||
\end{quantikz} | ||
&= | ||
\begin{quantikz} | ||
& & & \gate{R_Z}\wire[d][2]{q} & & \gate{R_X}\wire[d][2]{q} & & \gate{R_Z}\wire[d][2]{q} & &\\ | ||
& & \gate[2]{U(2^{n-1})} & |[operator]| & \gate[2]{U(2^{n-1})} & |[operator]| & \gate[2]{U(2^{n-1})} & |[operator]| & \gate[2]{U(2^{n-1})} & \\ | ||
& \qwbundle{n-2} & & |[operator]| & & |[operator]| & & |[operator]| & & | ||
\end{quantikz}\\ | ||
&=\begin{quantikz} | ||
& & & \gate{R_Z}\wire[d][2]{q} & \gate{H} & \gategroup[3,steps=3,style={inner | ||
sep=3pt, rounded corners,color=green}]{} & \gate{R_Z}\wire[d][2]{q} & & \gate{H} & \gate{R_Z}\wire[d][2]{q} & &\\ | ||
& & \gate[2]{U(2^{n-1})} & |[operator]| & & \gate[2]{U(2^{n-1})} & |[operator]| & \gate[2]{U(2^{n-1})} & & |[operator]| & \gate[2]{U(2^{n-1})} & \\ | ||
& \qwbundle{n-2} & & |[operator]| & & & |[operator]| & & & |[operator]| & & | ||
\end{quantikz}\\ | ||
&=\begin{quantikz} | ||
& & & \gate{R_Z}\wire[d][2]{q} & \targ{}\gategroup[2,steps=3,style={inner | ||
sep=0pt, rounded corners,color=yellow}]{} & \gate{H} & \ctrl{0}\gategroup[3,steps=3,style={inner | ||
sep=3pt, rounded corners,color=blue}]{} & |[operator]| & \ctrl{0}\gategroup[2,steps=3,style={inner | ||
sep=0pt, rounded corners,color=yellow}]{} & \gate{H} & \targ{} & \gate{R_Z}\wire[d][2]{q} & &\\ | ||
& & \gate[2]{U(2^{n-1})} & |[operator]| & \ctrl{-1} & &\ctrl{-1} & \gate[2]{U(2^{n-1})}\wire[u]{q} & \ctrl{-1} & & \ctrl{-1}& |[operator]| & \gate[2]{U(2^{n-1})} & \\ | ||
& \qwbundle{n-2} & & |[operator]| & & & & & & & & |[operator]| & & | ||
\end{quantikz}\\ | ||
&=\begin{quantikz} | ||
& & & \gate{R_Z}\wire[d][2]{q}\gategroup[3,steps=2,style={inner | ||
sep=0pt, rounded corners,color=red}]{} & \targ{} & & \gate{R_X}\wire[d][2]{q} & & \targ{}\gategroup[3,steps=2,style={inner | ||
sep=0pt, rounded corners,color=red}]{} & \gate{R_Z}\wire[d][2]{q} & &\\ | ||
& & \gate[2]{U(2^{n-1})} & |[operator]| & \ctrl{-1} & \gate[2]{U(2^{n-1})} & |[operator]| & \gate[2]{U(2^{n-1})} & \ctrl{-1} & |[operator]| & \gate[2]{U(2^{n-1})} & \\ | ||
& \qwbundle{n-2} & & |[operator]| & & & |[operator]| & & & |[operator]| & & | ||
\end{quantikz} | ||
\end{align*} | ||
\end{document} |
Binary file added
BIN
+62.5 KB
_static/demonstration_assets/unitary_synthesis_kak/block_zxz_transformations.pdf
Binary file not shown.
Binary file added
BIN
+70.9 KB
_static/demonstration_assets/unitary_synthesis_kak/block_zxz_transformations.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 43 additions & 0 deletions
43
_static/demonstration_assets/unitary_synthesis_kak/block_zxz_transformations.tex
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
\documentclass[]{article} | ||
\usepackage{amsmath,quantikz,graphicx,xcolor,amssymb,amsfonts} | ||
|
||
|
||
\begin{document} | ||
\begin{align*} | ||
\begin{quantikz} | ||
& & \gate[2]{U(2^n)} &\\ | ||
& \qwbundle{n-1} & & | ||
\end{quantikz} | ||
&= | ||
\begin{quantikz} | ||
& & |[operator]| & \gate{R_X(\vec{\theta})}\wire[d]{q} & |[operator]| &\\ | ||
& \qwbundle{n-1} & \gate{W_0,W_1}\wire[u]{q} & |[operator]| & \gate{V_0,V_1}\wire[u]{q} & | ||
\end{quantikz}\\ | ||
&= | ||
\begin{quantikz} | ||
& & |[operator]| & \gate{H} & \gate{R_Z(\vec{\theta})}\wire[d]{q} & \gate{H} & |[operator]| &\\ | ||
& \qwbundle{n-1} & \gate{W_0,W_1}\wire[u]{q} & & |[operator]| & & \gate{V_0,V_1}\wire[u]{q} & | ||
\end{quantikz}\\ | ||
&= | ||
\begin{quantikz} | ||
& & |[operator]| & \gate{H} & & \gate{R_Z(\vec{\theta})}\wire[d]{q} & \gate{H} & |[operator]| &\\ | ||
& \qwbundle{n-1} & \gate{W_0,W_1}\wire[u]{q} & \gate{W_0^\dagger} & \gate{W_0} & |[operator]| & & \gate{V_0,V_1}\wire[u]{q} & | ||
\end{quantikz}\\ | ||
&= | ||
\begin{quantikz} | ||
& & |[operator]| & \gate{H} & \gate{R_Z(\vec{\theta})}\wire[d]{q} & & \gate{H} & |[operator]| &\\ | ||
& \qwbundle{n-1} & \gate{\mathbb{I},W_0^\dagger W_1}\wire[u]{q} & \gate{W_0} & |[operator]| & \gate{\Delta(-\vec{\theta})} & \gate{\Delta(\vec{\theta})} & \gate{V_0,V_1}\wire[u]{q} & | ||
\end{quantikz}\\ | ||
&= | ||
\begin{quantikz} | ||
& & \ctrl{1} & \gate{H} & \ctrl{1} & & & \gate{H} & |[operator]| &\\ | ||
& \qwbundle{n-1} & \gate{W_0^\dagger W_1}\wire[u]{q} & \gate{W_0} & \gate{\Delta(-2\vec{\theta})} & \gate{W_0^\dagger} & \gate{W_0} & \gate{\Delta(\vec{\theta})} & \gate{V_0,V_1}\wire[u]{q} & | ||
\end{quantikz}\\ | ||
&= | ||
\begin{quantikz} | ||
& & \ctrl{1} & \gate{H} & \ctrl{1} & \gate{H} & |[operator]| &\\ | ||
& \qwbundle{n-1} & \gate{W_0^\dagger W_1}\wire[u]{q} & & \gate{W_0^\dagger \Delta(-2\vec{\theta}) W_0} & & \gate{V_0 \Delta(\vec{\theta})W_0,V_1\Delta(\vec{\theta})W_0}\wire[u]{q} & | ||
\end{quantikz} | ||
\end{align*} | ||
|
||
\end{document} |
Binary file added
BIN
+43.3 KB
_static/demonstration_assets/unitary_synthesis_kak/magic_basis_rotation.pdf
Binary file not shown.
Binary file added
BIN
+12 KB
_static/demonstration_assets/unitary_synthesis_kak/magic_basis_rotation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions
13
_static/demonstration_assets/unitary_synthesis_kak/magic_basis_rotation.tex
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
\documentclass[]{standalone} | ||
\usepackage{amsmath,quantikz,graphicx,xcolor} | ||
|
||
|
||
\begin{document} | ||
\begin{quantikz} | ||
& \gate[2]{E} & \midstick[2,brackets=none]{=} | ||
& \gate{R_Z(\tfrac{\pi}{2})} & \targ{} & & \\ | ||
& & | ||
& \gate{R_X(-\tfrac{\pi}{2})} & \ctrl{-1} & \gate{R_Z(-\tfrac{\pi}{2})} & | ||
\end{quantikz} | ||
|
||
\end{document} |
Binary file added
BIN
+26.7 KB
_static/demonstration_assets/unitary_synthesis_kak/multiplexer_decomp.pdf
Binary file not shown.
Binary file added
BIN
+22.5 KB
_static/demonstration_assets/unitary_synthesis_kak/multiplexer_decomp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 33 additions & 0 deletions
33
_static/demonstration_assets/unitary_synthesis_kak/multiplexer_decomp.tex
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
\documentclass[]{standalone} | ||
\usepackage{amsmath,quantikz,graphicx,xcolor} | ||
|
||
|
||
\begin{document} | ||
% \begin{quantikz} | ||
% & |[operator]| & \midstick[3,brackets=none]{=} & & \ctrl{2} & & \ctrl{2} & \\ | ||
% & |[operator]| & & |[operator]| & & |[operator]| & & \\ | ||
% & \gate{R_P}\wire[u][2]{q} & & \gate{R_P}\wire[u][1]{q} & \targ{} & \gate{R_P}\wire[u][1]{q} & \targ{} & | ||
% \end{quantikz} | ||
|
||
% \begin{quantikz} | ||
% & |[operator]| & \midstick[3,brackets=none]{=} | ||
% & & \ctrl{2} & & \ctrl{2} & \midstick[3,brackets=none]{=} | ||
% & & & & \ctrl{2} & & & & \ctrl{2} & \\ | ||
% & |[operator]| & | ||
% & |[operator]| & & |[operator]| & & | ||
% & & \ctrl{1} & & & & \ctrl{1} & & & \\ | ||
% & \gate{R_P}\wire[u][2]{q} & | ||
% & \gate{R_P}\wire[u][1]{q} & \targ{} & \gate{R_P}\wire[u][1]{q} & \targ{} & | ||
% & \gate{R_P} & \targ{} & \gate{R_P} & \targ{} & \gate{R_P} & \targ{} & \gate{R_P} & \targ{} & | ||
% \end{quantikz} | ||
|
||
\begin{quantikz} | ||
& |[operator]| & \midstick[3,brackets=none]{=} | ||
& & & & \ctrl{2} & & & & \ctrl{2} & \\ | ||
& |[operator]| & | ||
& & \ctrl{1} & & & & \ctrl{1} & & & \\ | ||
& \gate{R_P}\wire[u][2]{q} & | ||
& \gate{R_P} & \targ{} & \gate{R_P} & \targ{} & \gate{R_P} & \targ{} & \gate{R_P} & \targ{} & | ||
\end{quantikz} | ||
|
||
\end{document} |
Binary file added
BIN
+26.8 KB
_static/demonstration_assets/unitary_synthesis_kak/multiplexer_decomp_CZ.pdf
Binary file not shown.
Binary file added
BIN
+9.63 KB
_static/demonstration_assets/unitary_synthesis_kak/multiplexer_decomp_CZ.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 33 additions & 0 deletions
33
_static/demonstration_assets/unitary_synthesis_kak/multiplexer_decomp_CZ.tex
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
\documentclass[]{standalone} | ||
\usepackage{amsmath,quantikz,graphicx,xcolor} | ||
|
||
|
||
\begin{document} | ||
% \begin{quantikz} | ||
% & |[operator]| & \midstick[3,brackets=none]{=} & & \ctrl{2} & & \ctrl{2} & \\ | ||
% & |[operator]| & & |[operator]| & & |[operator]| & & \\ | ||
% & \gate{R_P}\wire[u][2]{q} & & \gate{R_P}\wire[u][1]{q} & \targ{} & \gate{R_P}\wire[u][1]{q} & \targ{} & | ||
% \end{quantikz} | ||
|
||
% \begin{quantikz} | ||
% & |[operator]| & \midstick[3,brackets=none]{=} | ||
% & & \ctrl{2} & & \ctrl{2} & \midstick[3,brackets=none]{=} | ||
% & & & & \ctrl{2} & & & & \ctrl{2} & \\ | ||
% & |[operator]| & | ||
% & |[operator]| & & |[operator]| & & | ||
% & & \ctrl{1} & & & & \ctrl{1} & & & \\ | ||
% & \gate{R_P}\wire[u][2]{q} & | ||
% & \gate{R_P}\wire[u][1]{q} & \targ{} & \gate{R_P}\wire[u][1]{q} & \targ{} & | ||
% & \gate{R_P} & \targ{} & \gate{R_P} & \targ{} & \gate{R_P} & \targ{} & \gate{R_P} & \targ{} & | ||
% \end{quantikz} | ||
|
||
\begin{quantikz} | ||
& |[operator]| & \midstick[3,brackets=none]{=} | ||
& & & & \ctrl{2} & & & & \ctrl{2} & \\ | ||
& |[operator]| & | ||
& & \ctrl{1} & & & & \ctrl{1} & & & \\ | ||
& \gate{R_Y}\wire[u][2]{q} & | ||
& \gate{R_Y} & \ctrl{0} & \gate{R_Y} & \ctrl{0} & \gate{R_Y} & \ctrl{0} & \gate{R_Y} & \ctrl{0} & | ||
\end{quantikz} | ||
|
||
\end{document} |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
58 changes: 58 additions & 0 deletions
58
_static/demonstration_assets/unitary_synthesis_kak/recursive_QSD.tex
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
\documentclass[]{standalone} | ||
\usepackage{amsmath,quantikz,graphicx,xcolor} | ||
|
||
|
||
\begin{document} | ||
\begin{quantikz} | ||
& & \gate[3]{U(2^n)} &\\ | ||
& & & \\ | ||
& \qwbundle{n-2} & & | ||
\end{quantikz} | ||
= | ||
\scalebox{0.75}{ | ||
\begin{quantikz} | ||
& & & & & & & & & \gate{R_Z}\wire[d][2]{q} & | ||
& & & & & & & \gate{R_Y}\wire[d][2]{q} & & & | ||
& & & & & \gate{R_Z}\wire[d][2]{q} & & & & & | ||
& & & \\ | ||
& & & \gate{R_Z}\wire[d]{q} & & \gate{R_Y}\wire[d]{q} & & \gate{R_Z}\wire[d]{q} & & |[operator]| & | ||
& \gate{R_Z}\wire[d]{q} & & \gate{R_Y}\wire[d]{q} & & \gate{R_Z}\wire[d]{q} & & |[operator]| & & \gate{R_Z}\wire[d]{q} & | ||
& \gate{R_Y}\wire[d]{q} & & \gate{R_Z}\wire[d]{q} & & |[operator]| & & \gate{R_Z}\wire[d]{q} & & \gate{R_Y}\wire[d]{q} & | ||
& \gate{R_Z}\wire[d]{q} & & \\ | ||
& \qwbundle{n-2} & \gate{} & |[operator]| & \gate{} & |[operator]| & \gate{} &|[operator]| & \gate{} & |[operator]| & | ||
\gate{} & |[operator]| & \gate{} & |[operator]| & \gate{} & |[operator]| & \gate{} & |[operator]| & \gate{} & |[operator]| & | ||
\gate{} & |[operator]| & \gate{} & |[operator]| & \gate{} & |[operator]| & \gate{} & |[operator]| & \gate{} & |[operator]| & | ||
\gate{} &|[operator]| & \gate{} & | ||
\end{quantikz} | ||
} | ||
|
||
% \begin{quantikz} | ||
% & & \gate[4]{U(2^n)} &\\ | ||
% & & & \\ | ||
% & & & \\ | ||
% & \qwbundle{n-3} & & | ||
% \end{quantikz} | ||
% = | ||
% \scalebox{0.75}{ | ||
% \begin{quantikz} | ||
% & & & & & & & & & \gate{R_Z}\wire[d][3]{q} & | ||
% & & & & & & & \gate{R_Y}\wire[d][3]{q} & & & | ||
% & & & & & \gate{R_Z}\wire[d][3]{q} & & & & & | ||
% & & & \\ | ||
% & & & \gate{R_Z}\wire[d][2]{q} & & \gate{R_Y}\wire[d][2]{q} & & \gate{R_Z}\wire[d][2]{q} & & |[operator]| & | ||
% & \gate{R_Z}\wire[d][2]{q} & & \gate{R_Y}\wire[d][2]{q} & & \gate{R_Z}\wire[d][2]{q} & & |[operator]| & & \gate{R_Z}\wire[d][2]{q} & | ||
% & \gate{R_Y}\wire[d][2]{q} & & \gate{R_Z}\wire[d][2]{q} & & |[operator]| & & \gate{R_Z}\wire[d][2]{q} & & \gate{R_Y}\wire[d][2]{q} & | ||
% & \gate{R_Z}\wire[d][2]{q} & & \\ | ||
% & & \gate[2]{} & |[operator]| & \gate[2]{} & |[operator]| & \gate[2]{} &|[operator]| & \gate[2]{} & |[operator]| & | ||
% \gate[2]{} & |[operator]| & \gate[2]{} & |[operator]| & \gate[2]{} & |[operator]| & \gate[2]{} & |[operator]| & \gate[2]{} & |[operator]| & | ||
% \gate[2]{} & |[operator]| & \gate[2]{} & |[operator]| & \gate[2]{} & |[operator]| & \gate[2]{} & |[operator]| & \gate[2]{} & |[operator]| & | ||
% \gate[2]{} &|[operator]| & \gate[2]{} & \\ | ||
% & \qwbundle{n-3} & & |[operator]| & & |[operator]| & & |[operator]| & & |[operator]| & | ||
% & |[operator]| & & |[operator]| & & |[operator]| & & |[operator]| & & |[operator]| & | ||
% & |[operator]| & & |[operator]| & & |[operator]| & & |[operator]| & & |[operator]| & | ||
% & |[operator]| & & | ||
% \end{quantikz} | ||
% } | ||
|
||
|
||
\end{document} |
Binary file added
BIN
+50.8 KB
_static/demonstration_assets/unitary_synthesis_kak/single_multiplexer.pdf
Binary file not shown.
Binary file added
BIN
+26.9 KB
_static/demonstration_assets/unitary_synthesis_kak/single_multiplexer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions
21
_static/demonstration_assets/unitary_synthesis_kak/single_multiplexer.tex
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
\documentclass[]{standalone} | ||
\usepackage{amsmath,quantikz,graphicx,xcolor} | ||
|
||
|
||
\begin{document} | ||
% \begin{align*} | ||
\begin{quantikz} | ||
& & \gate[2]{A\oplus B} & \\ | ||
& \qwbundle{n-1} & & | ||
\end{quantikz} | ||
= | ||
\begin{quantikz} | ||
\ghost[2]{A\oplus B}& & |[operator]| & \\ | ||
& \qwbundle{n-1} & \gate{A,B}\wire[u]{q} & | ||
\end{quantikz} | ||
= | ||
\begin{quantikz} | ||
\ghost[2]{A\oplus B}& & \octrl{1} & \ctrl{1} & \\ | ||
& \qwbundle{n-1} & \gate{A} & \gate{B} & | ||
\end{quantikz} | ||
\end{document} |
Binary file added
BIN
+28.6 KB
_static/demonstration_assets/unitary_synthesis_kak/two_qubit_with_diagonal.pdf
Binary file not shown.
Binary file added
BIN
+17.4 KB
_static/demonstration_assets/unitary_synthesis_kak/two_qubit_with_diagonal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.