? Q-Sim Quantum Computer ● SmileBASIC Source

Sign In

Register
*Usernames are case-sensitive
Forgot my password
💀

Q-Sim Quantum Computer

Submitted
Updated
Author
amihart
Public Key
QK28V3NX
Min. Compat.
All
Rating
4 votes
Description Q-Sim is a simulator for a 5-qubit quantum computer, based heavily off of IBM's QX. It supports all the same logical operations as IBM's QX as well as supporting programs written in QASM. There are a few example programs: "QSDC.QASM" - Demonstrates the algorithm for a quantum superdense coding. "BELL.QASM" - Sets up a Bell state of entangled qubits. "CNOTR.QASM" - Uses Hadamard gates to reverse the CNOT gate. "SWAP.QASM" - Uses several Hadamard and CNOT gates to create a SWAP gate. "ADD.QASM" - Constructs a half-adder from a Toffoli gate and a CNOT gate according to this paper. I apologize for the really low quality screenshots, I will update them once SmileBASIC finally gives us that screenshot update... Update 1: - Added native SWAP gate, Toffoli gate, and Fredkin gate - Bug fixes - CNOT gates can have their direction swapped - Hold the L button while starting a program will allow you to set the initial state of all 5 qubits (type in something such as "00110")
Categories
Keywords
6 Comment(s) amihart amihart I recently came up with a much better algorithm for simulating quantum logic operations, I will eventually come back to update this. Currently I have it implemented in an Android/PC app I am working on here. I also detailed the algorithm on StackExchange here (my answer is the second one). RGamesOffical RGamesOffical Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Minecraft Is Awesome! I love Minecraft! Express Yourself Video Games I like to play video games! Hobbies This proves that you don't need a Quantum Computer Makky Makky Avatar Taboo I didn't change my avatar for 180 days Website Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength Night Person I like the quiet night and sleep late. Express Yourself lmao, sure... sarcasm exists amihart amihart You can't simply apply a logic gate to 1 qubit at a time because qubits can become entangled with each other, so instead you apply the logic gate to the entire system at once, which is represented as a 2^n by 2^n matrix where n is the number of qubits you have in memory. This means if you were trying to simulate a machine with 250 qubits of memory, you're looking at having to construct a matrix of 2^250 by 2^250 complex numbers in order to simulate it. A matrix this large would have more elements in a single row than there are atoms in the observable universe. This is why the world record for the number of qubits simulated is only 46. Simulating 1-10 qubits is easy, but its complexity grows exponentially. Having a real quantum computer would allow you to do these operations in a single iteration. This is just a toy to help you understand quantum computers inspired by IBM's Quantum Experience. It cannot replace quantum computers. Trying to perform a quantum algorithm in a classical simulation is incredibly slow. You need a real quantum computer to get the benefits. bluekrill bluekrill Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Drawing I like to draw! Hobbies Video Games I like to play video games! Hobbies A simulation is not equivalent in performance or accuracy to the real thing. RGamesOffical RGamesOffical Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Minecraft Is Awesome! I love Minecraft! Express Yourself Video Games I like to play video games! Hobbies It may not be close, but its fast.