Skip to content

Adding Floquet and some useful infrastructure #521

@Gavin-Rockwood

Description

@Gavin-Rockwood

Problem Description

It would be nice to have built in tools for Floquet analysis similar to qutip along with some of the functionality needed to make this easy (such as a propagator function and an ensemble ability for sesolve for easy parallelization, useful for calculating propagators).

Proposed Solution

There should be a structure Floquet Basis which contains the floquet quasi-energies and a function to return the floquet modes at a time t. This would require the implementation of a function to compute the U(ti, tf) propagator, a function that would benefit from an extension to sesolve that allows it to take in lists of wavefunctions and generate an ensemble problem for the sciml ODE solver.

Alternate Solutions

No response

Additional Context

I have had my own implementation that I am currently working on incorporating into a fork of QuantumToolbox (here. It consists of

  1. The introduction of a version of sesolve that dispatches on vectors of ket Quantum objects (here). This generates an EnsembleTimeEvolutionProblem instead of a TimeEvolutionProblem (though it does contain one) and uses this to generate an EnsembleProblem for DifferentialEquations. This allows for easy multi-threading or distributed solving for a set of wavefunctions. This is used to speed up the calculation of propagators.
    • This function also has the ability to perform this ensemble solve over a list of parameters. By setting iterate_params=true, the function will treat the params kwarg as a collection of parameter sets and solve all of those as well. In the end, this function returns a $m\times n$ matrix of TimeEvolutionSol objects where the rows are the initial wavefunctions and the columns are the different sets of parameters.
  2. The introduction of a function propagator which takes in a Hamiltonian "H" and a times ti, tf and passes this Hamiltonian along with the H(ti) eigenstates to sesolve to compute the propagator $\sum_i\ket{i,t=t_i}\bra{i,t=t_f}$ (here).
    - There is also a structure Propagator (constructed by get_propagator) which can be evaluated as Propagator(tf) to return the $t=t_f$ propagator (via the function .eval which Propagator contains). This is really just a convenience thing as it allows one to just create some propagator object "U" and then keep mindlessly reusing it.
  3. Finally, in here I have implemented the some basic floquet tools. These include:
    1. A structure FloquetBasis, initialized by get_floquet_basis which includes
      • T: The floquet period
      • e_quasi: The list of floquet quasienergies
      • modes: A function which when evaluated as modes(t) returns the floquet modes at time "t" by using the function propagate_floquet_modes. This is done by calculating the propagator $U(t_i=0, t_f%T)$ and acting it on the $t=0$ floquet modes. If modes is evaluated at $t=0$, it skips this entirely and just returns the $t=0$ floquet modes. This function, can take in kwargs that are passed through to the propagator calculator and onto sesolve.
    2. A function `floquet_sweep' which takes in a function "H(params)" and a list params to sample and calculates the a FloquetBasis for each parameter in the list and passes this list of states and spectra to track_stater which sorts the states across all the parameters. This is useful for doing stuff like searching for resonances by calculating the floquet spectrum for a range of drive frequencies and searching for avoided crossings. There are probably better algorithms to do this but this one that I used to do the floquet analysis for the drive dynamics in this paper along with doing some transmon ionization analysis.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions