Quantum computing isn't an easy area to invest in right now. Most companies agree that 2030 will be a turning point for the industry and commercially viable quantum computers will be available then. That's still a ways off, and investors need to be careful not to get in too early; otherwise, there could be a significant opportunity cost that would be incurred by investing in quantum computing instead of other possible areas.
Still, I think there could be a huge opportunity if you invest in the right quantum computing stocks right now. I've got five stocks that can be purchased in a group that ensures investors get exposure to quantum computing as well as current market trends, and I think it's highly likely that this cohort outperforms the market over the next few years.

Image source: Getty Images.
Legacy tech players
Quantum computing isn't an industry reserved for start-ups; some of the biggest names in tech are also investing in this technology. Two of the biggest are Alphabet (GOOG 0.52%) (GOOGL 0.46%) and Microsoft (MSFT -0.40%). Both of these companies are developing their own quantum computing chip in-house, which could result in massive profits down the road if each develops a viable quantum computing solution.
Both companies will use quantum computing for themselves, but will also offer it to clients through their respective cloud computing services. Right now, the big growth drivers for cloud computing are the migration of traditional workloads and artificial intelligence, but quantum computing could provide another growth driver. Microsoft's CEO stated that he believes quantum computing will be the next accelerator in the cloud, which could mean further growth for both Alphabet and Microsoft.
Another legacy tech player that will benefit is Nvidia (NVDA -0.85%). While Nvidia isn't directly developing quantum processing units, it's helping quantum computing players take a hybrid computing approach between traditional and quantum computing methods. It's also developing a quantum-focused version of its CUDA software, which helped it establish dominance in the traditional computing landscape.
All three of these companies are excelling in the AI-driven market, but also have long-term investments ongoing in the quantum world. By investing in these three today, investors can ensure they have exposure to both current and emerging trends. But there are also a few pure plays that look intriguing.
Quantum computing pure plays
I also like adding picks like IonQ (IONQ -1.93%) and D-Wave Quantum (QBTS -6.41%) into this basket, because it gives investors the massive upside of a pure-play quantum computing company. These two aren't very big companies, but if they make quantum computing viable, they could turn into huge winners for investors.
While some may argue these two are due to be outspent and outclassed by competitors like Alphabet and Microsoft, they are actually taking a different approach to quantum computing entirely.
Most quantum computing competitors like Alphabet and Microsoft are using a superconducting approach for their chips. However, IonQ is using a trapped ion technique, and D-Wave is using a quantum annealing approach. All three of these approaches have their use cases, but it will be some time before investors know which is the best.
By having exposure to all three, investors have the best chance to make a profit in this emerging industry. Although we're still a few years out from quantum computing relevance, I think owning a basket of legacy and emerging players is a smart way to ensure investors make a great profit.