QuanGuru is a Python library for numerical analyses of Quantum systems. It is still under-development, and the rough development plan is provided below. The github repo is in here and the documentation are in here. It can already be installed via pip
pip install quanguru
Alternatively, if you wish to use the version of quanguru from your local repository, you can install via pip:
pip install -e <path/to/directory>
This will allow you to access the version or branch that exists in your local forked or cloned repo at any given time.
QuanGuru contains tools for numerical simulations of Quantum systems, and it is composed of two main sub-modules: (i) QuantumToolbox, and (ii) classes (for OOP, module to be renamed later). QuantumToolbox consists purely of Python functions (no other objects) that create and/or use matrices. The classes module (to be renamed later) contains classes to create flexible, simple, and object-oriented simulation scripts. Classes uses QuantumToolbox for matrix operations, and QuantumToolbox can be used as a standalone library to carry the same simulations.
import quanguru as qg
import numpy as np
spinSys = qg.QuantumSystem(dimension=2,
frequency=1,
operator=qg.sigmaz,
alias='first')
spinSys.initialState = {0:0.2, 1:0.8}
freeEvolution = qg.freeEvolution(system=spinSys)
ry = qg.SpinRotation(system='first',
angle=np.pi/2,
rotationAxis = 'y')
ProtocolY = qg.qProtocol(system=spinSys,
steps=[ry.hc, freeEvolution, ry])
spinSys.simulation.addSubSys(spinSys, ProtocolY)
spinSys.totalTime = 8*np.pi
spinSys.stepCount = 200
spinSys.Sweep.createSweep(system='first',
sweepKey='frequency',
sweepList=np.arange(-1,1,0.25))
sy = qg.sigmay()
def compute(sim, args):
freeEvo = qg.expectation(sy,args[0])
yRotPro = qg.expectation(sy, args[1])
sim.qRes.singleResult = 'freeEvo', freeEvo
sim.qRes.singleResult = 'yRotPro', yRotPro
spinSys.simCompute = compute
spinSys.runSimulation()
spinSys.resultsDict['freeEvo']
QuantumToolbox is already simple enough and stable. In parallel to the developments of classes, further additions and improvements are going to be implemented in QuantumToolbox. There are already other functions (for special state creations, eigen-value statistics etc.) in another private repo.
- Complete the migration from gitlab (private server) to github, meaning re-establish CI/CD, pages, wiki, issues, etc.
- Restructuring and writing docstring for QPro, QGate, QSim, and extensions
- Improve the tutorials, further improvements in docstring, and more tests
At this point, we should have a stable version with enough documentation and tests for the version 1.
Further additions have to be with proper tests, tutorials, docstring etc.
- Implementation of SCQubits and QDrive.
- Interfacing to other libraries.