How Do I Build a Quantum Computer in My House?

How Do I Build a Quantum Computer in My House?

A line drawing of a person working at a workbench.This could be you! (Image credit: Russell Huffman)

By Ryan F. Mandelbaum, Senior Technical Writer, Qiskit

Open-access frameworks like Qiskit let you program a quantum computer over the cloud, and you?re an enterprising person who has a familiarity with quantum computers. So, if you happen to find yourself in need of something to do, how about trying to program a quantum computer that you built yourself?

It should be mentioned before I start that technically, you cannot build a fully-functioning quantum computer that runs quantum algorithms in your home (unless you have millions of dollars, access to fabrication and research facilities, and lots of dedicated time, in which case we probably need your help, rather than the other way around). However, with a big enough budget, free time, and perhaps some lessons on DIY optics and electronics, you could build a simple quantum system and program it to run a few quantum gates. You can even use Qiskit to control your device, with a little work. So, let?s get started:

What is a Quantum Computer?

A dramatic photograph of the IBM quantum computer?s wire-filled chandelier on a black backgroundWiring inside of the dilution refrigerator that keeps IBM?s superconducting qubits cold (Image credit: IBM Research)

It would help to know what a quantum computer is before trying to build one, of course. Quantum computers are systems that store and manipulate data by representing it with the properties innate to quantum systems. Basically, classical computers calculate with bits, 0 and 1 states represented by voltage across a transistor; quantum computers calculate with quantum bits or qubits, 0 and 1 states represented by two different states of a quantum system, like an electron filling one of two atomic energy levels.

The power of the quantum computer comes from the fact that during a calculation, qubits interact using the same mathematics that govern how subatomic particles like electrons or photons behave. This constrained form of linear algebra-plus-probability describes how qubits enter superposition, meaning they assuming multiple states at the same time, entangle, meaning the quantum states of two qubits are more strongly correlated than a pair of unrelated flipping coins, and interfere, meaning certain combinations of qubit states might become more likely while others become forbidden upon measurement. The outcome of a quantum computation will always be 0s and 1s.

Controlling a quantum system is far more easily said than done. Physicist David DiVincenzo famously proposed a set of five criteria that a device must satisfy in order to truly earn the ?quantum computer? moniker. One must be able to construct qubits that they can control, that can scale, that maintain their quantum-ness long enough to actually do calculations, that they can perform a universal set of operations (gates) on, and each of which must be able to be measured. After decades of research and lots of money, researchers have only recently begun producing devices that can meet these criteria.

Given the challenge that quantum computers have posed to researchers, it?s safe to say that one can?t simply whip together a homemade quantum device that adheres to DiVincenzo?s criteria. So let?s set our sights a little lower. Let?s just try to devise quantum systems we can control, manipulate, and measure, using parts or resources we can buy ourselves.

Build Qubits from Photons and Optical Components

A table with a laser beam passing through optical equipmentAn optical setup used in a real photonic quantum computing lab (Image credit: Ben Burridge, Quantum Engineering CDT, University of Bristol)

Today, physicists at academic institutions, national laboratories, and companies are pursuing a quantum computing architecture called photonic quantum computing, which stores data on the properties of photons, or light particles. Given the fact that optical components are relatively easy to buy, photonic quantum computers are a good quantum system to try recreating on your own.

Building such a quantum computer requires a light source that produces consistent, controllable photons, and as few as possible ? like a laser emitting tiny pulses or, if you?ve got some cash, a single photon emitter. You can store quantum information based on the photons? polarization states, or simply by asking which of two optical fibers a photon has traveled through. You?ll also need optical components that can put photons into superposition and apply gates, like a beam splitter that splits photons into one of two paths and a device that can change the phase of the photons as they take on their respective paths. Finally, you need a camera or detector to determine what the final state of the photon is. This kind of photon-based quantum computer already has a name: the KLM protocol, named for physicists Emanuel Knill, Raymond Laflamme, and Gerard James Milburn and published in 2001. It?s one of several different optical quantum computing architectures currently under development.

