Roughly three years ago, Goldman Sachs Group Inc. looked like it had an edge in Wall Street’s race to master quantum computing.