Artificial intelligence (AI) stocks have captivated investors this year, and many businesses involved with AI have seen their valuations skyrocket in 2023. Analysts at Fortune Business Insights expect the AI market to grow at a compound annual growth rate (CAGR) of 21.6% until 2030. But there are a couple of hot markets to invest in that might lead to even better gains. Here's a closer look at both of them.

Cannabis

The cannabis industry is full of potential. It's an exciting industry in that it's in its early innings. Cannabis is legal in dozens of states but there are many large markets, including Florida, where recreational use remains off-limits. And federally, the ban on pot remains intact. There are growth opportunities in the U.S. and all over the world as attitudes on cannabis soften. 

As hot as AI is right now, the bigger growth opportunity may be in cannabis. According to estimates from Fortune Business Insights, the global cannabis market will grow at a CAGR of more than 34% until 2030. A lot will undoubtedly depend on how legalization progresses in the U.S. and other parts of the world (assuming it does at all). If it does and marijuana becomes legal in the U.S. or another big market, there could be some incredible gains on the horizon in the industry.

The challenge for investors is in picking a company that might be around to see that growth because many cannabis businesses are struggling, and there are no guarantees when it comes to marijuana reform. One of the industry leaders that might be among the safer long-term investment options is Curaleaf Holdings (CURLF 5.26%). The company has been a growth beast but recently it has scaled back, announcing plans to shut operations in multiple markets, including California, Colorado, and Oregon.

Excluding its discontinued operations, the company reported revenue growth of 14% in its most recent quarter ended March 31. On revenue of $336.5 million, the company incurred a loss of $54.4 million, which was higher than the $36.5 million loss it reported a year earlier. But with a focus on becoming leaner and more efficient, the business could be in much better shape in years to come. Curaleaf also has operations internationally, which can help set it up for growth in operations outside of the U.S. as well.

Some risk is going to be inevitable in the cannabis industry, but Curaleaf is one of the safer stocks to go with given its huge market presence, with operations in 19 states and more than 150 dispensaries. As long as you're willing to take on some risk and be prepared to wait for more cannabis markets to open up, Curaleaf can be an excellent growth stock to hang on to.

5G chips

If you prefer to stay closer to tech, then investing in 5G chip manufacturing may be the better option to go with than AI. 5G chips are in demand as phones evolve to the latest and greatest technology. Fortune Business Insights projects the CAGR for the global 5G chipset market at 36%, even higher than cannabis' growth rate, until 2030.

5G chips can enable faster data transfer and greater efficiency, and they're also used in the development of AI applications. The next-gen technology is a crucial part of the future of many businesses, and even AI itself. Investing in a 5G chipmaker can be an excellent way to gain exposure to this high-growth opportunity. 

One stock to consider for that purpose is Qualcomm (QCOM 1.45%). The company makes a wide range of products that utilize 5G and it makes chips that are used in smartphones. It offers investors opportunities in both 5G and AI, and its chips can be imperative as companies build out their own AI products and services.

The big risk facing the company is exposure to China, and worsening U.S.-China relations could hinder Qualcomm's growth prospects. In fiscal 2022 (which ended in September), China accounted for 64% of Qualcomm's total revenue. But with the stock trading at a modest 13 times earnings, Qualcomm's valuation reflects that risk, potentially making it a good contrarian investment to hang on to.