I'd recommend to take master and PhD in Computer Science or a specialized subfield if this is possible.
One needs fairly little physics for understanding quantum computations (just rudiments of quantum mechanics in finite Hilbert spaces), but you can't know enough of certain areas in Computer science to be competent in artificial intelligence.
On the other hand, doing a master in physics without the knowledge of a MSc in Physics is very hard.