Google's "Quantum Computing Playground" lets you fiddle with quantum algorithms
Google has just launched a new web-based integrated development environment (IDE) that allows users to write, run and debug software that makes use of quantum algorithms. The tool could allow computer scientists to stay ahead of the game and get acquainted with the many quirks of quantum algorithms even before the first practical quantum computer is built.
Why go quantum?
Sick of Ads?
More than 700 New Atlas Plus subscribers read our newsletter and website without ads.
Join them for just US$19 a year.More Information
No matter how fast classical computers get, the number of steps they need to solve a given problem will always be set by rules that make intuitive sense to us. Say, for instance, that you have a guest list with one hundred names written in no particular order, and that you want to search for a specific name in the list. You'd have to look at the names one by one, compare each one to the name you're looking for, and go through the entire list if necessary (on average it will take you fifty "tries" to find a match, no more and no less).
But if you have quantum mechanics on your side, then you can stretch the rules a bit. This is what makes quantum computers so special: although they are perfectly capable of executing the same algorithms as a classical computer, they can also exploit some "strange behavior" that only happens at the smallest of scales, such as entanglement and superposition of quantum states, to give us very dramatic speedups.
For instance, searching such a list using a quantum algorithm would take a number of "tries" proportional to the square root of the number of items in the list, instead of half that number like before. So the longer the list, the bigger the speed gain. In other quantum algorithms, the speedups are even more dramatic. For example, the very popular RSA data encryption method is based on the fact that factoring very large numbers is computationally extremely difficult, but with a quantum computer, breaking the encryption becomes almost trivial.
Google has now launched "Quantum Computing Playground," a web-based IDE interface that allows you to play with quantum algorithms for yourself, using an ad-hoc scripting language called "qScript." Using the interface, which simulates a GPU-accelerated quantum computer, you can write your programs, compile them, debug and run them, all from your Chrome browser.
The software can simulate quantum registers up to 22 quantum bits (and no, that's not enough to break RSA encryption), it can run a demo of Grover's (quick searching) and Shor's (fast number factorization) algorithms, and can visualize the results as 2D and 3D graphs in which each bar represents a superpositions of qubits, while their color or height represent amplitude and phase of a given superposition.
If you try to compile and then run the code samples, you'll notice something that might put you off: the same code sometimes returns different outputs. Most quantum algorithms are probabilistic, meaning they only return the correct result with a high degree of likelihood, but no deterministic certainty. In a practical setting, you'd need to run the same algorithm a number of times to make sure you got the right answer.
Unfortunately, the online guide that Google provides for the qScript language isn't very comprehensive, so you'll need at least some familiarity with both software development and the way in which quantum gates operate to get the most out of it.