QuTip is an open-source software based on Python for simulating the dynamics of open quantum systems.
Since QuTip is developed on Unix platforms, it is tricky to get it installed correctly on a windows platform. Below I describe the steps I followed to install QuTip on a Windows 10 64-bit machine.
Prerequisites: Microsoft Visual Studio 2015 is required to be installed on the system. (It provides the vcvarsall.bat file).
Step 1: Install Anaconda 2019.10 for all users. I have tested the 64-bit version only. The installer can be found here.
Step 2: Open cmd.exe (with administrative privilege) and execute the following command:
> pip install qutip
However, in my case, the installation failed with the following message:
Step 3: In order to install PlatformSDK, open Microsoft Visual Studio 2015 and try creating a new "Visual C++" project as shown below.
The dialog box will ask you to install Universal Platform Tools. Double click on that option to start the installation.
The installation might take a while and once done repeat step 2. In my case, the qutip installed successfully.
Step 5: After a successful installation (probably with tons of warnings) we would like to check versions of installed packages. To check that, type "python" in cmd to open python environment and then execute the following:
>>> from qutip import *
>>> about()
Following is a screenshot (taken on November 29, 2019).
Since QuTip is developed on Unix platforms, it is tricky to get it installed correctly on a windows platform. Below I describe the steps I followed to install QuTip on a Windows 10 64-bit machine.
Prerequisites: Microsoft Visual Studio 2015 or Microsoft Visual C++ compiler for Python 2.7 is required to be installed on the system. (It provides the vcvarsall.bat file).
Step 1: Install Anaconda2-4.1.0 for all users. I found both the 32-bit and 64-bit versions to be working. The installer can be found here. (I didn't have success with Anaconda3).
Step 2: Open cmd.exe (with administrative privilege) and execute the following command:
> conda install mingw libpython
Step 3: Modify the file C:/Anaconda2/Lib/distutils/distutils.cfg (or create the file if it does not already exists) to have the following text:
[build]
compiler = mingw32
[build_ext]
compiler = mingw32
Step 4: Download the latest version of qutip package from github and run the following command in cmd (with administrative privilege):
> python C:\qutip-master\setup.py install
(where you should replace "C:\qutip-master" with your qutip package location)
There is an alternative way to install qutip using the following command which directly downloads the latest release from the official website.
> python -m pip install qutip
("python -m pip install qutip --install-option=--with-f90mc" didn't work for me)
Step 5: After a successful installation (probably with tons of warnings) we would like to check versions of installed packages. To check that type "python" in cmd to open python environment and then execute the following:
>>> from qutip import *
>>> about()
Following is a screenshot when I used the latest (Jul 6, 2016) qutip package from github.
Following is a screenshot when I used the qutip package from qutip.org.
Step 6: In order to verify the installation qutip has some built-in tests which can be run using the following command:
>>> import qutip.testing as qt
>>> qt.run()
In case of the latest package from github the results were positive.
I didn't have full success in case of the package from official release.
The following cases generated error in my case.
-----------------------------------------------------------------------------------------
ERROR: correlation: comparing me and mc for driven oscillator in ground state
ERROR: Monte-carlo: Time-dependent H (str format)
ERROR: mesolve: time-dependence as string list
FAIL: Superoperator: Randomized comparison of standard and reference
-----------------------------------------------------------------------------------------
Thus, it is recommended to use the github package for better chance of success.
> python -m pip install PackageName
(from cmd)
> python -m pip show PackageName
(from cmd)
>>> import PackageName
>>> print(PackageName.__version__)
(from python environment)
> pip freeze
(from cmd)
>>> help(command)
> python --version
(from cmd)
> python -m pip install --upgrade PackageName
(from cmd)
> python -m pip uninstall PackageName
(from cmd)