Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

General operator instead of ladder opertors #16

Closed
oameye opened this issue Mar 19, 2023 · 5 comments
Closed

General operator instead of ladder opertors #16

oameye opened this issue Mar 19, 2023 · 5 comments

Comments

@oameye
Copy link

oameye commented Mar 19, 2023

I am trying to compute the Lindbladian for a quantum system using the QuantumAlegbra.jl package. The calculation requires me to compute commutators between the density matrix/operator and ladder operators. However, the package currently only provides the functionality to describe ladder operators, and not to compute commutators with them and the density matrix/operator.

I would be willing to help implement this functionality if it is not too difficult. Please let me know if this is something that can be added to the package.

@jfeist
Copy link
Owner

jfeist commented Mar 25, 2023

In principle, it would be possible to add a general operator as an abstract object that does not commute with anything else. However, this would probably require some changes in the logic (e.g., it would have to be ignored when considering whether an expression is normal ordered). Could you explain the use case in a bit more detail? If you "just" want to simplify the Lindbladian A ρ A^† - 1/2 {A^† A, ρ} for some given jump operator A that is a combination of several operators, you could just simplify A and A^† A separately.

@oameye
Copy link
Author

oameye commented Mar 28, 2023

My end goal is to compute the e.o.m. of the expectation value of the ladder operators of an open quantum system.

Suppose we have the system given by time evolution $\frac{d \rho}{dt}=-\frac{i}{\hbar}[H, \rho]+L\rho$. Here the Hamiltonian $H$ could be a simple driven harmonic oscillator given in the ladder operators $H=\Delta a^\dagger a+F(a^\dagger +a)$ which than dissipates linearly with the bath with the dissapator $L\rho =\kappa (2 a \rho a^\dagger - a^\dagger a \rho - \rho a^\dagger a)$.

To compute the e.o.m. of ladder operator we have to compute trace $\mathrm{Tr}(b\frac{d \rho}{dt})=\frac{d\mathrm{Tr}(b \rho)}{dt}=\frac{d\langle b\rangle}{dt}$. Using the cyclicity of the trace, the e.o.m. simplify.

So just implementing the concept of an general operator as an abstract object that does not commute with anything else will be enough. I guess the challenge will be to implement the simplification of the trace.

I managed to implement what I need in Mathematica with the NCAlgebra package.

@jfeist
Copy link
Owner

jfeist commented Apr 8, 2023

Ok thanks. I assumed that this might be the end goal. Calculating these equations of motion does not actually require definition of a general or density matrix operator, as you can directly obtain them from the equations of motion in the Heisenberg picture (see, e.g., https://en.wikipedia.org/wiki/Lindbladian#Heisenberg_picture). You should be able to evaluate these directly with QuantumAlgebra, but I might add a routine for this as it comes up many times. I'll keep the issue open until I've done so.

@jfeist
Copy link
Owner

jfeist commented Apr 17, 2023

The main branch (install with ]add QuantumAlgebra#main) now contains a function heisenberg_eom(A, H, Ls) that you can use to obtain the equations of motion for any operator A under Lindblad evolution with Hamiltonian H and dissipators defined by the Ls tuple. Ls must be a tuple of tuples, where each tuple can have several forms depending on the type of dissipators you want:

  • (O,) gives a Lindblad dissipator with operator O.
  • (Pr"k",O) gives a Lindblad dissipator with rate Pr"k" and operator O (i.e., corresponds to k (O ρ O^† - 1/2 {O^† O,ρ})). (Note that since formal square roots are not supported, we cannot just do c = sqrt(Pr"k") O and use that in the previous version).
  • ((:i,:j),Pr"k_i,j",a(:i,:j)) gives a formal sum over dissipators, ∑ᵢⱼ kᵢⱼ (aᵢⱼ ρ aᵢⱼ^† - 1/2 {aᵢⱼ^† aᵢⱼ,ρ}).
  • In any of these, the operator can also be a tuple of two operators if your Lindblad dissipator is not in diagonal form. E.g., (Pr"k",(a(),b()) corresponds to k/2 (a ρ b^† + b ρ a^† - 1/2 {b^† a,ρ} - 1/2 {a^† b,ρ}) (note that this automatically symmetrizes the two-operator terms to ensure that the master equation maintains ρ Hermitian).

Quick example:

julia> using QuantumAlgebra
julia> QuantumAlgebra.auto_normal_form()
julia> H = Pr"ω"*adag()*a();
julia> Ls = ( (Pr"κ"*(1+Pr"n"), a()), (Pr"κ"*Pr"n", adag()) );

julia> heisenberg_eom(a(),H,Ls)
-1//2 κ a() - 1i ω a()

julia> heisenberg_eom(adag()a(),H,Ls)
n κ  - κ a†() a()

@oameye
Copy link
Author

oameye commented Apr 17, 2023

Wow, super cool! Thanks for following this up. This will sure be useful for later and enhances the capabilities of the package.

@oameye oameye closed this as completed Apr 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants