Quantum computing stocks have been on an absolute tear recently as their companies announced major contract wins. But that was all topped off by JPMorgan Chase's announcement this week that it's investing $10 billion into strategic tech companies. That includes quantum computing businesses. But for quantum computing stocks to rise around 20% (some more, some less) following that news is troublesome.

No specific investment was announced in any of these companies, and other massive industries were listed in the release -- such as supply chain and advanced manufacturing, defense and aerospace, energy technology, and frontier and strategic technologies (where quantum computing was lumped in). This raises concerns about the short-term nature of the quantum computing market. The combined rise of all quantum computing stocks was more than the overall $10 billion investment announced by JPMorgan Chase, so there's clearly not enough to go around.

Observers have begun to speculate that there may be a quantum computing bubble forming. So is now the time to sell? I think Warren Buffett has some great advice for investors on what they should do.

Artist's rendering of a quantum computing cell.

Image source: Getty Images.

Warren Buffett has seen a bubble or two in his career

Warren Buffett is the legendary CEO of Berkshire Hathaway, a position he has held since he took control of the company in 1965. Over the years, Buffett has given investors several great pieces of wisdom, and I think one quote is applicable right now. He wrote that his goal was to "attempt to be fearful when others are greedy and to be greedy only when others are fearful."

There are clearly many signs of greed in the quantum computing market. As mentioned above, many of the quantum computing stocks rose by a massive amount in response to a nonspecific announcement that JPMorgan Chase would invest in emerging technologies.

Furthermore, we're still years away from quantum computing viability. Most competitors point toward 2030 as the likely turning point in quantum computing's commercial relevance, and that's still five years away. Five years ago, we were in the beginning stages of the COVID-19 pandemic, and nobody (outside of a handful of companies) had ever heard the term generative AI. It's impossible to know what will happen in the field over the next five years, or which companies will be the winners.

Most of the investment dollars flowing into the quantum computing space have centered around the pure plays. Still, there are also legacy tech players, like Alphabet, Microsoft, and IBM, which have nearly unlimited resources compared to pure plays like IonQ (IONQ -3.92%) or Rigetti Computing (RGTI -3.31%). It's still an uphill battle for IonQ and Rigetti, and just because the big tech players aren't saying anything doesn't mean they aren't experiencing success.

Companies like IonQ and Rigetti Computing are still years away from profits, and have to rely on government contracts and stock issuance to continue to fund their operations. As a result, they must issue a news release on any piece of positive news they can to let investors know about their successes. The big tech companies like Alphabet, IBM, and Microsoft can afford to stay silent about any breakthroughs, as they're internally funding their research.

The big tech players may be far more advanced than the pure plays, even if nobody outside of those companies knows it yet. I think this could be setting up some of the pure-play stocks for failure, and their shareholders should take action.

Taking some profits in an increasingly frothy industry is a smart move

Another Warren Buffett quote is applicable in this situation, too: "The first rule in investment is 'Don't lose.' And the second rule in investment is 'Don't forget the first rule.'" Investors have already made a significant amount of money on the quantum computing trade, and while it's possible these stocks could continue rising, a crash may be around the corner.

If you've invested in these stocks at any time this year, it may be time to at least trim some of them, as it's unlikely that they'll continue rising forever. By taking some profits now, you can be well positioned to deploy them back into the industry if it returns to earth.

Nobody ever lost money by selling a stock at a profit, although they have lost out on even larger returns. Still, I think the risk is greater than the reward, and it may be a wise time to take some profits off the table.