How you proceed with actually building this device is a matter of how much control you?re hoping to have over the qubits. You can buy an optical table, state-of-the-art optical components like a pre-built Mach-Zender interferometer, single photon emitters, and sensitive detectors. Or you can go relatively DIY ? Noah Wood, founder of quantum computing startup Spooky Manufacturing that offers solutions for quantum hobbyists, details how he built a cheap KLM-type quantum computer using a pulsed laser diode, a beam splitter that separates photons based on their polarization, and photoresistors here.

Merely putting photons into a superposition isn?t hard ? The real challenge is producing entanglement, since photons don?t interact with each other, said Alex Moylett, Research Software Developer at Quantum Software company Riverlane. The computer generates entanglement by routing photons through series of optical fibers and applying phase shifts, after which the observer must also apply postselection schemes. Basically, the observer tosses out any computational outcomes that don?t demonstrate that entanglement occurred. Other adaptive schemes will measure some of the photons earlier on in the computation, re-applying the gate until entanglement has succeeded.

But if you were hoping for something a little less familiar than optical components, perhaps you can try controlling and manipulating another particle?s quantum properties: an electron?s spin.

Build Qubits the Old Fashioned Way: Using Nuclear Magnetic Resonance

A gloved hand holding a small vial of water next to a simple, homemade NMR deviceA water sample next to a homemade NMR device (Image credit: Abe Asfaw)

An early front-runner in quantum computing architecture was based on nuclear magnetic resonance (NMR)? the same concept behind MRI machines. NMR devices aren?t as capable as today?s superconducting and trapped ion quantum computers, but scientists still employ techniques taken from NMR quantum computing in modern devices.

NMR quantum computers consist of a medium, often a liquid, held in a strong, constant magnetic field, perturbed with specially-tuned radio frequency pulses. The computer encodes information into an innate quantum property of atomic nuclei called their spin states, which you can think of as the base unit of a substance?s magnetism. Some atomic isotopes, like the hydrogen atoms in water and carbon-13, can serve as individual qubits with two spin states, usually called up and down. RF pulses can change the states of these qubits or cause their states to entangle between nuclei.

But unlike other quantum computing architectures where you control individual qubits, NMR requires the user to act on an ensemble of lots of molecules at the same time. This means that, instead of getting single-qubit measurements, a calculation returns an average of the behavior of every molecule in the medium, each of which serves as a tiny quantum processor. These ensemble measurements mean that NMR quantum computers are noisy and not very scalable. ?That, and you?re stuck with the properties of the molecules that nature gives you,? said Sarah Sheldon, IBM Quantum Research Staff Member. And unlike superconducting quantum computers where you begin with all of your qubits in the ground state, an NMR computer requires additional postprocessing to emulate a qubit in the ground state.

But we?re not trying to build a good quantum computer ? we?re trying to control and measure quantum states in our house.

Constructing an NMR quantum computer obviously requires the strongest electromagnet you can buy or build in order to maximize the signal you get out of the molecules. Inside that magnet, you can build a relatively simple setup ? another solenoid whose wire is hooked up to an LC circuit that you use to tune the device to the proper frequency and read out the nuclei?s reaction to the pulses. You?ll also need an RF signal generator and an FPGA to customize the pulses.

Feel free to experiment with the medium, but possibilities include ethanol, acetone, glycerin, carbon-13 enriched chloroform, or even just the hydrogen atoms floating around in water (though you?ll only have one qubit to work with, in that case). The amount you spend to build your device depends on the magnet and the electronics you plan to use, but there are plenty of tutorials that will help you put together the basics. You can even just buy a pulsed-NMR device and take it apart.

Build Qubits By Trapping Ions

