Quantum Toolbox (quanguru.QuantumToolbox)#

QuantumToolbox consists purely of Python functions (no other objects) that create and/or use matrices. Bold parts of the previous sentence highlight two main ideas of QuantumToolbox.

It only contains Python functions to make it familiar with a broader audience, so that anyone without any interest in object-oriented programming can still contribute to QuantumToolbox, and the second idea is to use scipy sparse (csc matrix) as default. Matrix creations should be sparse as default and return .A (or .toarray()) of the created sparse if sparse=False. Any function manipulating matrices should be designed to be independent of sparse or array, if possible.

Modules#

linearAlgebra

Contains some basic linear algebra methods for scipy.sparse and np.ndarray types.

states

Contains methods to create states, such as ket, bra, densityMatrix, superpositions, etc.

operators

Contains methods to functions to create and/or manipulate quantum operators

evolution

Contains functions to create Unitary and open-system super-operators.

functions

Contains functions to calculate some basic quantities, such as expectations, fidelities, entropy etc.

Hamiltonians

Contains functions to create some standard Hamiltonians.

spinRotations

Contains functions to create qubit rotation operators.

basicGates

Contains some basic single and two qubit gates.

quasiProbabilities

Contains functions to calculate quasi-probability distributions (adapted from qutip).

eigenVecVal

Contains functions to calculate eigen-vector/value statistics in various cases.

rmtDistributions

Contains probability density functions (PDF) from Random Matrix Theory (RMT).

IPR

Contains functions to calculate delocalisation measure (Inverse participation ratio, shortly IPR) in various cases.

thermodynamics

Contains methods to calculate certain quantities used in thermal states, open systems, and quantum thermodynamics.

_helpers

Contains some helper functions.

customTypes

Contains custom types (Union etc) used in type hints of QuantumToolbox.