"Spooky action at a distance" is how Albert Einstein described one of the key principles of quantum mechanics: entanglement. Entanglement occurs when two particles become related such that they can coordinate their properties instantly even across a galaxy. Think of wormholes in space or *Star Trek* transporters that beam atoms to distant locations. Quantum mechanics posits other spooky things too: particles with a mysterious property called "superposition," which allows them to have a value of 1 and 0 at the same time, and particles' ability to tunnel through barriers as if they were walking through a wall.

All of this seems crazy, but it is how things operate at the atomic level: The laws of physics are different. Einstein was so skeptical about quantum entanglement that he wrote a paper in 1935 titled "Can Quantum-Mechanical Description of Physical Reality Be Considered Complete?" He argued that it was not possible.

In this, Einstein has been proven wrong. Researchers recently accessed entangled information over a distance of 15 miles. They are making substantial progress in harnessing the power of quantum mechanics.

Einstein was right, though, about the spookiness of all of this.

Quantum mechanics is now being used to construct a new generation of computers that can solve the most complex scientific problems -- and unlock every digital vault in the world. These will perform in seconds computations that would have taken conventional computers millions of years. They will enable better weather forecasting, financial analysis, logistical planning, search for Earth-like planets, and drug discovery. And they will compromise every bank record, private communication, and password on every computer in the world -- because modern cryptography is based on encoding data in large combinations of numbers, and quantum computers can guess these numbers almost instantaneously.

There is a race to build quantum computers, and (as far as we know) it isn't the NSA that is in the lead. Competing are big tech companies such as IBM, Google, and Microsoft; start-ups; defense contractors; and universities. One Canadian start-up says that it has already developed a first version of a quantum computer. A physicist at Delft University of Technology in the Netherlands, Ronald Hanson, told *Scientific American* that he will be able to make the building blocks of a universal quantum computer in just five years, and a fully functional demonstration machine in a little more than a decade.

These will change the balance of power in business and cyberwarfare. They have profound national-security implications, because they are the technological equivalent of a nuclear weapon.

Let me first explain what a quantum computer is and where we are.

In a classical computer, information is represented in bits, binary digits, each of which can be a 0 or a 1. Because they have only two values, long sequences of 0s and 1s are necessary to form a number or do a calculation. A quantum bit (called a qubit), however, can hold a value of 0 or 1 or both values at the same time -- a superposition denoted as "0+1." The power of a quantum computer increases exponentially with the number of qubits. Rather than doing computations sequentially, as classical computers do, quantum computers can solve problems by laying out all the possibilities simultaneously and measuring the results.

Imagine being able to open a combination lock by trying every possible number and sequence at the same time. Though the analogy isn't perfect -- because of the complexities in measuring the results of a quantum calculation -- it gives you an idea of what is possible.

There are many complexities in building a quantum computer: challenges in finding the best materials from which to generate entangled photon pairs; new types of logic gates and their fabrication on computer chips; creation and control of qubits; designs for storage mechanisms; and error detection. But breakthroughs are being announced every month. IBM, for example, has just announced that it has found a new way to detect and measure quantum errors and has designed a new qubit circuit that, in sufficient numbers, will form the large chips that quantum computers will need.

Most researchers I have spoken with say that it is a matter of when -- not whether -- quantum computing will be practical. Some believe that this will be as soon as five years from now; others say 20 years from now. IBM said in April that we've entered a golden era of quantum-computing research and predicted that the company would be the first to develop a practical quantum computer.

One Canada-based startup, D-Wave Systems, says it has already has done it. Its chief executive, Vern Brownell, said to me in an email that D-Wave has created the first scalable quantum computer, with proven entanglement, and is now working on producing the best results possible for increasingly complex problems. He qualified this claim by stressing that their approach, called "adiabatic computing," may not be able to solve every problem but has a broad variety of uses in optimizing computations; sampling; machine learning; and constraint satisfaction for commerce, national defense, and science. He says that the D-Wave is complementary to digital computers, a special-purpose computing resource designed for certain classes of problems.

The D-Wave Two computer has 512 qubits and can, in theory, perform 2^{512} operations simultaneously. That's more calculations than there are atoms in the universe -- by many orders of magnitude. Brownell says the company will soon be releasing a quantum processor with more than 1,000 qubits. He says that his computer won't run Shor's algorithm, an algorithm necessary for cryptography, but it has potential uses in image detection; logistics; protein mapping and folding; Monte Carlo simulations and financial modeling; oil exploration; and finding exoplanets.

So quantum computers are already here in a limited form, and fully functional versions are on the way. They will be as transformative for mankind as were the mainframe computers, personal computers, and smartphones that we all use.

As do all advancing technologies, they will also create new nightmares. The most worrisome development will be in cryptography. Developing new standards for protecting data won't be easy. The RSA standards that are in common use each took five years to develop. Ralph Merkle, a pioneer of public-key cryptography, points out that the technology of public-key systems, because it is less well-known, will take longer to update than these -- optimistically, 10 years. And then there is a matter of implementation so that computer systems worldwide are protected. Without a particular sense of urgency or shortcuts, Merkle says, it could easily be 20 years before we've replaced all of the Internet's present security-critical infrastructure.

It is past time we began preparing for the spooky technology future we are rapidly heading into.

The Morning Email helps you start your workday with everything you need to know: breaking news, entertainment and a dash of fun. Learn more