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
0
votes
0 answers

ModuleNotFoundError: No module named 'tvtk.custom.light

I'm trying to run simple python code. import qutip b = qutip.Bloch() b3d = qutip.Bloch3d() b.make_sphere() but have Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway. Traceback (most recent…
Moorhuhn
  • 1
  • 2
0
votes
1 answer

Moving states inside a tensor (QuTip)

I have a qutip tensor as follows: psi = constants*tensor(fock(N,0),fock(N,1),fock(N,2)) I need a way to swap the positions of the third state with the second state such that the structure becomes: psi = (some operation on psi) psi =…
Stal
  • 1
  • 1
0
votes
1 answer

Multi-processing a for loop, target's argument needs to be a list

I'm trying to use multiprocessing to split a for loop over multiple processes. Thus speeding up a QuTiP's library solver, here's my target function: def solve_entropy(t): # Parameters k = 0.5 n = 2 N = 5 r = 1.0 alpha = 2.0 …
0
votes
1 answer

QuTip: How to multiply symbol with matrix

I am trying to multiply a symbol with a matrix which is defined by QuTip quantum object, but I got this error: TypeError: Incompatible object for multiplication I used: from qutip import * import sympy as sp w0 =…
0
votes
1 answer

Is there a way to install Qutip on apple m1 macbook?

I bought a new apple m1 macbook pro. I installed python and other basic packages like numpy, scikit-learn and matplotlib though miniforge. When I tried installing qutip through conda it shows no such package exists on the osx-arm64 channel. Is there…
0
votes
1 answer

Subplots with QuTip Bloch sphere

I would like to know if is it possible to plot a figure with two subplots, in which one is a regular 2D plot and the other one a Bloch sphere.
Douglas A
  • 1
  • 1
0
votes
0 answers

CVXPY can't maximize function

I'm trying to maximize the value of a function based on qutip to find the hermitian positive semidefinite matrix of trace equal 1 that maximized this function, but CVXPY always returns the value 0.0 and a diagonal matrix, do I have to do something…
Nillmer
  • 159
  • 1
  • 7
0
votes
2 answers

Is there a way of specifying which argument QuTiP's parallel_map should iterate over?

QuTiP's function parallel_map provides the possibility to compute the value of a given function for several values of its argument in parallel. All the examples show cases where the first positional argument is varied, like the following: def…
A. P.
  • 113
  • 3
0
votes
1 answer

How to profile a script which uses python's multiprocessing

I have a script file which uses the function parallel_map. ( source code of qutip.parallel.parallel_map) from a package QuTiP . As one would see on clicking the source code for the function, it uses the multiprocess module of python. I looked at…
Tejas Shetty
  • 685
  • 6
  • 30
0
votes
1 answer

density matrix elements from qutip's mesolve as a function of time

I am using qutip's mesolve for the open system dynamics of a system. I need to save all the density matrix elements as a function of time. mesolve gives the options of returning the expectation value of any given operator only. I am wondering if…
0
votes
0 answers

How to use non-atomic functions on cvxpy variable?

Consider the scenario where I define a CVXPY variable, a 4x4 semidefinite matrix, as below x = cvxpy.Semidef(4) If I want to write a constraint involving the trace of this, it seems I must use the atomic function cvxpy.atoms.affine.trace.trace(x) I…
user1936752
  • 756
  • 1
  • 9
  • 25
0
votes
1 answer

QuTiP: Resolving inconsistent Qobj shapes

This was previously explored in QuTiP TypeError: Incompatible Qobj shapes with tensor product but I'm not sure about the answer there. Suppose I define A = tensor(qeye(2), qeye(2)) and B = qeye(4), I cannot multiply them because the object shapes…
user1936752
  • 756
  • 1
  • 9
  • 25
0
votes
1 answer

Jaynes Cummigs model and Qutip

I have found in Qutip manual simple program for visualisation a periodic behaviour of JCM. My code is from qutip import * from pylab import * import matplotlib.pyplot as plt import numpy as…
marek
  • 11
0
votes
1 answer

on qutip is it possible to transform a state to vector?

If I build a state from qutip import Bloch,basis state=(basis(2,0)+(0+1j)*basis(2,1)).unit() can I trasform it in a bloch-sphere vector? In this form: state -> vec=np.array
A.A.
  • 1
  • 3
0
votes
0 answers

Apply a gate to a qubit with qutip?

With qutip, I'd like to simulate an error correcting code, so I'd like to manipulate qubit with specific gates. Here is the part of my code : def physicalToLogical(): U=qt.cnot(N=5,control=0,target=1) V=qt.cnot(N=5,control=1,target=2) …
leila
  • 1
  • 3