A homebrew quantum computer simulator

Click For Summary
SUMMARY

The discussion centers on a quantum computer simulator developed in Python, specifically designed for the Raspberry Pi 4, capable of simulating up to 13 qubits using Grover's algorithm. The simulator's performance is notably efficient for 10 qubits, while simulating 13 qubits takes approximately 30 minutes. The developer plans to implement Shor's algorithm next. Users can access the simulator's code and a blog detailing its development through provided links.

PREREQUISITES
  • Python programming language
  • Raspberry Pi 4 hardware
  • Understanding of quantum algorithms, specifically Grover's algorithm
  • Basic familiarity with Git for code access
NEXT STEPS
  • Explore the implementation of Shor's algorithm in quantum computing
  • Learn about qubit entanglement using the IBM Quantum Composer
  • Investigate optimization techniques for quantum simulations on Raspberry Pi
  • Review the provided blog post for insights on developing quantum simulators
USEFUL FOR

Quantum computing enthusiasts, Python developers, and researchers interested in quantum algorithms and simulation techniques.

Bob Walance
Insights Author
Gold Member
Messages
84
Reaction score
55
TL;DR
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   Reactions: 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   Reactions: 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
 
  • Like
Likes   Reactions: entropy1

Similar threads

  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 42 ·
2
Replies
42
Views
5K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 11 ·
Replies
11
Views
3K