The sharp acceleration in the share price came after the company announced plans to invest more than $10 billion over the next five years in quantum computing.