Questions tagged [qutip]

For questions about code which makes some use of QuTiP (Quantum Toolbox in Python). It is an open-source software library for simulating the dynamics of closed and open quantum systems. Please don't use the programming tag unless you absolutely think it is related to your question. Basically, questions which involve calculating physical quantities, by doing numerical computations on a computer are suited for this tag.

Filter by
Sorted by
Tagged with
1 vote
0 answers
14 views

Zeeman eigenstates and QuTiP Bloch sphere

One Hamiltonian corresponding to a qubit is the Zeeman Hamiltonian: $$ \hat{H}_\mathrm{Zeeman} = \frac{\hbar\omega_0}{2}\hat{\sigma_z}$$ The eigenstate corresponding to the eigenvaue $+\hbar\omega_0/2$...
Len's user avatar
  • 11
1 vote
0 answers
14 views

Is it possible to find out the number of timesteps taken by the mesolve/sesolve method in QuTip?

I am simulating a Quantum System in QuTip using qutip.sesolve. As far as I understand it, the solver propagates the state into the future using time steps of ...
Mausklick99's user avatar
1 vote
0 answers
34 views

How to use parameters in QuTiP?

I am working with QuTiP to do some calculations based on my proposed Hamiltonian. The Hamiltonian of my system has some coupling constants that show the strength of coupling between matter and light(...
Navid Elyasi's user avatar
1 vote
0 answers
17 views

Qutip - Use of Create vs Fock state functions

I'd like to understand the physical difference between the states created using the following two means, i.e. state1 and state2: ...
Amazon Forrest's user avatar
2 votes
0 answers
34 views

Is there a Qutip equivalent of "expand_operator" for superoperators?

I want to calculate a superoperator for a small noisy subsystem consisting of $k$ qubits, and expand it to $n > k$ qubits, where the remaining $n-k$ qubits are not subject to any noise. ...
JoJo P's user avatar
  • 179
2 votes
0 answers
33 views

Weird behavior when simulating vacuum Rabi oscillation on QuTip

I've been playing around with vacuum Rabi oscillation on QuTip and found an odd behavior. My Hamiltonian is as follows: $$ H=\omega_n n^\dagger n + \omega_c c^\dagger c -6K(n+n^\dagger)^4 - g(n^\...
wannaqc's user avatar
  • 21
2 votes
0 answers
75 views

Density matrix and State vector give different result in mesolve in QuTiP

qutip mesolve gives me different population evolve depending on that initial state is state vector or density matrix. And, in some situation, it gives me negative population. It doesn't make sense... ...
eechiki's user avatar
  • 21
1 vote
1 answer
36 views

Calculate average fidelity of QobjEvo

I am using QuTip to simulate a quantum gate, and I want to calculate the average fidelity of the gate. I have the Hamiltonian, the interaction time, and Liouvillian modeling the decoherence. Is there ...
user26199's user avatar
0 votes
1 answer
96 views

Eigenstates differ between Qutip and Quspin

I am currently trying to adapt a code working well with Qutip to Quspin to optimize it. I managed to create what I believe are the same systems with both libraries, but I don't get the same ...
sebastien finor's user avatar
1 vote
0 answers
9 views

From what distribution is QuTip's rand_herm sampled from?

I am trying to figure out how QuTip samples Hamiltonians using its rand_herm function. It seems to use SciPy's sparse.rand ...
Silly Goose's user avatar
1 vote
0 answers
37 views

anyone know how to solve the error plz? [closed]

...
juhaina's user avatar
  • 11
0 votes
0 answers
92 views

QuTip for time-dependent driven harmonic oscillator without damping?

Is it possible to find the dynamics of a time-dependent system? For example, a harmonic oscillator that is driven by an external time-dependent drive? Does QuTip have a way to solve the Schrodinger ...
SlothForeva's user avatar
0 votes
1 answer
68 views

QuTip newbie need to understand .reshape()

I am a quantum physics researcher but till now I have been using Mathematica symbolic language for solving quantum problems. I wanted to develop numerical skills as well so I just started to learn ...
SlothForeva's user avatar
1 vote
0 answers
19 views

lindblad_dissipator function appears to use unconventional convention

In the QUTIP documentation for the lindblad_dissipator(a,b) function we see that some of the $a$'s have daggers and others do not (link to documentation https://...
Dast's user avatar
  • 121
1 vote
0 answers
28 views

How to check the jmat operators on Qutip?

I'm trying to reproduce this Qobject form Qutip https://qutip.org/docs/latest/guide/guide-tensor.html#a-two-level-system-coupled-to-a-cavity-the-jaynes-cummings-model but, I'm using the Jmat ...
PCat27's user avatar
  • 11
1 vote
1 answer
28 views

Operating Hamiltonian on discrete variable state [closed]

I have a hamiltonian consisting of combinations of a and a(dragger). i need to act this on discrete variable state like |0,0,0,1> and so on. Is there any library to do these kinds of operations?
INDRANIL MAITI's user avatar
2 votes
1 answer
120 views

Simulate dual Lindblad master equations in the Heisenberg picture in QuTiP

In QuTiP, it is possible to solve Lindblad master equations describing the time evolution of an open quantum system $\rho$: $$ \dot{\rho}(t)=-\frac{i}{\hbar}[H(t), \rho(t)]+\sum_n \frac{1}{2}\left[2 ...
francois-marie's user avatar
1 vote
1 answer
106 views

GRAPE with Python?

I want to do some quick GRAPE calculations in Python. The qutip implementation is handy but I can't modify the fidelity function. However, I need to use my own fidelity function to evaluate fidelity. ...
Will Yang's user avatar
  • 177
1 vote
0 answers
54 views

How to implement the Mach Zehnder Interferometer in Qutip?

I was trying to implement the Mach-Zehnder Interferometer with a phase shifter in Qutip but I couldn't nail it. I just want to give two number states as input and at the end see the probability ...
can kanaroğlu's user avatar
1 vote
1 answer
40 views

Can superoperators work in Monte Carlo solver in QuTip?

The Monte Carlo solver works with kets instead of density matrices. And it doesn't allow a superoperator (which acts on density matrices or superkets) as a collapse operator. Since my master equation ...
Jiakai Wang's user avatar
1 vote
2 answers
208 views

Generating and executing large Pauli rotations in Python

I am interested in generating collective Pauli X, Y and Z spin operators for the purpose of rotating $2^N$ dimensional state vectors $|\psi\rangle$ (in the computational basis) for a quantum protocol. ...
John Doe's user avatar
  • 767
0 votes
1 answer
27 views

Erroneous position squared expectation value with Fock states in qutip

Trying the following code in qutip rho = basis(6, 5) * basis(6, 5).dag() x = (create(6) + destroy(6)) / np.sqrt(2) Now, ...
sbp's user avatar
  • 113
1 vote
0 answers
44 views

Calculate an Qobjevo operator of qutip

I define a time-dependent operator in the form of an Qobjevo and pass it to sesolve() to solve for Schrodinger's equation. Below ...
Neo's user avatar
  • 171
2 votes
0 answers
77 views

QuTiP, Continuous variable systems: Calculating the expectation value of an operator from the covariance matrix

Let's say I have the covariance matrix for a 4-mode system, $\sigma$, which is an $8 \times 8 $ matrix (the first moments are zero). I want to calculate the expectation value for an operator, for ...
Bard's user avatar
  • 325
0 votes
1 answer
70 views

Invert colors in qutip plot_wigner function

In QuTiP, it is possible to plot Wigner functions with positive (shown in blue) and negative (shown in red) values. For example, the following code displays the Wigner function of a Schrodinger cat ...
francois-marie's user avatar
0 votes
1 answer
170 views

How to compute projective probabilities of a given measurement outcome using Stim?

I am looking to calculate the projective probabilities for each measurement outcome in a Clifford circuit and then output its corresponding tableau state. I am performing the measurement in the Z ...
user21113's user avatar
1 vote
0 answers
147 views

Qutip: Mesolve gives different and weird results with different fock state numbers

I have been trying to simulate the average number of particles at 3 sites of coupled harmonic oscillators. I have used the code from the below tutorial: https://notebook.community/ajgpitch/qutip-...
anand_quanta's user avatar
1 vote
0 answers
41 views

How to read random quantum channels with QuTiP

This is somewhat a simple question. If we generate random channels using QuTiP, say that we generate a channel that acts on a 3-dim space using rand_super_bcsz(3) ...
R.W's user avatar
  • 2,327
2 votes
1 answer
369 views

Why does qutip run without errors, but cannot output a Bloch sphere graph?

This is the official demo(https://nbviewer.ipython.org/github/qutip/qutip-notebooks/blob/master/examples/visualization-exposition.ipynb). But after I run it, there is no error, but I can't output the ...
Ren-Xin Zhao's user avatar
4 votes
0 answers
147 views

How to calculate Quantum Discord for two qubit system using Qutip?

Quantum discord of a bipartite system can be determined as: $${D_A}({\rho _{AB}}) = I({\rho _{AB}}) - {J_A}({\rho _{AB}}),$$ The subscript of $A$ denotes that the measurement has been performed on the ...
Paranoid's user avatar
  • 141
1 vote
1 answer
81 views

What does the parameter "targets" in gates stand for in QuTiP?

As far as I understand, "targets" is a basis (of the qubits system) to which gate is applied. For instance, Hadamard gate takes basis of a single qubit system, and CNOT gate takes a basis ...
levgor's user avatar
  • 11
1 vote
1 answer
298 views

How do I implement $SU(2)$ rotation on the Bloch Sphere unsing qutip?

Using qutip I am trying to implement a qubit rotation according the formula $(25)$ provided in this document "Lecture notes: Qubit representations and ...
Eldar Sultanow's user avatar
2 votes
1 answer
364 views

How do I stepwise rotate a qubit on a Bloch sphere using $SO(3)$ and $SU(2)$ group?

Let us first introduce two fundamental functions for coordinate transformations: ...
Eldar Sultanow's user avatar
1 vote
1 answer
328 views

Qutip mesolve gives different results depending on number of points in time list

I get different results from mesolve when I change the number points in tlist. The Hamiltonian and initial vector are the same. The results from mesolve are also incorrect (however, essolve gives me ...
jasmine1323's user avatar
1 vote
0 answers
118 views

qutip.sesolve and qutip.optimize_pulse_unitary produce different results

I'm currently trying out some things with qutip in the field of optimal control (state-to-state transfer) and have some trouble to reproduce my results from the optimization process with sesolve. My ...
SphericalApproximator's user avatar
1 vote
1 answer
371 views

QuTIP tensor products

I am referring to the QuTIP package https://qutip.org/ To describe a system of 3 atoms in the ground state, I can crate the wavefunction: tensor( basis(2,0), basis(2,0), basis(2,0) ) Now suppose that ...
Halo's user avatar
  • 13
1 vote
1 answer
300 views

Acting with a superoperator to states in qutip

I can generate a random superoperator in qutip using the command rand_super(N) $\mathcal{E}$ where I only need to inser the dimension of the superoperator is acting on, denoted as N. The same ...
R.W's user avatar
  • 2,327
2 votes
1 answer
151 views

Qutip choi_to_kraus and to_kraus functions are not returning list of Kraus representation

I am trying to find my kraus representation from my process matrix. Suppose that, I have these process matrix: ...
quest's user avatar
  • 614
1 vote
0 answers
50 views

QuTip - Is there a way to simulate more than one inital state in one simulation?

I'm trying to use QuTip for a simulation of a qutrit system and I want to see how my system evolves under different initial states. Is there a way to do it using QuTip without running the simulation ...
user19367's user avatar
1 vote
1 answer
312 views

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 ...
Rana M.Al-Marshedy's user avatar
1 vote
0 answers
211 views

QuTiP VS RK45: Which one gives the correct results for time-dependent systems?

I am writing a code for a quantum thermal machine which includes both coherent and dissipative time evolutions in its different stages of operation. However, evolving the system with "mesolve&...
Ali Pedram's user avatar
1 vote
0 answers
44 views

How can extract reduced dynamics of a bipartite system from unitary evolution in quite

Let us assume that I have a bipartite system $A\otimes B$ and an initial product state undergoing some evolution $H^{AB} = H^A+H^B+V^{AB}$, which is time independent. I want to simulate the reduced ...
raskolnikov's user avatar
2 votes
1 answer
131 views

How to solve non-"cross-damping off" Linblad equation in QuTiP?

As I understand from the official QuTiP guidlines, it is only capable of solving "cross-damping off" Master Equation in form: $\dot{\rho(t)} = -\dfrac{i}{\hbar}[H(t),\rho(t)] + \sum\limits_n\...
mesolver's user avatar
5 votes
1 answer
677 views

Python shorthand for tensor product (Kronecker product)

When using numpy or tensorflow in Python, we can simply write C = A @ B for matrix ...
Neo's user avatar
  • 171
1 vote
1 answer
345 views

Writing the Jaynes-Cumming model in QuTip

I want to write the Jaynes-Cumming Hamiltonian in QuTip. $$H = \hbar \omega_{C} a^\dagger a + \frac12 \hbar \omega_{a} \sigma_{z} + \hbar \lambda (\sigma_{+} a + \sigma_{-} a^\dagger)$$ I assume $\...
sbp's user avatar
  • 113
4 votes
1 answer
109 views

Trying to simulate Weak Value Amplification using QuTiP

Weak Value Amplification is a procedure in which one consider a bipartite Hamiltonian of the form $H = g A \otimes B$, where $A$ is called system, $B$ is called meter and $g$ is the extremely small ...
FearlessVirgo's user avatar
2 votes
1 answer
400 views

Defining dimension of an operator in qutip

My main question: Can someone please explain to me how the list of array is used to define the dimension in qutip? Context: If I have my density operator ...
Gem's user avatar
  • 79
-1 votes
1 answer
329 views

Find orthogonal state for random 7 qubit state

I have a system that generates a random 7 qubit state and I need a method to always find the orthogonal state. I'm currently using python and qutip for this, representing this 7 qubit state by a 128-...
Nillmer's user avatar
  • 715
0 votes
1 answer
285 views

Using entropy_mutual function in QuTiP

I am trying to calculate mutual entropies using QuTiP, but I am being unsuccessful so far. More specifically, I consider a 2^n x 2^n matrix representing the density operator of a n-qubit bipartite ...
EmFed's user avatar
  • 3
2 votes
2 answers
294 views

Is there quantum error correction code package for python

I'm working on the development of a new quantum error correction protocol that tries to maximize the coherence of the qubit. Is there a package for python, similar to qutip, that could help me in this ...
Nillmer's user avatar
  • 715