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
26 views

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

...
juhaina's user avatar
  • 11
0 votes
0 answers
27 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 ...
oodNinja's user avatar
0 votes
1 answer
21 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 ...
oodNinja's user avatar
0 votes
0 answers
8 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
  • 111
0 votes
0 answers
15 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
  • 1
1 vote
1 answer
25 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
67 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
54 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
  • 167
1 vote
0 answers
39 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
30 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
102 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
  • 747
0 votes
0 answers
11 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
34 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
  • 161
2 votes
0 answers
57 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
  • 292
0 votes
1 answer
40 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
111 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
109 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
31 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,247
2 votes
1 answer
207 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 ...
R-X Zhao's user avatar
  • 390
3 votes
0 answers
94 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
  • 131
0 votes
0 answers
61 views

Use qiskit calibration data for noisy simulation in Qutip

Is it possible to illustrate an example code in which a quantum circuit is taken as an input and the qiskit backend properties are feed to a custom compiler to perform noisy simulation using QuTip? ...
Monica's user avatar
  • 301
1 vote
1 answer
57 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
205 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
311 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
206 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
92 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
298 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
192 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,247
2 votes
1 answer
115 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
  • 560
1 vote
0 answers
41 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
248 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
152 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
42 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
96 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
4 votes
1 answer
489 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
  • 161
1 vote
1 answer
251 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
95 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
314 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
271 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
  • 695
0 votes
1 answer
231 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
272 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
  • 695
1 vote
0 answers
217 views

Numerical methods for finding an eigen basis of a degenerate Liouvillian

I'm trying to find the steady-state of a master equation, $$\dot{\rho}(t) = \mathcal{L}\rho(t),\tag{1}\label{1}$$ In the form where we vectorise the density matrix and matrixify (??) the Liouvillian ...
Custal's user avatar
  • 11
2 votes
1 answer
303 views

Strange Behaviour of MeSolve, McSolve

I'm using Qutip to plot some basic two level dynamics using hamiltonians with a temporal envelope defined as the sum of two error functions, designed to make it more representative of experimental ...
Rick Bonne's user avatar
1 vote
1 answer
787 views

Can't plot points on the Bloch sphere (QuTip)

I have the really odd problem when it comes to plotting Bloch spheres using QuTip. Plotting state vectors works perfectly fine e.g. ...
Turbotanten's user avatar
3 votes
0 answers
114 views

How to define initial state $\rvert \Psi(0) \rangle \equiv \rvert 1, -1 \rangle \otimes \rvert 0 \rangle_{\text{cav}} $ of a system in QuTiP?

Say, we have a $\require{mhchem}\ce{^87Rb}$ atom having an electric dipole transition on the $D_{1}$ line and we have two hyperfine ground states, one on $F = 1$ and one on $F = 2$ level. So, we take ...
Mun's user avatar
  • 31
2 votes
0 answers
44 views

Is the analytical solution right?

This question requires the knowledge of GRAPE. More info can be found here and in this short presentation. In the following jupyter notebook is the analytical solution as in this image right? Because ...
Tejas Shetty's user avatar
1 vote
0 answers
56 views

Different values of similar functions

This question requires the knowledge of GRAPE. More info can be found here and in this short presentation. In the following jupyter notebook the result of this line _overlap(result.U_f, ...
Tejas Shetty's user avatar
2 votes
0 answers
48 views

What is the need of convolution here?

This jupyter notebook implements GRAPE for the synthesisizing a CNOT gate. More info can be found here and in this short presentation. In the following jupyter notebook at In[8] 1 the starting ...
Tejas Shetty's user avatar
2 votes
0 answers
107 views

Modifying GRAPE for open quantum systems

This question requires the knowledge of GRAPE. More info can be found here and in this short presentation. I have tried to modify the grape_unitary() function in grape.py also to accommodate open ...
Tejas Shetty's user avatar
3 votes
0 answers
81 views

How to add states on the Bloch sphere from a master equation?

Can you please help me to find an answer to this question: I am using qutip for the study of quantum systems. suppose I have calculated the solution of the master equation using the ...
Jack's user avatar
  • 71