A closeup of a torus with small lines inside representing trapped particles.A 3D-printed particle trap (Image credit: Janna Zoe Vischer/Julia Woithe/CERN)

What if one wanted to build a more advanced quantum computer, like those that receive the bulk of the news media hype and that corporations are racing to build? Is that possible?

The two most advanced quantum architectures today are probably superconducting and trapped ion quantum computers. Superconducting qubits are beyond the realm of a hobbyist, given that they require lots of specially fabricated components and a dilution refrigerator. But at least one enterprising hacker, Yann Allain, is attempting to put together a trapped ion quantum computer at a ?99% discount.?

Ions are a pretty straightforward quantum system ? electronic states, like an atom in the ground state or an excited state, can serve as the qubit states. A system of AC- and DC- electrodes producing radio frequency fields called a Paul trap can confine the ions. Lasers are responsible for cooling the ions, ionizing the source particles, and reading out the ions? states, and a microwave source (or more lasers) send pulses which initialize and send gates to the ions in order to control them. The whole thing needs to go inside a vacuum chamber to keep the noise down. That requires vacuum pumps, as well.

Your biggest challenge will likely be achieving a strong enough vacuum, creating your microwave or laser control setup, and in creating your Paul trap for trapping ions ? perhaps start with trapping dust particles, and then go from there. Allain built his Paul trap using a Kickad design and a CNC (computer numerical control) subtractive manufacturing machine to etch his 2D trap into a ceramic chip. He said in his talk that he struggled to build the laser control system (he attempted to build his laser system from scratch for around 2,000 euros, rather than purchase a pre-built system for 25,000 euros). While brainstorming our own ion trap quantum computer using only commercial parts, University of California postdoc Sara Mouradian estimated that we could probably build a simple device that traps and can perform a few gates (with lackluster fidelity) for less than a hundred thousand dollars.

If you?re hoping to build something even more impressive, well, it?s a great excuse to go back to graduate school and get a physics degree. Perhaps you could even work on IBM?s quantum computers!

How Do I Control This Thing?

A diagram showing the various inputs and hardware required to connect Qiskit to a quantum deviceA figure demonstrating an interface between a quantum device ? perhaps your homemade quantum device! ? and OpenPulse. (Image credit: McKay et al, arxiv:1809.03452 (2018))

Your newly hacked-together device sitting on your workbench probably doesn?t feel like a computer if you?re programming it by turning knobs and pressing buttons on the panels of your control electronics. But that?s why companies are developing software that you can use to control your quantum device. And even though IBM?s own quantum computing hardware consists of superconducting qubits, Qiskit is meant to be hardware-agnostic.

?Whatever qubit you?re talking about ? provided you?re doing gate-based computation and Qiskit understands the gates ? it should work,? said Paul Nation, IBM Quantum Software Delivery Lead. But it?s going to be a lot of work on your end. For IBM?s own devices, there are several back-end steps that convert Qiskit code into the waveform that creates the pulse for the superconducting qubit. For your own machine, you?ll need to determine exactly what it means to apply simple quantum gates, like the X-gate that flips between the two qubit states or the Hadamard gate that puts the qubit into an equal superposition of the two states, and create the interface so Qiskit and your device can talk to each other. You can use the Qiskit Pulse feature to calibrate and calculate the coherence time of your qubits as well as send custom pulses where you control the pulse shape, frequency, and duration. You can learn more about interfacing between a quantum device and Qiskit as well as the OpenPulse language here.

?

Quantum computers take a lot of time, effort, and person-power to build, which is why companies and research institutions have entire dedicated teams trying to construct and understand these devices. But they?re not outside the realm of DIY tinkering. You really can build a quantum system using commercially available parts, and you can even control and program your device using open-source software like Qiskit. So, why not try it?

Were you able to craft your own quantum device and program it with Qiskit? We want to know! Email me at ryanfmandelbaum@ibm.com and we?d love to show off your creation on the Qiskit blog!

2

No Responses

Write a response