Quantum Simulator

Quantum Simulator for basic gates in QASM(X, CX, H, T, T.dag() ).

Run the simulator

python simulator.py <path of QASM File>

Sample Output

Enter into the src folder and run simulator.py from simulator package using below command.

python -m simulator.simulator .\test\inputs\sample\bell_state.qasm
[(0.707+0j), 0j, 0j, (0.707+0j)]

Testing the simulator

Enter into the src folder and use compare_simulators.py script.

python compare_simulators.py <path of QASM File>

OR

python compare_simulators.py <path of folder containing QASM Files>

Sample From Testing script

python compare_simulators.py .\test\sample\
==Simulator comparison : test\sample\bell_state.qasm==
True

 ==Simulator comparison : test\sample\hcancel.qasm==
True

==Simulator comparison : test\sample\tgate.qasm==
True

==Simulator comparison : test\sample\xgate.qasm==
True