ElonDormancy / UQCS

Drag and Drop Quantum Simulator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

title

Quantum Simulator

The Quantum Simulator Project with for-loop method to apply the single qubit gate or two-qubit gate on the qubit and the process is able to accelerate with parallel computation,And you are easily constructing the single qubit gate or control gate via inputting the matrix form of the gate.

C++ version is able to realize the more effective and the main idea to accelerate the speed of QuantumSimulator is to accelerate the for loop,further,MPI lib or CUDA(Or Other Libs) will in usage.

User's Manual

YI

Quantum Simulator Compiler

Open Source Package Usage:

Introduction

"易(UQCS)" is a visualized universial quantum circuits[The limit on the number of qubits is 12] makes it extremely easy to build quantum circuits,intended to help people in about construct quantum circuits.

When the number of qubits more than 12,"易" will act as a kit to plot quantum circuit,which then are able to be exported to, for example, Qiskit or our own compiler to compile.

Try it out: UQCS

Examples

Drag to plot

screenshot of save circuit

Result:

screenshot of save circuit

--

Quantum Simulator Compiler

The json file exported from "易" can load in our own Quantum Simulator Compiler,which provides a universial without limit of the number of qubits.

Because of the Quantum Plot engine:https://github.com/rpmuller/PlotQCircuit The Python version of the quantum simulator is able to plot the quantum circuit as while as the psi evolution.

Example

QFT with three qubits

Save JSON:

screenshot of save circuit

Load JSON:

Quantum Simulator Compiler compile

%matplotlib inline
from plot_quantum_circuit import plot_quantum_circuit
from Init_State import init_vector
from JSON_Port import read_json,Apply_Gate_Sets

cir = []
qubits,gate_sets = read_json("./content.json")
q = init_vector(qubits)
write_output(Qcircuit_plot(qubits,gate_sets),"main.tex")
q,cir = Apply_Gate_Sets(q ,gate_sets)
print(q)
plot_quantum_circuit(cir)
[0.35355339+0.j 0.35355339+0.j 0.35355339+0.j 0.35355339+0.j
 0.35355339+0.j 0.35355339+0.j 0.35355339+0.j 0.35355339+0.j]

plot_quantum_circuit

screenshot of load circuit

Qcircuit

screenshot of load circuit

About

Drag and Drop Quantum Simulator

License:MIT License