Interact with a quantum computer on your mobile device!
With The Q-Dice literally, all possibilities exist, and a single measurable outcome is provided!
The Quantum Dice mobile app uses IBM’s Qiskit, which leverages a quantum CPU, to generate a truly random set of numbers.
My brother taught me how to play ‘Dungeons and Dragons’ over 2018 Christmas, but I noticed that all the dice apps were sub-par.
The apps I found were clunky and slow. So I developed my very own app using python.
While creating the first dice app, I learned about how classical computing can only generate pseudo-random numbers. For more information on how computers create random numbers, check out this article from MIT.
Around the same time I started learning about the IBM Q Experience, where developers around the world can gain access to IBM’s Quantum Cloud using their Qiskit SDK.
To overcome the pseudo-random restriction of a classical computer, we created a Random Integer Engine using Qiskit and installed in to the dice app.
General Overview of Quantum Cloud Computing
Quantum Random Integer Engine Development
All development began with the Quantum Random Integer Engine (qengine). We have documentation published on the creation of the qengine so you begin development of your own applications.
Quantum Simulations vs. Pure Qubits
To save on resourcing and calculation times, the mobile app is limited to using the IBM Qubit simulators. Experiments with the IBMQX4 Backend proved that the infrastructure is not scaleable for mass market usage because of the significant costs associated.
To integrate pure qubits into your mobile application, you need to register through the IBM Q Experience and install your token credentials into your script. Follow the instructions here to learn how to implement pure qubits in your script.
To bring the quantum engine into a user-friendly mobile device, we had to compile the python engine on Android using the Python to Android Chaquopy SDK. Click here to view the Chaquopy documentation.
The Quantum Dice Mobile application is free for use using the GUN Public License. You are encouraged to poke & duplicate, and modify & improve on this this platform.
The hope is by developing the process of implementing a quantum cloud on mobile devices and releasing it for public use, other developers and scientists will be inspired to bring the quantum computing closer to end-users.
Check out the github repo:
Download the app to your Android Device:
- IBM Q – Qiskit Team | GitHub | Documentation
- Chaquo – Python SDK | GitHub | Documentation
Why isn’t this on iOS?
Android is the easiest platform to deploy the th Quiskit API. Future releases on iOS might become available.
Why is the app slow the first time I press “roll button”?
Bottom Line Up Front: The app needs to send your request through the cloud and that process takes time.
The first time a user calls the quantum engine the phone must first determine the best server to access based on network conditions. Then the request perimeters are sent to IBM’s “qasm simulator” where your random integer (randint) request is placed in a cue. After the process is complete the bitstream of raw data is submitted to your phone for processing into a base-10 integer.
Why does the app say “pseudo-random integer used”?
Q-Dice can detect your network conditions, if you have limited network connections (using the app in a dungeon) the app will still provide a random integer using Android’s internal pseudo random capability. The reason we chose to allow pseudo random integers is to improve user experience.