Skip to main content

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

quabtum fisher between two discrete probability distributions

I will be thankful in advance if you help me find the problem. between two discrete probability distributions D(p||q)=sum_k(p_k log(p_k/q_k) ) or D(p(t+ delta t)||p(t))=sum_k( (d/ dt p_k) /p_k )(delta ...
user30637's user avatar
1 vote
0 answers
14 views

QuTiP tutorial: How to derive the analytical solution to the expectation value of an operator for a system evolving by Lindbladian

I am following the simple tutorial below: (https://nbviewer.org/urls/qutip.org/qutip-tutorials/tutorials-v5/time-evolution/003_qubit-dynamics.ipynb) In this they look at single qubit with Hamiltonian $...
CauchySchwarzMan's user avatar
0 votes
0 answers
13 views

How to plot a histogram of a pulse-level quantum circuit simulation in QuTiP?

The qutip_qip package allows for pulse-level quantum circuit simulation, compared to for instance the gate-level quantum circuit simulation found in Qiskit (to understand the difference, scroll to the ...
playdis's user avatar
  • 101
0 votes
0 answers
14 views

Particle number expectation value in QuTip

I am learning now to use QuTiP by going through their documentation site. I am trying to understand what does the argument - particle number expectation value in thermal density matrix do? How does it ...
CuriousMind's user avatar
1 vote
2 answers
32 views

What is the ordering of qubit basis in QuTip?

Suppose I instantiate a state with 4 qubits in their $|0\rangle$ state with qutip: from qutip import basis, tensor state = tensor(*[basis(2,0)]*4) The output will ...
Ícaro Lorran's user avatar
3 votes
2 answers
318 views

Python package for quantum computations based on symbolic variables

I am searching for a quantum package in Python that can enable me to calculate, for example, a density matrix symbolically and display the results in variable form rather than numerically. I am aware ...
physicino's user avatar
  • 111
2 votes
0 answers
74 views

Effective Hamiltonian using Schrieffer-Wolff transformation and QuTiP

I would like to study the effects of non-computational levels of two coupled qubits by a resonator using QuTiP. The idea is to consider the following Hamiltonians Qubits Hamiltonian $$ H_{q_i} = \...
Frostman's user avatar
2 votes
1 answer
82 views

QuTiP ptrace function results do not recreate original composite system

I have a qutip density matrix fullsystem for a system composed of two quantum systems with ...
Bebotron's user avatar
  • 425
0 votes
1 answer
145 views

Initialize circuit by density matrix (i.e. mixed state) by Cirq, Qiskit, QuTip

I want to do a simulation involving: mid-circuit measurement (i.e. based on the measurement result of some qubits to append further gates on other qubits; e.g., Pauli error correction in entanglement ...
Showhands's user avatar
1 vote
0 answers
31 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$...
hendlim's user avatar
  • 11
1 vote
0 answers
32 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
45 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
27 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
38 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
  • 348
2 votes
0 answers
72 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
138 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
135 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
231 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
11 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
38 views

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

...
juhaina's user avatar
  • 11
0 votes
1 answer
116 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
36 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
45 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
30 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
207 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
150 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
  • 187
1 vote
0 answers
63 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
57 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
373 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
  • 911
0 votes
1 answer
46 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
52 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
108 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
  • 327
0 votes
1 answer
110 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
233 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
190 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
53 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,357
2 votes
1 answer
508 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
202 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
89 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
409 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
406 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
451 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
145 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
436 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
459 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,357
2 votes
1 answer
178 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
  • 626
1 vote
0 answers
62 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
397 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
275 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
48 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