From machine learning to voting, the workings of the world demand randomisation, but true sources of randomness are surprisingly hard to find. Now quantum mechanics has supplied the answer