Stable release | 4.7.0 / February 8, 2022 |
---|---|
Preview release | 5.0.0.dev |
Repository | github |
Written in | Python |
Platform | Cross-platform |
Type | Library |
License | BSD 3-clause |
Website | qutip |
QuTiP, short for the Quantum Toolbox in Python, is an open-source computational physics software library for simulating quantum systems, particularly open quantum systems. [1] [2] QuTiP allows simulation of Hamiltonians with arbitrary time-dependence, allowing simulation of situations of interest in quantum optics, ion trapping, superconducting circuits and quantum nanomechanical resonators. The library includes extensive visualization facilities for content under simulations.
QuTiP's API provides a Python interface and uses Cython to allow run-time compilation and extensions via C and C++. QuTiP is built to work well with popular Python packages NumPy, SciPy, Matplotlib and IPython.
The idea for the QuTip project was conceived in 2010 by PhD student Paul Nation, who was using the quantum optics toolbox for MATLAB in his research. According to Paul Nation, he wanted to create a python package similar to qotoolbox because he "was not a big fan of MATLAB" and then decided to "just write it [him]self". [3] As a postdoctoral fellow, at the RIKEN Institute in Japan, he met Robert Johansson and the two worked together on the package. In contrast to its predecessor qotoolbox, which relies on the proprietary MATLAB environment, it was published in 2012 under an open source license. [2]
The Version created by Nation and Johansson already contained the most important features of the package, but QuTips scope and features are constantly being extended by a large community of contributors. [4] It has grown in popularity amongst physicists, with over 250.000 downloads in the year 2021. [5]
>>> importqutip>>> importnumpyasnp>>> psi=qutip.Qobj([[0.6],[0.8]])# create quantum state from a list>>> psiQuantum object: dims = [[2], [1]], shape = (2, 1), type = ketQobj data =[[0.6] [0.8]]>>> phi=qutip.Qobj(np.array([0.8,-0.6]))# create quantum state from a numpy-array>>> phiQuantum object: dims = [[2], [1]], shape = (2, 1), type = ketQobj data =[[ 0.8] [-0.6]]>>> e0=qutip.basis(2,0)# create a basis vector>>> e0Quantum object: dims = [[2], [1]], shape = (2, 1), type = ketQobj data =[[1.] [0.]]>>> A=qutip.Qobj(np.array([[1,2j],[-2j,1]]))# create quantum operator from numpy array>>> AQuantum object: dims = [[2], [2]], shape = (2, 2), type = oper, isherm = TrueQobj data =[[1.+0.j 0.+2.j] [0.-2.j 1.+0.j]]>>> qutip.sigmay()# some common quantum objects, like pauli matrices, are predefined in the qutip packageQuantum object: dims = [[2], [2]], shape = (2, 2), type = oper, isherm = TrueQobj data =[[0.+0.j 0.-1.j] [0.+1.j 0.+0.j]]
>>> A*qutip.sigmax()+qutip.sigmay()# we can add and multiply quantum objects of compatible shape and dimensionQuantum object: dims = [[2], [2]], shape = (2, 2), type = oper, isherm = FalseQobj data =[[0.+2.j 1.-1.j] [1.+1.j 0.-2.j]]>>> psi.dag()# hermitian conjugateQuantum object: dims = [[1], [2]], shape = (1, 2), type = braQobj data =[[0.6 0.8]]>>> psi.proj()# projector onto a quantum stateQuantum object: dims = [[2], [2]], shape = (2, 2), type = oper, isherm = TrueQobj data =[[0.36 0.48] [0.48 0.64]]>>> A.tr()# trace of operator2.0>>> A.eigenstates()# diagonalize an operator(array([-1., 3.]), array([Quantum object: dims = [[2], [1]], shape = (2, 1), type = ket Qobj data = [[-0.70710678+0.j ] [ 0. -0.70710678j]] , Quantum object: dims = [[2], [1]], shape = (2, 1), type = ket Qobj data = [[-0.70710678+0.j ] [ 0. +0.70710678j]] ], dtype=object))>>> (1j*A).expm()# matrix exponential of an operatorQuantum object: dims = [[2], [2]], shape = (2, 2), type = oper, isherm = FalseQobj data =[[-0.2248451-0.35017549j -0.4912955-0.7651474j ] [ 0.4912955+0.7651474j -0.2248451-0.35017549j]]>>> qutip.tensor(qutip.sigmaz(),qutip.sigmay())# tensor productQuantum object: dims = [[2, 2], [2, 2]], shape = (4, 4), type = oper, isherm = TrueQobj data =[[0.+0.j 0.-1.j 0.+0.j 0.+0.j] [0.+1.j 0.+0.j 0.+0.j 0.+0.j] [0.+0.j 0.+0.j 0.+0.j 0.+1.j] [0.+0.j 0.+0.j 0.-1.j 0.+0.j]]
>>> Hamiltonian=qutip.sigmay()>>> times=np.linspace(0,2,10)>>> result=qutip.sesolve(Hamiltonian,psi,times,[psi.proj(),phi.proj()])# unitary time evolution of a system according to schroedinger equation>>> expectpsi,expectphi=result.expect# expectation values of projectors onto psi and phi >>> plt.figure(dpi=200)>>> plt.plot(times,expectpsi)>>> plt.plot(times,expectphi)>>> plt.legend([r"$\psi$",r"$\phi$"])>>> plt.show()
Simulating a non-unitary time evolution according to the Lindblad Master Equation is possible with the qutip.mesolve
function [6]
Bra–ket notation, also called Dirac notation, is a notation for linear algebra and linear operators on complex vector spaces together with their dual space both in the finite-dimensional and infinite-dimensional case. It is specifically designed to ease the types of calculations that frequently come up in quantum mechanics. Its use in quantum mechanics is quite widespread.
In quantum mechanics, the Hamiltonian of a system is an operator corresponding to the total energy of that system, including both kinetic energy and potential energy. Its spectrum, the system's energy spectrum or its set of energy eigenvalues, is the set of possible outcomes obtainable from a measurement of the system's total energy. Due to its close relation to the energy spectrum and time-evolution of a system, it is of fundamental importance in most formulations of quantum theory.
MATLAB is a proprietary multi-paradigm programming language and numeric computing environment developed by MathWorks. MATLAB allows matrix manipulations, plotting of functions and data, implementation of algorithms, creation of user interfaces, and interfacing with programs written in other languages.
Quantum decoherence is the loss of quantum coherence. Quantum decoherence has been studied to understand how quantum systems convert to systems which can be explained by classical mechanics. Beginning out of attempts to extend the understanding of quantum mechanics, the theory has developed in several directions and experimental studies have confirmed some of the key issues. Quantum computing relies on quantum coherence and is one of the primary practical applications of the concept.
NumPy is a library for the Python programming language, adding support for large, multi-dimensional arrays and matrices, along with a large collection of high-level mathematical functions to operate on these arrays. The predecessor of NumPy, Numeric, was originally created by Jim Hugunin with contributions from several other developers. In 2005, Travis Oliphant created NumPy by incorporating features of the competing Numarray into Numeric, with extensive modifications. NumPy is open-source software and has many contributors. NumPy is a NumFOCUS fiscally sponsored project.
In numerical linear algebra, the Arnoldi iteration is an eigenvalue algorithm and an important example of an iterative method. Arnoldi finds an approximation to the eigenvalues and eigenvectors of general matrices by constructing an orthonormal basis of the Krylov subspace, which makes it particularly useful when dealing with large sparse matrices.
The superposition principle, also known as superposition property, states that, for all linear systems, the net response caused by two or more stimuli is the sum of the responses that would have been caused by each stimulus individually. So that if input A produces response X, and input B produces response Y, then input (A + B) produces response (X + Y).
Quantum programming is the process of designing or assembling sequences of instructions, called quantum circuits, using gates, switches, and operators to manipulate a quantum system for a desired outcome or results of a given experiment. Quantum circuit algorithms can be implemented on integrated circuits, conducted with instrumentation, or written in a programming language for use with a quantum computer or a quantum processor.
In quantum physics and quantum chemistry, an avoided crossing is the phenomenon where two eigenvalues of a Hermitian matrix representing a quantum observable and depending on N continuous real parameters cannot become equal in value ("cross") except on a manifold of N-3 dimensions. The phenomenon is also known as the von Neumann–Wigner theorem. In the case of a diatomic molecule, this means that the eigenvalues cannot cross at all. In the case of a triatomic molecule, this means that the eigenvalues can coincide only at a single point.
The stationary wavelet transform (SWT) is a wavelet transform algorithm designed to overcome the lack of translation-invariance of the discrete wavelet transform (DWT). Translation-invariance is achieved by removing the downsamplers and upsamplers in the DWT and upsampling the filter coefficients by a factor of in the th level of the algorithm. The SWT is an inherently redundant scheme as the output of each level of SWT contains the same number of samples as the input – so for a decomposition of N levels there is a redundancy of N in the wavelet coefficients. This algorithm is more famously known as "algorithme à trous" in French which refers to inserting zeros in the filters. It was introduced by Holschneider et al.
MayaVi is a scientific data visualizer written in Python, which uses VTK and provides a GUI via Tkinter. MayaVi was developed by Prabhu Ramachandran, is free and distributed under the BSD License. It is cross-platform and runs on any platform where both Python and VTK are available. MayaVi is pronounced as a single name, "Ma-ya-vee", meaning "magical" in Sanskrit. The code of MayaVi has nothing in common with that of Autodesk Maya or the Vi text editor.
Matplotlib is a plotting library for the Python programming language and its numerical mathematics extension NumPy. It provides an object-oriented API for embedding plots into applications using general-purpose GUI toolkits like Tkinter, wxPython, Qt, or GTK. There is also a procedural "pylab" interface based on a state machine, designed to closely resemble that of MATLAB, though its use is discouraged. SciPy makes use of Matplotlib.
In physics and mathematics, the Ikeda map is a discrete-time dynamical system given by the complex map
In Itô calculus, the Euler–Maruyama method is a method for the approximate numerical solution of a stochastic differential equation (SDE). It is an extension of the Euler method for ordinary differential equations to stochastic differential equations named after Leonhard Euler and Gisiro Maruyama. The same generalization cannot be done for any arbitrary deterministic method.
In computing, CUDA is a proprietary parallel computing platform and application programming interface (API) that allows software to use certain types of graphics processing units (GPUs) for accelerated general-purpose processing, an approach called general-purpose computing on GPUs (GPGPU). CUDA API and its runtime: The CUDA API is an extension of the C programming language that adds the ability to specify thread-level parallelism in C and also to specify GPU device specific operations. CUDA is a software layer that gives direct access to the GPU's virtual instruction set and parallel computational elements for the execution of compute kernels. In addition to drivers and runtime kernels, the CUDA platform includes compilers, libraries and developer tools to help programmers accelerate their applications.
In computer programming, ellipsis notation is used to denote ranges, an unspecified number of arguments, or a parent directory. Most programming languages require the ellipsis to be written as a series of periods; a single (Unicode) ellipsis character cannot be used.
This is a glossary for the terminology often encountered in undergraduate quantum mechanics courses.
The Lorenz 96 model is a dynamical system formulated by Edward Lorenz in 1996. It is defined as follows. For :
The GEKKO Python package solves large-scale mixed-integer and differential algebraic equations with nonlinear programming solvers. Modes of operation include machine learning, data reconciliation, real-time optimization, dynamic simulation, and nonlinear model predictive control. In addition, the package solves Linear programming (LP), Quadratic programming (QP), Quadratically constrained quadratic program (QCQP), Nonlinear programming (NLP), Mixed integer programming (MIP), and Mixed integer linear programming (MILP). GEKKO is available in Python and installed with pip from PyPI of the Python Software Foundation.
{{cite web}}
: |author=
has generic name (help)