Shares in D-Wave, IonQ, Rigetti and two rivals rose 5-11% before the bell on Thursday. The money from the warning behind the rally may flow elsewhere

Investors do not usually cheer when a government agency warns that a technology could one day break the locks on the world's data. Yet before the opening bell on December 3rd, shares in the firms trying to build that technology jumped. D-Wave Quantum (NASDAQ: QBTS) rose by 10.7%, to $10.38. Rigetti Computing (NASDAQ: RGTI) and IonQ (NYSE: IONQ) each gained about 9%, to $11.29 and $31.37. Infleqtion (NYSE: INFQ) and Quantum Computing Inc (NASDAQ: QUBT) rose by 5.9% and 5.2%, to $9.72 and $5.84.

The spur was a joint statement from the National Security Agency, the Cybersecurity and Infrastructure Security Agency and the Office of the National Cyber Director. It described the risks that artificial intelligence poses to digital security and urged industry and government to work together to upgrade digital infrastructure and cyber-defences. Officials were careful to say there is no immediate and widespread threat. A group of large technology firms separately called for a faster move to encryption that can withstand quantum computers.

The logic of the alarm is simple. Much of the public-key encryption that protects bank transfers, medical records and state secrets rests on mathematical problems that are punishingly hard for ordinary computers. In 1994 Peter Shor showed that a big, well-behaved quantum computer could solve them with ease. Nobody has built such a machine. But stolen data can wait, and spies are patient. The fear is of "harvest now, decrypt later": copy the scrambled traffic today and read it when the hardware catches up. Washington has set deadlines for its most sensitive systems, with key establishment to be protected by the end of 2030 and digital signatures by the end of 2031.

Investors have drawn a tidy conclusion: if the threat is real, those building the machines must be worth more. Here the tidiness ends.

Start with the hardware. Today's gate-based quantum computers are small and error-prone, with at best a few thousand physical qubits. Breaking widely used encryption would need a machine corrected for errors on a far grander scale; estimates run to a million or more physical qubits, though they have been falling. Then consider D-Wave, this morning's best performer. It builds annealing machines, which are good at certain optimisation problems and cannot run Shor's algorithm at all. As codebreakers, they are about as menacing as a pocket calculator.

The five firms are not alike, either. D-Wave anneals, Rigetti etches superconducting chips, IonQ traps ions, Infleqtion manipulates neutral atoms and Quantum Computing Inc works with light. Nobody knows which design will prevail, which is a reason to see the group as a basket of options, not a bet on any one machine.

Next, follow the money. The defence is cheaper than the attack. In 2024 America's standards body, NIST, published its first post-quantum encryption standards: new mathematical schemes that run on ordinary computers. Moving to them is a vast chore, since every system must be found, tested and updated, but the work pays software, networking and security vendors, not makers of quantum hardware. Cybersecurity stocks rose on Thursday, too, by 7-11%. The warning's main beneficiaries sell locks, not lockpicks.

That leaves the quantum firms with a softer case. One is attention: the stocks had already been rising. On Wednesday Infleqtion closed up 13.9%, D-Wave 6.6%, Rigetti 4.4%, Quantum Computing Inc 4.1% and IonQ 3.2%. Measured from Tuesday's close, Thursday's pre-market prices put Infleqtion about 21% higher, D-Wave 18%, Rigetti 14%, IonQ 12.5% and Quantum Computing Inc almost 10%. Another is patronage. Governments are among the biggest buyers of quantum research and machines, and an alarm from the spy agencies makes budget requests easier to write. A third is legitimacy: official concern that quantum computers will matter is, for firms that must raise money, worth something in itself.

Context tempers the excitement. Rigetti, at $11.29, remains more than 60% below its 52-week high of $30.21; Infleqtion is more than 50% below its peak of $21.28. Both lose money, with trailing losses of $0.15 and $0.21 a share on their quote pages. D-Wave and Rigetti are each valued at about $3.5bn and Infleqtion at about $2.1bn, hefty sums for firms still searching for a mass-market use. A pre-market jump, in thin trading, may also be gone by lunchtime.

The Y2K bug offers a lesson. It, too, came with a deadline, a vast bill and a crowd of firms selling reassurance. Quantum's deadline, unlike that of the millennium, is unknown, which is what makes it frightening and what makes it hard to price. A market that moves 10% on a joint statement is pricing the fear, not the machine. Spies may be patient. Investors, as Thursday showed, are less so.