File:Shor's algorithm.svg

Summary

Description
English: Quantum subroutine for order finding in Shor's algorithm. Based on Figure 1 in Circuit for Shor's algorithm using 2n+3 qubits by Stephane Beauregard. Created in LaTeX using Q-circuit. Source code below.
Date
Source Own work
Author Bender2k14
SVG development
InfoField

Source code

\documentclass[11pt]{article}
\input{Qcircuit}
\thispagestyle{empty}
\begin{document}
\[
 \Qcircuit @C=.7em @R=.7em {
  \lstick{\ket{0}}    & \gate{H} & \qw & \qw               & \qw               & \qw & \cdots & & \ctrl{4}               & \multigate{3}{\textrm{QFT}_{2n}^{-1}} & \qw  & \meter & \cw \\
  \lstick{\vdots\ \ } & \vdots   &     &                   &                   &     &        & &                        &    \pureghost{\textrm{QFT}_{2n}^{-1}} &      & \vdots &     \\
  \lstick{\ket{0}}    & \gate{H} & \qw & \qw               & \ctrl{2}          & \qw & \cdots & & \qw                    &        \ghost{\textrm{QFT}_{2n}^{-1}} & \qw  & \meter & \cw \\
  \lstick{\ket{0}}    & \gate{H} & \qw & \ctrl{1}          & \qw               & \qw & \cdots & & \qw                    &        \ghost{\textrm{QFT}_{2n}^{-1}} & \qw  & \meter & \cw \\
  \lstick{\ket{1}}    & /^n \qw  & \qw & \gate{U{a^{2^0}}} & \gate{U{a^{2^1}}} & \qw & \cdots & & \gate{U{a^{2^{2n-1}}}} & \qw
 }
\]
\end{document}

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International license.
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
Category:CC-BY-SA-4.0#Shor's%20algorithm.svgCategory:Self-published work
Category:Images with LaTeX source code Category:Quantum circuit
Category:CC-BY-SA-4.0 Category:Images with LaTeX source code Category:Quantum circuit Category:Self-published work Category:Valid SVG created with LaTeX