A homebrew quantum computer simulator

In summary, the conversation discussed the development of a quantum computer simulator written in Python on a Raspberry Pi 4. The simulator has been tested on a PC and can simulate up to 13 qubits, with a quick simulation time of 10 qubits. The developer has implemented Grover's algorithm and plans to tackle Shor's algorithm next. A video and blog post have also been created to showcase the simulator's operation and development process.
  • #1
Bob Walance
Insights Author
Gold Member
81
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
  • #2
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
 
  • #3
There is a file or library missing (2024).
 
  • Like
Likes Bob Walance
  • #4
I've fixed that problem. Please download the six new .py files, and let me know if you're able to run it. Thanks.
 
  • #5
entropy1 said:
There is a file or library missing (2024).

After you get the new files, the one to run is 'qc_simulator.py'.
 
  • #6
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:
 
  • #7
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
 
  • Like
Likes entropy1

Similar threads

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