In order to buy stock, the company has to be public and offering shares for sale. If you are very wealthy you could "invest" in a company like D-Wave in Canada that claims to be building one. As far as I know D-Wave is still private and has not had an IPO.
Any updates in the past couple years? Are there any publicly traded companies that are developing quantum computer hardware or software besides the giants like Google?
Although the theoretical potential is intriguing, the reality is that the vast majority of computing requirements simply do not need that kind of power. And at that, quantum computing has a long, long way to go to even catch up with normal computers, which, aren't exactly waiting to be caught up to.