热度 23
2014-7-3 18:31
1708 次阅读|
0 个评论
When I first tried to run a quantum mechanical calculation in a computer, I used a humble Sinclair Spectrum ZX+. These days we have GFLOPs-scale computational capabilities available to us in products as unassuming as a smartphone. Quantum simulations that previously required a huge and expensive supercomputer can now be efficiently executed in an affordable embedded device. This new computational power is a key enabler for STEM (Science, Technology, Engineering, Mathematics) education. This allows for a new approach for physics, not from the pure mathematical point of view, but from a very simple algorithmic focus. We can think about this as an analog vs. digital approach. From my own experience, I can assure you that simulating complex quantum systems by running a little program on your own computer is a really enlightening experience. While attending the EE Live! 2014 conference and exhibition earlier this year, I had the opportunity of getting acquainted with Adapteva's CEO, Andreas Olofsson. Adapteva broke into the mainstream EE scene with its Parallella board Kickstarter project. This credit card-sized open-hardware USD$99 system is widely considered to be the world's most energy efficient supercomputer. You can imagine how happy I was to discover that Max Maxfield, my editor at EETimes, was one of the backers of the Parallella project. I became even happier when Max said he would loan me his own brand-new Parallella supercomputer -- the only condition being that I should do something cool with it. The point is that I already knew what I wanted to do with the Parallella. As a proof of concept, my mission was to run the most energy-efficient quantum simulation ever performed in a classical -- non quantum -- computer. This is the story of how a $99 embedded supercomputer can be used to perform state-of-the-art quantum physics simulations. The Standard Model In the context of particle physics, the Standard Model is a theory concerning the electromagnetic, weak, and strong nuclear interactions that mediate the dynamics of the known subatomic particles. Now take a look at the mug in the photograph below. This is the mug from which I drink my coffee every morning. The equation on this mug reflects a Lagrangian formulation of the Standard Model. Everything we know about physics (except Gravitation) is embodied in this apparently simple equation. Of course, you also need to understand underlying mathematical and physical concepts, such as the QFT (quantum field theory) framework and the Lagrangian formulation, in order to extract useful information from this expression. The first line describes the dynamics of all the force fields -- the gauge bosons which carry the force; e.g., the photon, which is the massless particle behind the electromagnetic field. The second line describes the matter fields. This accounts for fermions and anti-fermions and their coupling to bosonic fields; i.e., the electron -- the particle from which all our EE technology arises. The third and fourth lines represent the coupling of matter fields with the Higgs field and the dynamics of the Higgs field itself, respectively. The Higgs field not only accounts for the mass of both the gauge bosons and the matter fermions, but it also hides some other secrets of our universe. Computational physics From the Lagrangian formulation of the Standard Model we can create algorithms that we use to calculate predictions that can be experimentally verified. This is the way in which our most accurate theories are tested in huge experimental facilities such as CERN. The problem is that simulating a quantum field in a classical computer is a very difficult task. It requires massive parallel floating-point computation capabilities. Fortunately, many of the calculations that previously required a supercomputer can now be performed in a conventional desktop or laptop machine. As an example, the image below is a snapshot from my own Ubuntu workstation running a Python script coding the Dirac equations. The whole Dirac and Maxwell equations can be derived from the QED (Quantum Electro Dynamics) section of the Standard Model Lagrangian formulation expressed as an algorithm with no more than 100 lines of code. Despite this simplicity, the code accounts for spin, quantum mechanics, relativistic effects, anti-matter, and so forth. I've actually tested this piece of code on a variety of ARM, i386, and AMD64-based machines, which demonstrates that it can be run on any hardware floating-point capable processor, including the one that powers your smartphone. Furthermore, this code can be easily modified to squeeze all the power of specialized data-crunching hardware (OpenCL, CUDA, etc.). In this point, it's quite clear what I want to do -- use the awesome power of the Parallella to run an optimized QED simulation. Meet the Parallella The photograph below shows the Parallella computer lying close to its box and a dollar coin. Despite its credit-card size, this little rascal boasts a vast amount of processing resources. The chip under the heat sink is a Xilinx Zynq device, which comprises a dual ARM Cortex-A9 processor and a 7-series FPGA on a single die. The Zynq is a game-changing device on its own, but there is more inside the Parallella. The shiny chip, is an Adapteva Epiphany III multicore processor. Built using a 65nm process, the Epiphany III embeds 16 cores, which are able to deliver an awesome 25GFLOPs performance in single-precision format (the new Epiphany IV is built using a 28nm process, sports 64 cores, and provides an impressive 90 GFLOPs throughput). With only 5 watts of power consumption under typical workloads, it's clear why this tiny processing beast is claimed to be the world's most energy efficient computational engine. Furthermore the Parallella is designed in such a way as to facilitate the building of processing clusters, which makes this board an optimal choice for deploying low-cost and low-power supercomputers. Hot stuff! Processing information is a physical process that wastes energy. The more complex the simulation you intend to run, the more energy (and time) you are going to consume. Energy consumption in electronic systems translates into thermal issues. This is why most of the processing engines used in supercomputers require advanced active cooling, such as industrial-grade air conditioning, liquid cooling, or hardware specific heat-pipes. Despite the fact the Parallella is extremely power efficient, the small size of the board does mandate some level of active cooling. Fortunately, extracting the unwanted thermal energy from the Parallella board requires a not very powerful fan. Thus, in order to avoid thermal issues when running at full steam, I constructed a Lego Parallella case that includes a low-end standard PC cooling fan. The two images below show my case with the fan raised for access and lowered when running. If you are the proud owner of a Parallella, you'll be interest to hear that Adapteva is working on offering active cooling cases for both cluster and standalone configurations ( click here for more details). All systems go! In the photograph below we see my Parallella setup running a full-blown Ubuntu desktop based on the Linaro project. With a full HD-capable HDMI connector, USB interface, and Ethernet connectivity, the Parallella really is a fully functional, credit card-sized supercomputer for just USD$99. On the number-crunching side, the Parallella toolchain is completely self-contained. An algorithm can be written, compiled, and executed on the platform with no need for an external host. What's more, you can easily upgrade the entire toolchain, the Operating System libraries, and even the Zynq FPGA bitstream when a new upgrade is published. In the image above, the Parallella is simulating the evolution of an electron/anti-electron field using a QED framework. More specifically, the Parallella is calculating and plotting the relativistic evolution of a spin-1/2 fermion field inside an electromagnetic potential. An un-optimized version of the algorithm can be run on the Zynq's dual ARM Cortex A9 processors, just as could be done on a low-end embedded computer such as the BeagleBone or the Raspberry Pi. But when the code is optimized so as to take advantage of the Epiphany III processor, an approximately 15X speed-up is achieved. This is maybe the world's most power efficient Quantum Field Theory computation ever performed on a classical computer, but this not the important issue here. The important thing is that this experiment is just an example demonstrating how current embedded computer technology allows for a new age of affordable state-of-the-art physics simulations. We are facing a revolution in the way physics is performed and taught -- a new paradigm in which computer science is an essential part in the search for a deeper knowledge of our universe. Javier D. Garcia-Lasheras, Open Science Activist