B A homebrew quantum computer simulator

Bob Walance
Insights Author
Gold Member
Messages
82
Reaction score
55
TL;DR Summary
My Python code for and a video describing this Python-based quantum computer simulator.
A while ago I started writing a quantum computer simulator in order to learn more about quantum computing. It certainly has helped me.

The simulator is written in Python and the development was done on a Raspberry Pi 4. It has also been tested on a pc.

In order to see it do something useful I implemented Grover's algorithm. It can simulate up to 13 qubits although that takes about 1/2 hour to do on the Pi. Running 10 qubits is pretty quick. I plan to tackle Shor's algorithm next.

Here's a link to a video that briefly describes its operation and shows a demo of qubit entanglement plus a demo of Grover's algorithm.


Here's a link to code. This link is also shown at the beginning of the video.
https://github.com/BobWalance/My-qc-simulator-repository
 
  • Like
Likes atyy, jedishrfu, yucheng and 1 other person
Physics news on Phys.org
I've also written a blog post about the development of the simulator.https://medium.com/@BobWalance/building-a-quantum-computer-simulator-with-python-on-a-raspberry-pi-86c5e9f2513b
 
There is a file or library missing (2024).
 
  • Like
Likes Bob Walance
I've fixed that problem. Please download the six new .py files, and let me know if you're able to run it. Thanks.
 
entropy1 said:
There is a file or library missing (2024).

After you get the new files, the one to run is 'qc_simulator.py'.
 
Bob Walance said:
After you get the new files, the one to run is 'qc_simulator.py'.
Thanks. It seems to work fine now. But I am not familiar with quantum computing. So the program is abacadabra to me :cry: I expected a graphical user interface in which you can add and drop gates. But that is not available in this version of your program. So your program is too complicated for me. But it can probably be of use to other forummers. :smile:
 
entropy1 said:
Thanks. But I am not familiar with quantum computing. So the program is abacadabra to me. :smile:
The IBM simulator is much easier to use. Give it a try and then learn how to entangle two qubits. That'll be a good start.
https://quantum.ibm.com/composer/files/new
 

Similar threads

Replies
8
Views
2K
Replies
2
Views
3K
Replies
1
Views
2K
Replies
1
Views
1K
Replies
1
Views
2K
Replies
11
Views
3K
Replies
1
Views
1K
Back
Top