Giter Club home page Giter Club logo

quantumgraining.jl's Introduction

QuantumGraining

Introduction

QuantumGraining.jl offers a practical, generalized approach to the time-coarse graining (TCG) method in quantum optics. Often in quantum optics, we are not interested in the short time-scale dynamics -- these are either trivial, or unmeasurable, and keeping track of them is very computationally expensive. The time-coarse graning approach gives an effective, low-frequency description of the time-coarse grained dynamics, without neglecting the effects the high-frequency modes have on this dynamics.

One can think of the time-coarse graining method as a generalization of the rotating-wave approximation, where the time-averaging is performed at the propagator level rather than the Hamiltonian level. More technically, while the rotating-wave approximation neglects all contributions due to counter-propagating terms, the time-coarse graining method is able to include k-order terms that can be comprised off these counter-rotating terms, up to some arbitrary order k. A familiar example would be virtual processes such as the simultaneous emission of a photon together with the excitation of an atom, followed the immediate absorption and de-excitation of the system.

Moreover, the TCG method provides this description in terms of a generalized Linbdladian -- a Hamiltonian and a list of "dissipators" -- that fully generate these processes up to the desired order of approximation. In addition to the obvious benefits of a low-frequency description, this allows one to understand the effects of high-frequency modes directly as emergent dynamics on the relevant modes of interest.

QuantumGraining.jl

Build Status

The STCG method is very computationally involved, with the number of terms growing rapidly with the order of truncation. The main object of interest is the "contraction coefficient" which encapsulates the relative weight of each possible k-order process. Each of these coefficients requires the recursive calculation of lower-order contraction coefficients to compute, a process which is the repeated for each frequency mode in the original Hamiltonian.

QuantumGraining.jl automates the TCG process, symbolically calculating the effective Lindbladians in terms of abstract operators that are easily integrated into other symbolic packages, such as QuantumCumulants.jl and QuantumOptics.jl.

  • The model (Hamiltonian) is specified, along with the time-coarse graining time-scale.
  • The effective Lindbladian is calculated, using an efficient, recursive approach. The resulting Lindbladian is stored stored as a symbolic expression using the Symbolics.jl framework, which is also used for any additional simplification and rewriting.
  • Finally, the symbolic Hamiltonian can be solved in QuantumOptics.jl or using QuantumCumulants.jl.

Installation

QuantumGraining.jl is registered in the Julia package registrator, and can be easily installed on using the latest version of Julia.

  1. Within the Julia REPL, press the ] key. This will switch you to the Pkg REPL, indicated by a prompt like (@v1.8) pkg>.
  2. In the Pkg REPL,
        add QuantumGraining
    
  3. Since the operator algebra is handled by QuantumCumulants, you will need to install it as well,
         add QuantumCumulants
    
  4. Once installed, include QuantumGraining in your code using:
        using QuantumGraining
        using QuantumCumulants
    

After following these steps, you should have successfully installed QuantumGraining.jl and its dependencies.

Short example

As a simple illustrative example, let us consider the implementation of a second-order time coarse graining of the Rabi model:

using QuantumCumulants
using QuantumGraining

@variables g ωc ωa
Ω = [-ωc - ωa, ωc + ωa, -ωc + ωa, ωc - ωa]
gvec = (g/2).*[1, 1, 1, 1]

# Hilbert space definitions (QuantumCumulants.jl)
h_cav = FockSpace(:cavity)
h_atom = NLevelSpace(:atom, (:g,:e))
h = tensor(h_cav, h_atom)

# Operator definitions
@qnumbers a::Destroy(h) σ::Transition(h)
σm = σ(:e, :g)
σp = σ(:g, :e)
hvec = [a*σm, a'*σp, a*σp, a'*σm]

order=2
g_eff, Ω_eff = drop_high_freqs(effective_hamiltonian(hvec, gvec, Ω, order; as_dict=true)..., Dict(ωa => 1, ωc => 1.01))
γ_eff, ω_eff = drop_high_freqs(effective_dissipator(hvec, gvec, Ω, order)..., Dict(ωa => 1, ωc => 1.01)) 

The code above returns an effective Lindbladian that generates the time-coarse grained evolution of the Rabi-model up to second-order. The input is a list of frequencies and their corresponding operators, and the output is a new list of operators, frequencies and coupling strengths. The drop_high_freqs function is used to remove the high-frequency terms from the effective Hamiltonian and dissipator, to simplify the resulting expressions.

Citing

If you find QuantumGraining.jl useful in your research, please consider citing this paper:

