# 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.

64 questions
Filter by
Sorted by
Tagged with
1 vote
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$...
1 vote
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 ...
1 vote
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(...
1 vote
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: ...
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. ...
33 views

1 vote
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. ...
1 vote
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 ...
1 vote
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 ...
1 vote
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. ...
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, ...
1 vote
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 ...
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 ...
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 ...
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 ...
1 vote
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-...
1 vote
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) ...
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 ...
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 ...
1 vote
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 ...
1 vote
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 ...
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: ...
1 vote
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 ...
1 vote
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 ...
1 vote
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 ...
1 vote
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 ...
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: ...
1 vote
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 ...
1 vote
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 ...
1 vote
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&...
1 vote
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 ...
131 views

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 ...
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 ...
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-...