1
#This file is part of QuTIP.
3
# QuTIP is free software: you can redistribute it and/or modify
4
# it under the terms of the GNU General Public License as published by
5
# the Free Software Foundation, either version 3 of the License, or
6
# (at your option) any later version.
8
# QuTIP is distributed in the hope that it will be useful,
9
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
# GNU General Public License for more details.
13
# You should have received a copy of the GNU General Public License
14
# along with QuTIP. If not, see <http://www.gnu.org/licenses/>.
16
# Copyright (C) 2011, Paul D. Nation & Robert J. Johansson
18
###########################################################################
20
import multiprocessing
23
# @mainpage QuTiP: Quantum Toolbox in Python
25
# Software package for simulation of quantum
26
# systems using python, scipy and numpy (derived from the Quantum Optics toolbox
29
# These pages contains automatically generated API documentation.
32
#automatically set number of threads used by MKL
33
os.environ['MKL_NUM_THREADS']=str(multiprocessing.cpu_count())
36
# default, use graphics (unless QUTIP_GRPAHICS is already set)
38
if not os.environ.has_key('QUTIP_GRAPHICS'):
39
os.environ['QUTIP_GRAPHICS']="YES"
41
if sys.platform=='linux2':
42
if not os.environ.has_key('DISPLAY'):
43
# in X, no graphics if DISPLAY isn't set
44
os.environ['QUTIP_GRAPHICS']="NO"
47
import scipy.linalg as la
48
import scipy.sparse as sp
49
from qobj import qobj,shape,dims,dag,trans,isherm,sp_expm
57
from list2ind import *
59
from operators import *
76
from mcwf_evolve import *
78
from wf_ode_evolve import *
83
if os.environ['QUTIP_GRAPHICS'] == "YES":
84
from sphereplot import *