@misc{bello2024systematictimecoarsegrainingdriven,
      title={Systematic time-coarse graining for driven quantum systems}, 
      author={Leon Bello and Wentao Fan and Aditya Gandotra and Hakan E. Türeci},
      year={2024},
      eprint={2407.06068},
      archivePrefix={arXiv},
      primaryClass={quant-ph},
      url={https://arxiv.org/abs/2407.06068}, 
}

Funding

This work was supported by the US Department of Energy, Office of Basic Energy Sciences, Division of Materials Sciences and Engineering, under Award No. DESC0016011. Support was also provided by the Army Research Office under contract W911NF-23-1-0252.

quantumgraining.jl's People

Contributors

leonbello avatar agandotra611 avatar wentao-fan avatar

Stargazers

David Plankensteiner avatar Orjan Ameye avatar Timo avatar Huai-Ming Yu avatar Michael Goerz avatar

Watchers

 avatar Orjan Ameye avatar

quantumgraining.jl's Issues

Documentation for Diagrams.jl

Documentation should be in the format of:

"""
    functions(args::type...)

Description of the functionality.

Expamples
=========
\`\`\`
# code examples
\`\`\`
"""

Automatic filter function

Based on a filter function that defines a criteria (size of term, frequency, symmetry and so on), decide whether the correction should be calculated/included or not

Issue with `reshape_sols()`

reshape_sols() appears to give wrong matrices on some occasions, which in turn breaks diagram_correction().

TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.

If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.

If you'd like for me to do this for you, comment TagBot fix on this issue.
I'll open a PR within a few hours, please be patient!

Rewrite `calc_pole_corrections`

calc_pole_corrections() doesn't correctly calculate the formula for the pole contributions,

$$
\frac{1}{\mathcal{N}(s, s')} \sum_{m_{J_u} = u_i, m_{J_l} = l_i}
\prod_{J_u \notin \mathbf{s}_i, J_l \notin \mathbf{s'}i}
\left ( \frac{-J_u}{\mu_i^{1} + \cdots + \mu_i^{J_u}} \right) \cdot \prod
{J_u \notin \mathbf{s}_i, J_l \notin \mathbf{s'}_i}
\left ( \frac{-J_u}{\mu_i^{1} + \cdots + \mu_i^{J_u}} \right)
$$

Add support for `QuantumOptics.jl` as well

Right now QuantumGraining.jl uses QuantumCumulants.jl to solve the equations of motion. While effective, QuantumCumulants.jl only approximates the solution and it would be better to also have implemented a direct master equation solver using QuantumOptics.jl.

Diagram correction fails for certain frequencies

ωs = [1,0,0,2.0, -2.0]
    contraction_coeff(2,0,ωs) #+ contraction_coeff(0,2,ωs)
    diagrams = get_diagrams(DiagramNode((2,0)))
    ω_test= split_freqs_into_bubbles(ωs, diagrams[2])
    corr = diagram_correction(ω_test)
    corr.poly

Diagram printing functionalities

For debugging purposes, and in general, it would be useful to have functions that generate the diagrams from a list of tuples.

`diagram_correction()` calculates the wrong coefficients for singular diagrams

For example, the following code outputs

    begin   # [(3, 0), (2, 0)], single singularity in the first bubble
        μ1 = [0, 1, -1];  
        ν1 = Int[];
        μ2 = [1, 3];
        ν2 = Int[];
        ω = [(μ1, ν1), (μ2, ν2)];

        @show count_poles(find_all_poles(ω)...)
        corr = diagram_correction(ω)

        @test corr.exponent ≈ 2*8
        @test corr.poly ≈ [1, 0, -48]
        @test corr.prefac ≈ 1//144
    end

which returns the error,

Test Failed at /Users/leonbello/.julia/dev/QuantumGraining/test/test_corrections.jl:123
  Expression: corr.poly ≈ [1, 0, -48]
   Evaluated: [1.0, 0.0, -0.4] ≈ [1, 0, -48]

This is probably due to an error in calc_pole_corrections().

`norm_fac()` does not correctly calculate the formula

norm_fac() does not calculate the required function:

$$ f = \left ( \frac{-j}{\sum_{i\notin s} \mu_i \right )^{m_j} $$

Problem is most likely with the sum in the denominator, which should be only over the non-singular indices.

Fix `project.toml`

For some reason CompatHelper gives an error, probably has something to do with bad dependences.

Repeated values in `find_integer_solutions`

sols give the correct parition, for example --

sols = [[0, 0, 0] [0, 0, 1]; 
[0, 0, 0] [0, 1, 0]; 
[0, 0, 0] [1, 0, 0]; 
[0, 0, 1] [0, 0, 0]; 
[0, 1, 0] [0, 0, 0]; 
[1, 0, 0] [0, 0, 0]]

However, inside the loop --

(i, bubble_idx) = (1, 1)
(n, u, d) = (0, 0, 0)

(i, bubble_idx) = (2, 2)
(n, u, d) = (0, 0, 0) # should be (0,0,1)

(i, bubble_idx) = (3, 1)
(n, u, d) = (0, 0, 0)
(i, bubble_idx) = (4, 2)
(n, u, d) = (0, 0, 1)  # should be (0,1,0)
(i, bubble_idx) = (5, 1)
(n, u, d) = (0, 1, 0)
(i, bubble_idx) = (6, 2)
(n, u, d) = (1, 0, 0)
(i, bubble_idx) = (7, 1)
(n, u, d) = (0, 0, 1)
(i, bubble_idx) = (8, 2)
(n, u, d) = (0, 1, 0)
(i, bubble_idx) = (9, 1)
(n, u, d) = (1, 0, 0)
(i, bubble_idx) = (10, 2)
(n, u, d) = (0, 0, 0)
(i, bubble_idx) = (11, 1)
(n, u, d) = (0, 0, 0)
(i, bubble_idx) = (12, 2)
(n, u, d) = (0, 0, 0)

the values don't correspond to the values in sols.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.