Questions tagged [qutip]

QuTiP stands for Quantum Toolbox in Python. It basically aims to be one-stop shop to carry out any quantum mechanics based calculations in python.

From qutip.org

QuTiP is open-source software for simulating the dynamics of open quantum systems. The QuTiP library depends on the excellent Numpy, Scipy, and Cython numerical packages. In addition, graphical output is provided by Matplotlib. QuTiP aims to provide user-friendly and efficient numerical simulations of a wide variety of Hamiltonians, including those with arbitrary time-dependence, commonly found in a wide range of physics applications such as quantum optics, trapped ions, superconducting circuits, and quantum nanomechanical resonators. QuTiP is freely available for use and/or modification on all major platforms such as Linux, Mac OSX, and Windows*. Being free of any licensing fees, QuTiP is ideal for exploring quantum mechanics and dynamics in the classroom.

63 questions
1
vote
0 answers

Re-implement a QuTip function without the need for the QuTip toolbox

Is there a way to implement this function that is part of QuTip functions ( Quantum Toolbox in Python) without the need for installing QuTip? def destroy(N, offset=0): if not isinstance(N, (int, np.integer)): # raise error if N not integer …
Bekaso
  • 135
  • 5
1
vote
0 answers

Plotting numpy array like qutip quantum object

I like the way that qutip plots quantum objects and I would like to plot my regular arrays like this. Does someone know if they are using any particular library or how to replicate it? Here is an image of what I mean: I want to plot the objects like…
Marc
  • 11
  • 1
1
vote
0 answers

Problem installing qutip on Mac Catalina 10.15.6: "could not build wheels for qutip which use PEP 517"

I am trying to install qutip on a Mac (Catalina 10.15.6). I am using: Python 3.8.3 Anaconda 4.8.4 I create a virtual environment with the command conda create -n qutip python=3.8 anaconda. Here's the error message: g++ -bundle -undefined…
sploiber
  • 621
  • 1
  • 7
  • 17
1
vote
1 answer

How to plot a state vector in Bloch sphere on Qutip?

Very simple. I define a Qutip state object import qutip as qt import numpy as np state = qt.Qobj(1/2*np.array([np.sqrt(3),-1])) # This is my quantum state vector (normalized) What I want is plotting this state in Bloch sphere, but if I just do: b…
Dani
  • 473
  • 3
  • 21
1
vote
1 answer

Two mode Wigner function in python

I have attempted to adjust the qutip Wigner function, for it to process two mode states, specifically for the iterative method. However the size of the array my output gives out is too big and I am unsure of why? That is when I try and calculate…
1
vote
0 answers

How to call time-dependent hamiltonian with qutip/python?

I am trying to implement some codes to describe the coherent control of a system. The problem is that I want to use an hamiltonian of the form: {H}_ij = u(t) * h_ij * exp(omega_ij * t) for the i^th row and j^th column with h_ij = conj(h_ji) and h_ii…
PaulH
  • 19
  • 3
1
vote
1 answer

How to give aplot title while plotting a Bloch sphere using QuTiP

I am plotting a Bloch sphere figure using QuTiP. I want to give it a title. How can I do this? I searched on Google but could not find an answer.
Parveen
  • 29
  • 2
1
vote
1 answer

How to change the line width while plotting over the Bloch sphere

I am using QuTiP for the Bloch sphere plotting in Python. If I have several points on the Bloch sphere then I can connect them with a line using the command b.add_points(pnts,meth='l')| I wanted to know how can I change the linewidth of the line…
Parveen
  • 29
  • 2
1
vote
3 answers

How to reshape a 2d numpy.array or Qobj into dims=[[2,2],[2,2]]

Numpy example below Goal: QuTiP object The goal of my request is to add two quantum state objects of type Qobj (density matrices) as in the following example of a Werner state (to give it some physical meaning). import qutip as q r = .5 state = r *…
strpeter
  • 2,562
  • 3
  • 27
  • 48
1
vote
1 answer

QuTiP TypeError: Incompatible Qobj shapes with tensor product

I am trying to perform this simple operation tensor(hadamard_transform(1), hadamard_transform(1), identity(2), identity(2)) * basis(16,1) but i got Traceback (most recent call last): File "", line 1, in
1
vote
1 answer

Monte Carlo solver in parallel with QuTiP

I'm trying to run some code in QuTiP, but when I run a function in parallel with parfor I am getting an error. results= parfor(func2, range(len(delta))) Error: AssertionError Traceback (most recent call last)
Gbp
  • 21
  • 3
0
votes
1 answer

Dimension mismatch with numpy

I am trying to run a code for the following Hamiltoninan: H = $\sum_{i
Dimitri
  • 109
  • 1
  • 14
0
votes
1 answer

Python 3.10 QuTip: AttributeError: can't set attribute 'format'

I'm trying to setup a simple docker container to make my code portable. Following is the docker container setup that I start with docker run -it --name qutip_portble python:3.10.9-slim bash Once the docker container starts, I install some packages…
F Baig
  • 339
  • 1
  • 4
  • 13
0
votes
0 answers

MemoryError when trying to allocate big numpy array

I have a big matrix which is a QuTiP object. I am trying to run this line of code: ops_numpy = [op.full() for op in m_ops] # convert the QuTiP Qobj to numpy arrays But I am getting the following error: MemoryError: Unable to allocate 16.0 TiB for…
Dimitri
  • 109
  • 1
  • 14
0
votes
0 answers

How can I make Qutip turn a sparse matrix into a Qobject?

I have some operators in matrix form and I’m turning the into Qobjects. Nevertheless, these matrices are sparse. I was wondering if I could give Qutip a scypy sparse matrix, so that when I do things like solving the master equation, the calculations…
JVB
  • 41
  • 3