|
1 |
| -\documentclass{beamer} |
2 |
| -\usepackage{marvosym} |
3 |
| -\usepackage{wasysym} |
4 |
| -\usepackage{siunitx} |
5 |
| -\usepackage{moreverb} |
6 |
| -\usepackage{lato} |
7 |
| - |
8 |
| -\definecolor{UniBlue}{RGB}{43,61,81} |
9 |
| -\definecolor{UniBlueHL}{RGB}{67,98,129} |
10 |
| -\definecolor{UniGreen}{RGB}{54,188,123} |
11 |
| - |
12 |
| -\renewcommand*{\familydefault}{fla} |
13 |
| -\renewcommand*{\sfdefault}{fla} |
14 |
| - |
15 |
| -\setbeamercolor{title}{fg=white} |
16 |
| -\setbeamercolor{frametitle}{fg=UniGreen} |
17 |
| -\setbeamercolor{structure}{fg=white} |
18 |
| -\setbeamercolor{normal text}{fg=white} |
19 |
| -\setbeamercolor{background canvas}{bg=UniBlue} |
| 1 | +\documentclass[final,presentation,compress]{beamer} |
| 2 | +\usepackage[mathcal]{euler} |
| 3 | +\usepackage{amsmath, amssymb, amsopn} %amssymb,amstext |
| 4 | +\usepackage[cm-default]{fontspec} |
| 5 | +\usepackage{xltxtra} |
| 6 | +\usepackage[english]{babel} |
| 7 | +\usepackage{multicol} |
| 8 | +\usepackage{multimedia} |
| 9 | +\usepackage{tikz} |
| 10 | +\usetikzlibrary{arrows,shapes,snakes,positioning,backgrounds,decorations,graphs} |
| 11 | +\definecolor{ethblue}{rgb}{0, 0.2, 0.3568} |
| 12 | +\usepackage{minted} |
| 13 | + |
| 14 | +\mode<presentation> |
| 15 | +{ |
| 16 | + \useoutertheme{default} % simplistic |
| 17 | + \setbeamertemplate{headline}[default] % kill the headline |
| 18 | + \setbeamertemplate{navigation symbols}{} % no navigaton stuff in lr corner |
| 19 | + \useinnertheme{circles} |
| 20 | + \setbeamercolor*{palette primary}{use=structure,fg=white,bg=ethblue!70} |
| 21 | + \setbeamercolor*{palette secondary}{use=structure,fg=white,bg=ethblue!80} |
| 22 | + \setbeamercolor*{palette tertiary}{use=structure,fg=white,bg=ethblue!90} |
| 23 | + \setbeamercolor*{palette quaternary}{use=structure,fg=white,bg=ethblue!100} |
| 24 | + \setbeamercolor*{structure}{fg=ethblue!70} |
| 25 | + \hypersetup{ |
| 26 | + } |
| 27 | + \setbeamercovered{invisible} |
| 28 | +} |
| 29 | + |
| 30 | +\graphicspath{{fig//}} |
| 31 | + |
| 32 | +\title{The ARTIQ experiment control system} |
| 33 | +\author[S]{{\bf S\'ebastien~Bourdeauducq}} |
| 34 | +\institute[S]{ |
| 35 | + M-Labs Ltd, Hong Kong -- \url{http://m-labs.hk} |
| 36 | +} |
20 | 37 |
|
21 | 38 | \begin{document}
|
22 |
| -\fontseries{l}\selectfont |
23 | 39 |
|
24 |
| -\title{ARTIQ} |
25 |
| -\subtitle{A new control system for trapped ion experiments} |
26 |
| -\author{\fontseries{el}\selectfont S\'ebastien Bourdeauducq} |
27 |
| -\date{\fontseries{el}\selectfont july 2014} |
| 40 | +\begin{frame}[plain] |
| 41 | + \titlepage |
| 42 | +\tikz[overlay,remember picture]\node[anchor=south,above=-.5cm] at (current page.south) |
| 43 | + {\includegraphics[width=\paperwidth]{hong_kong}}; |
| 44 | +\tikz[overlay,remember picture]\node[anchor=south east, fill=white, |
| 45 | +inner sep=.3mm] at (current page.south east) {% |
| 46 | +\tiny David Iliff, CC-BY-SA}; |
| 47 | +\end{frame} |
28 | 48 |
|
29 |
| -\frame{\titlepage} |
| 49 | +\begin{frame} |
| 50 | + \includegraphics[width=\columnwidth]{jost_trap-3} |
| 51 | +\end{frame} |
30 | 52 |
|
31 | 53 | \begin{frame}
|
32 |
| -\frametitle{\fontseries{l}\selectfont Key points} |
33 |
| -\begin{itemize} |
34 |
| -\item High performance --- nanosecond resolution, hundreds of ns latency |
35 |
| -\item Expressive --- describe algorithms with few lines of code |
36 |
| -\item Portable --- treat FPGA boards as commodity |
37 |
| -\item Modular --- separate components as much as possible |
38 |
| -\item Flexible --- hard-code as little as possible |
39 |
| -\end{itemize} |
| 54 | + \frametitle{Quantum gate sequences (NIST)} |
| 55 | + \includegraphics[width=\columnwidth]{gate_sequence} |
40 | 56 | \end{frame}
|
41 | 57 |
|
42 | 58 | \begin{frame}
|
43 |
| -\frametitle{\fontseries{l}\selectfont Kernels} |
44 |
| -\begin{itemize} |
45 |
| -\item The real-time parts of the experiments |
46 |
| -\item Written in a subset of Python |
47 |
| -\item Executed on a CPU embedded in a FPGA (\textit{core device}) |
48 |
| -\item Special constructs to specify timing |
49 |
| -\end{itemize} |
| 59 | + \begin{tikzpicture}[box/.style={rectangle,fill=white}] |
| 60 | + \node[inner sep=0] {\includegraphics[width=\columnwidth]{lab}};\pause |
| 61 | + %\draw[help lines,white] (-4, -3) grid (4, 3); |
| 62 | + \node[box] at (-4, -2) {FPGA}; |
| 63 | + \node[box] at (3.5, 0) {ion trap}; |
| 64 | + \node[box] at (-3, 3) {$\sim$10 attenuators}; |
| 65 | + \node[box] at (2, 2) {$\sim$50 DAC}; |
| 66 | + \node[box] at (-4, 0) {$\sim$20 DDS}; |
| 67 | + \node[box] at (-2, 1) {$\sim$50 GPIO}; |
| 68 | + \node[box] at (.5, 0) {$\sim$10 motors}; |
| 69 | + \node[box] at (2, -2) {$\sim$10 power supplies}; |
| 70 | + \node[box] at (4, -3) {$\sim$10 lasers}; |
| 71 | + \end{tikzpicture} |
| 72 | +\end{frame} |
| 73 | + |
| 74 | +\begin{frame} |
| 75 | + \frametitle{Enter ARTIQ} |
| 76 | + \alert{A}dvanced \alert{R}eal-\alert{T}ime \alert{I}nfrastructure for \alert{Q}uantum physics |
| 77 | + |
| 78 | + \footnotesize |
| 79 | + \begin{itemize} |
| 80 | + \item High performance --- nanosecond resolution, hundreds of ns latency |
| 81 | + \item Expressive --- describe algorithms with few lines of code |
| 82 | + \item Portable --- treat hardware, especially FPGA boards, as commodity |
| 83 | + \item Modular --- separate components as much as possible |
| 84 | + \item Flexible --- hard-code as little as possible |
| 85 | + \end{itemize} |
50 | 86 | \end{frame}
|
51 | 87 |
|
52 | 88 | \begin{frame}[fragile]
|
53 |
| -\frametitle{\fontseries{l}\selectfont Timing} |
54 |
| -\begin{itemize} |
55 |
| -\item Exact time of interactions with the outside world is kept in an internal variable |
56 |
| -\item That variable only loosely tracks the execution time of CPU instructions |
57 |
| -\item The value of that variable is exchanged with the \textit{RTIO core} that does precise timing |
58 |
| -\end{itemize} |
59 |
| -\begin{verbatimtab} |
60 |
| -self.mains_sync.wait_edge() |
61 |
| -for i in range(10): |
62 |
| - delay(10*us) |
63 |
| - self.X.pulse(100*MHz, 100*us) |
64 |
| -\end{verbatimtab} |
65 |
| -\center First X pulse is emitted exactly \SI{10}{\micro\second} after mains edge |
| 89 | + \frametitle{Define a simple timing language} |
| 90 | + \footnotesize |
| 91 | + |
| 92 | + \begin{minted}[frame=leftline]{python} |
| 93 | +trigger.sync() # wait for trigger input |
| 94 | +start = now() # capture trigger time |
| 95 | +for i in range(3): |
| 96 | + delay(5*us) |
| 97 | + dds.pulse(900*MHz, 7*us) # first pulse 5 µs after trigger |
| 98 | +at(start + 1*ms) # re-reference time-line |
| 99 | +dds.pulse(200*MHz, 11*us) # exactly 1 ms after trigger |
| 100 | + \end{minted} |
| 101 | + |
| 102 | + \begin{itemize} |
| 103 | + \item Written in a subset of Python |
| 104 | + \item Executed on a CPU embedded on a FPGA (the \emph{core device}) |
| 105 | + \item \verb!now(), at(), delay()! describe time-line of an experiment |
| 106 | + \item Exact time is kept in an internal variable |
| 107 | + \item That variable only loosely tracks the execution time of CPU instructions |
| 108 | + \item The value of that variable is exchanged with the RTIO fabric that |
| 109 | + does precise timing |
| 110 | + \end{itemize} |
66 | 111 | \end{frame}
|
67 | 112 |
|
| 113 | + |
68 | 114 | \begin{frame}[fragile]
|
69 |
| -\frametitle{\fontseries{l}\selectfont Parallel and sequential blocks} |
70 |
| -\begin{itemize} |
71 |
| -\item All statements in a \verb!parallel! block are executed at the same exact time |
72 |
| -\item A \verb!parallel! block can spawn a \verb!sequential! block, where exact time increases |
73 |
| -\item \verb!Parallel! and \verb!sequential! blocks can be arbitrarily nested |
74 |
| -\end{itemize} |
75 |
| -\begin{verbatimtab} |
76 |
| -with parallel: |
77 |
| - with sequential: |
78 |
| - self.a.pulse(100*MHz, 20*us) |
79 |
| - self.b.pulse(200*MHz, 20*us) |
80 |
| - with sequential: |
81 |
| - self.c.pulse(300*MHz, 10*us) |
82 |
| - self.d.pulse(400*MHz, 20*us) |
83 |
| -\end{verbatimtab} |
| 115 | + \frametitle{Convenient syntax additions} |
| 116 | + \footnotesize |
| 117 | + \begin{minted}[frame=leftline]{python} |
| 118 | +with sequential: |
| 119 | + with parallel: |
| 120 | + a.pulse(100*MHz, 10*us) |
| 121 | + b.pulse(200*MHz, 20*us) |
| 122 | + with parallel: |
| 123 | + c.pulse(300*MHz, 30*us) |
| 124 | + d.pulse(400*MHz, 20*us) |
| 125 | + \end{minted} |
| 126 | + |
| 127 | + \begin{itemize} |
| 128 | + \item Experiments are inherently parallel: |
| 129 | + simultaneous laser pulses, parallel cooling of ions in different trap zones |
| 130 | + \item \verb!parallel! and \verb!sequential! contexts with arbitrary nesting |
| 131 | + \item \verb!a! and \verb!b! pulses both start at the same time |
| 132 | + \item \verb!c! and \verb!d! pulses both start when \verb!a! and \verb!b! are both done |
| 133 | + (after 20\,µs) |
| 134 | + \item Implemented by inlining, loop-unrolling, and interleaving |
| 135 | + \end{itemize} |
84 | 136 | \end{frame}
|
85 | 137 |
|
| 138 | + |
86 | 139 | \begin{frame}[fragile]
|
87 |
| -\frametitle{\fontseries{l}\selectfont Object orientation and code reuse} |
88 |
| -\begin{verbatimtab} |
89 |
| -class Main(AutoDB): |
| 140 | + \frametitle{Physical quantities, hardware granularity} |
| 141 | + \footnotesize |
| 142 | + \begin{minted}[frame=leftline]{python} |
| 143 | +n = 1000 |
| 144 | +dt = 1.2345*ns |
| 145 | +f = 345*MHz |
| 146 | + |
| 147 | +dds.on(f, phase=0) # must round to integer tuning word |
| 148 | +for i in range(n): |
| 149 | + delay(dt) # must round to native cycles |
| 150 | + |
| 151 | +dt_raw = time_to_cycles(dt) # integer number of cycles |
| 152 | +f_raw = dds.frequency_to_ftw(f) # integer frequency tuning word |
| 153 | + |
| 154 | +# determine correct phase despite accumulation of rounding errors |
| 155 | +phi = n*cycles_to_time(dt_raw)*dds.ftw_to_frequency(f_raw) |
| 156 | + \end{minted} |
| 157 | + |
| 158 | + \begin{itemize} |
| 159 | + \item Need well defined conversion and rounding of physical quantities |
| 160 | + (time, frequency, phase, etc.) to hardware granularity and back |
| 161 | + \item Complicated because of calibration, offsets, cable delays, |
| 162 | + non-linearities |
| 163 | + \item No generic way to do it automatically and correctly |
| 164 | + \item $\rightarrow$ need to do it explicitly where it matters |
| 165 | + \end{itemize} |
| 166 | +\end{frame} |
| 167 | + |
| 168 | + |
| 169 | +\begin{frame}[fragile] |
| 170 | + \frametitle{Invite organizing experiment components and code reuse} |
| 171 | + \footnotesize |
| 172 | + |
| 173 | + \begin{minted}[frame=leftline]{python} |
| 174 | +class Experiment: |
90 | 175 | def build(self):
|
91 | 176 | self.ion1 = Ion(...)
|
92 | 177 | self.ion2 = Ion(...)
|
93 | 178 | self.transporter = Transporter(...)
|
94 | 179 |
|
95 | 180 | @kernel
|
96 | 181 | def run(self):
|
97 |
| - self.ion1.cool(duration=10*us) |
98 |
| - self.ion2.cool(frequency=...) |
| 182 | + with parallel: |
| 183 | + self.ion1.cool(duration=10*us) |
| 184 | + self.ion2.cool(frequency=...) |
99 | 185 | self.transporter.move(speed=...)
|
| 186 | + delay(100*ms) |
100 | 187 | self.ion1.detect(duration=...)
|
101 |
| -\end{verbatimtab} |
| 188 | + \end{minted} |
102 | 189 | \end{frame}
|
103 | 190 |
|
| 191 | + |
104 | 192 | \begin{frame}[fragile]
|
105 |
| -\frametitle{\fontseries{l}\selectfont Communication with the kernel} |
106 |
| -\begin{itemize} |
107 |
| -\item When the kernel function calls a non-kernel function, it generates a RPC |
108 |
| -\item The callee is executed on the host |
109 |
| -\item The callee may receive parameters from the kernel and may return a value to the kernel |
110 |
| -\item The kernel must have a loose real-time constraint (a long \verb!delay!) to cover communication and host delays |
111 |
| -\item Mechanism to report results and control slow devices |
112 |
| -\end{itemize} |
| 193 | + \frametitle{RPC to handle distributed non-RT hardware} |
| 194 | + \footnotesize |
| 195 | + |
| 196 | + \begin{minted}[frame=leftline]{python} |
| 197 | +class Experiment: |
| 198 | + def prepare(self): # runs on the host |
| 199 | + self.motor.move_to(20*mm) # slow RS232 motor controller |
| 200 | + |
| 201 | + @kernel |
| 202 | + def run(self): # runs on the RT core device |
| 203 | + self.prepare() # converted into an RPC |
| 204 | + \end{minted} |
| 205 | + |
| 206 | + \begin{itemize} |
| 207 | + \item When a kernel function calls a non-kernel function, it generates a RPC |
| 208 | + \item The callee is executed on the host |
| 209 | + \item Mechanism to report results and control slow devices |
| 210 | + \item The kernel must have a loose real-time constraint (a long \verb!delay!) |
| 211 | + or means of re-synchronization to cover communication, host, and device delays |
| 212 | + \end{itemize} |
113 | 213 | \end{frame}
|
114 | 214 |
|
| 215 | + |
115 | 216 | \begin{frame}
|
116 |
| -\frametitle{\fontseries{l}\selectfont Kernel deployment process} |
117 |
| -\begin{enumerate} |
118 |
| -\item Constants and called kernels are inlined |
119 |
| -\item Loops are unrolled |
120 |
| -\item Statements from concurrent sequential blocks are interleaved. Threads are currently unsupported. |
121 |
| -\item Time is converted to RTIO clock units |
122 |
| -\item The Python AST is converted to LLVM IR |
123 |
| -\item The LLVM IR is compiled to OpenRISC machine code |
124 |
| -\item The OpenRISC binary is sent to the core device |
125 |
| -\item The runtime in the core device links and run the kernel |
126 |
| -\item The kernel calls the runtime for communication (RPC) and access to core device peripherals (RTIO, DDS) |
127 |
| -\end{enumerate} |
| 217 | + \frametitle{Kernel deployment to the core device} |
| 218 | + \footnotesize |
| 219 | + \begin{itemize} |
| 220 | + \item RPC and exception mappings are generated |
| 221 | + \item Constants and small kernels are inlined |
| 222 | + \item Small loops are unrolled |
| 223 | + \item Statements in parallel blocks are interleaved |
| 224 | + \item Time is converted to RTIO clock cycles |
| 225 | + \item The Python AST is converted to LLVM IR |
| 226 | + \item The LLVM IR is compiled to OpenRISC machine code |
| 227 | + \item The OpenRISC binary is sent to the core device |
| 228 | + \item The runtime in the core device links and runs the kernel |
| 229 | + \item The kernel calls the runtime for communication (RPC) and interfacing |
| 230 | + with core device peripherals (RTIO, DDS) |
| 231 | + \end{itemize} |
128 | 232 | \end{frame}
|
129 | 233 |
|
130 |
| -\begin{frame}[fragile] |
131 |
| -\frametitle{\fontseries{l}\selectfont Channels and parameters} |
132 |
| -\begin{itemize} |
133 |
| -\item A kernel is a method of a class |
134 |
| -\item The entry point for an experiment is called \verb!run! --- may or may not be a kernel |
135 |
| -\item The \verb!AutoDB! class manages channels and parameters |
136 |
| -\item If channels/parameters are passed as constructor arguments, those are used |
137 |
| -\item Otherwise, they are looked up in the device and parameter databases |
138 |
| -\end{itemize} |
| 234 | + |
| 235 | +\begin{frame} |
| 236 | + \frametitle{Higher level features} |
| 237 | + \footnotesize |
| 238 | + \begin{itemize} |
| 239 | + \item Device management: drivers, remote devices, device database |
| 240 | + \item Parameter database \\ |
| 241 | + e.g.\ ion properties such as qubit flopping frequency |
| 242 | + \item Scheduling of experiments \\ |
| 243 | + e.g.\ calibrations, queue |
| 244 | + \item Archival of results (HDF5 format) |
| 245 | + \item Graphical user interface \\ |
| 246 | + run with arguments, schedule, real-time plotting |
| 247 | + \end{itemize} |
| 248 | +\end{frame} |
| 249 | + |
| 250 | + |
| 251 | +\begin{frame} |
| 252 | + \frametitle{Short-term hardware support} |
| 253 | + \footnotesize |
| 254 | + \begin{itemize} |
| 255 | + \item Core device: Papilio Pro, Pipistrello, KC705 |
| 256 | + \item High speed DDS with AD9858 and AD9914 \\ |
| 257 | + (direct core device, $ < 25$ channels) |
| 258 | + \item Waveform generation: PDQ (NIST), PXI6733 |
| 259 | + \item Lab Brick Digital Attenuators |
| 260 | + \item Novatech 409B DDS |
| 261 | + \item Thorlabs motor controllers |
| 262 | + \end{itemize} |
| 263 | +\end{frame} |
| 264 | + |
| 265 | +\begin{frame} |
| 266 | + \begin{center} |
| 267 | + \includegraphics[width=3cm]{../../logo/artiq.pdf} \\ |
| 268 | + \url{http://m-labs.hk/artiq} |
| 269 | + \end{center} |
| 270 | + |
| 271 | + \footnotesize |
| 272 | + \begin{itemize} |
| 273 | + \item Public mailing list (with archives) |
| 274 | + \item Full source code, BSD licensed |
| 275 | + \item Design applicable beyond ion trapping (superconducting qubits, |
| 276 | + neutral atoms...) |
| 277 | + \end{itemize} |
| 278 | + \textit{Thanks to Robert J\"ordens, Joe Britton, Daniel Slichter and other members of the NIST Ion Storage Group for their support in developing ARTIQ.} |
| 279 | + |
139 | 280 | \end{frame}
|
140 | 281 |
|
141 | 282 | \end{document}
|
0 commit comments