Qualcomm Inc. has agreed to buy London-listed semiconductor company Alphawave IP Group Plc for about $2.4 billion in cash to expand its technology for artificial intelligence.