DickeModel.UPOs

For examples of usage, go to Examples for UPOs.

Periodic Orbit (PO) type

DickeModel.UPOs.POType
struct PO

This struct represents a periodic orbit in the classical Dicke model. To generate, use

po = PO(system, u, T)

where system is an instance of ClassicalDicke.DickeSystem, u is a real vector of an initial condition in the form [Q,q,P,p], and T is a real number representing the period. You can retrieve this values using po.system, po.u, and po.T.

source
Base.:==Method
Base.:(==)(po1::PO,po2::PO;Ttol::Real=1e-5,tol::Real=1e-6)

The comparison po1 == po2 returns true if po1 and po2 represent the same periodic orbit, regardless of which initial condition they have. This is done by evaluating ∈(po1.u, po2, tol = tol) && abs(po1.T-po2.T) < Ttol

source
Base.inMethod
Base.in(u::AbstractVector{<:Number}, po::PO;tol::Real=1e-6)
Base.∈(u::AbstractVector{<:Number}, po::PO;tol::Real=1e-6)

You may write u ∈ po.

Returns true if the point u is part of the periodic orbit po. This is done by integrating po.u and seeing if it comes within tol of u.

source

Integrals over POs

DickeModel.UPOs.average_over_POFunction
function average_over_PO(po::Union{OrdinaryDiffEq.ODESolution,PO},
    f::Function;
    kargs...)

Computes the average of a function $f$ over the periodic orbit po

\[ \frac{1}{T} \int_0^T f(u(t)) \, \text{d} t,\]

where $T=$ po.T and $u=$ po.u.

Arguments

  • po should be an instance of PO or an instance of OrdinaryDiffEq.ODESolution, in which case the integration is ommited.
  • f should be a function with a method f([Q,q,P,p]), which returns values that may be added together and multiplied by scalars (e.g. numbers or arrays).

Keyword arguments

source

Properties of POs

DickeModel.UPOs.actionFunction
function action(po::PO;kargs...)

Numerically computes the action

\[ S = \int p\,\text{d} q + P \, \text{d} Q\]

along the periodic orbit po.

Arguments

  • po should be an instance of PO

Keyword arguments

source
DickeModel.UPOs.jx_PO_averageFunction
function jx_PO_average(po::Union{OrdinaryDiffEq.ODESolution,PO},
    f::Function;
    kargs...)

Returns average_over_PO_QP(PO,PhaseSpaces.jx;kargs...).

source
DickeModel.UPOs.jy_PO_averageFunction
function jy_PO_average(po::Union{OrdinaryDiffEq.ODESolution,PO},
    f::Function;
    kargs...)

Returns average_over_PO_QP(PO,PhaseSpaces.jy;kargs...).

source
DickeModel.UPOs.jz_PO_averageFunction
function jz_PO_average(po::Union{OrdinaryDiffEq.ODESolution,PO},
    f::Function;
    kargs...)

Returns average_over_PO_QP(PO,PhaseSpaces.jz;kargs...).

source
DickeModel.UPOs.energyFunction
energy(po::PO) = ClassicalDicke.hamiltonian(po.system)(po.u)

Returns the energy of the periodic orbit po.

source

Operations on POs

Mirror operations

DickeModel.UPOs.mirror_QqFunction
function mirror_Qq(po::PO)

Returns a periodic orbit po1, which results from changing the sign of the $Q$ and $q$ coordinates of the periodic orbit po.

source
DickeModel.UPOs.mirror_PpFunction
function mirror_Pp(po::PO)

Returns a periodic orbit po1, which results from changing the sign of the $P$ and $p$ coordinates of the periodic orbit po.

source

Coordinate extraction

DickeModel.UPOs.po_coordinatesFunction
function po_coordinates(coords::AbstractArray{<:Integer}, 
    po::PO;tol::Real=1e-12)

Returns an array [Tuple(x1[coords]), Tuple(x2[coords]), ...], where is an array containing up to 4 integers from 1 to 4, and xi are the points in po obtained with numerical integration with tolerance tol.

source

The following methods are shorthand implementations of po_coordinates. They are useful to plot a periodic orbit. For example, plot(QP(po)) plots the orbit in the atomic plane.

DickeModel.UPOs.QPFunction
QP(po::PO; tol::Real=1e-12) = po_coordinates([1,3], po, tol=tol)

Returns an array [(Q1, P1), (Q2, P2), ...] with the coordinates of po, integrated with tolerance tol. This can be directly passed to Plots.plot

source
DickeModel.UPOs.qpFunction
qp(po::PO; tol::Real=1e-12) = po_coordinates([2,4], po, tol=tol)

Returns an array [(q1, p1), (q2, p2), ...] with the coordinates of po, integrated with tolerance tol. This can be directly passed to Plots.plot

source
DickeModel.UPOs.QPpFunction
QPp(po::PO; tol::Real=1e-12) = po_coordinates([1,3,4], po, tol=tol)

Returns an array [(Q1, P1, p1), (Q2, P2, p2), ...] with the coordinates of po, integrated with tolerance tol. This can be directly passed to Plots.plot to generate a 3D plot.

source
DickeModel.UPOs.QPqFunction
QPq(po::PO; tol::Real=1e-12) = po_coordinates([1,3,2], po, tol=tol)

Returns an array [(Q1, P1, q1), (Q2, P2, q2), ...] with the coordinates of po, integrated with tolerance tol. This can be directly passed to Plots.plot to generate a 3D plot.

source

Finding POs

DickeModel.UPOs.approximate_periodFunction
function approximate_period(system::DickeSystem,
    u₀::AbstractVector{<:Real};
    bound::Real = 0.1,
    tol::Real = 1e-8,
    max_p_crossings::Real = Inf,
    verbose::Bool = true)

Computes the time necessary for the initial condition u₀ to come back to the same p-plane within a neighborhood of radius bound of u₀. This is useful to approximate the period of an almost periodic condition u₀. The maximum time of integration is 10000.

Arguments

Keyword arguments

  • bound is a positive real number indicating how close does the evolution has to come back to u₀. Defaults to 0.1.
  • tol is the integration tolerance. Not to be confused with bound. Defaults to 1e-8.
  • max_p_crossings is the maximum number of times the condition may cross the p plane before aborting. Defaults to Inf (no maximum).
  • verbose is a boolean indicating whether to log information messages. Defaults to true.
source
DickeModel.UPOs.find_p_zeroFunction
function find_p_zero(system::DickeSystem,
    u₀::AbstractVector{<:Real};
    tol::Real=1e-6,
    negative::Bool=false)

Evolves u₀ until it crosses the $p=0$ plane from negative to positive and returns the result.

Arguments

Keyword arguments

  • tol is the numerical tolerance.
  • If negative is true, then the crossing is from positive to negative. Default is false.
source

Monodromy methods

DickeModel.UPOs.monodromy_method_constant_periodFunction
function monodromy_method_constant_period(system::DickeSystem,
    u₀::AbstractVector{<:Real},
    T::Real;
    maxiters::Integer=100,
    tol::Real=1e-8,
    inttol::Real=tol/10)

Returns a PO with a given period T that is found by iteratively perturbating the initial condition u₀ in the direction that minimizes the distance between $u_0$ and $u_0(T)$. The perturbation is obtained from Eq. (31) of Ref. [17], taking $\Lambda$ as the fundamental matrix evaluated at time T. Note that the energy of u₀ will change. To conserve the energy and vary T, use monodromy_method_constant_energy instead.

Arguments

  • system should be an instance of ClassicalDicke.DickeSystem.
  • u₀ is a point [Q,q,P,p] in the phase space of the Dicke model, which is used as the starting point to find an orbit.
  • T is a positive real number, indicating the desired period.

Keyword arguments

  • maxiters is a integer which sets the maximum number of iterations. Defaults to 100.
  • tol is a tolerance. If $\|u-u(T)\|<$ tol, $u$ is considered a periodic condition with period T. The smaller the tolerance, the more iterations are needed to converge. Default is 1e-8
  • inttol is the tolerance to be passed to ClassicalSystems.integrate. Default is tol/10.
source
DickeModel.UPOs.monodromy_method_constant_energyFunction
function monodromy_method_constant_energy(system::DickeSystem,
    u₀::AbstractVector{<:Real},
    T::Real;
    maxiters::Integer=100,
    tol::Real=1e-8,
    inttol::Real=tol/10,
    correct_energy::Bool=true)

Returns a PO with energy approximatelly (see below) the same energy as $u₀$ obtained by iteratively perturbating period T and the initial condition u₀ in the direction that minimizes the distance between $u_0$ and $u_0(T)$ and is perpendicular to the Hamiltonian gradient. The algorithm is described in App. A, section A.1. of Ref. [13].

Arguments

  • system should be an instance of ClassicalDicke.DickeSystem.
  • u₀ is a point [Q,q,P,p] in the phase space of the Dicke model, which is used as the starting point to find an orbit.
  • T is a positive real number, which is used as the starting point to find an orbit.

Keyword arguments

  • maxiters is a integer which sets the maximum number of iterations. Defaults to 100.
  • tol is a tolerance. If $\|u-u(T)\|<$ tol, $u$ is considered a periodic condition with period T. The smaller the tolerance, the more iterations are needed to converge. Default is 1e-8
  • inttol is the tolerance to be passed to ClassicalSystems.integrate. Default is tol/10.
  • correct_energy is a Boolean. As described in Ref. [13], this algorithm only approximately conserves energy. If correct_energy == true, the initial condition is projected back to the energy shell between each iteration. This allows energy to be truly conserved, however, it makes the algorithm more unstable. The default is true.
source

PO familly followers

DickeModel.UPOs.follow_PO_family_from_periodFunction
function follow_PO_family_from_period(po::PO;
    step::Real=0.1,
    tol::Real=1e-5,
    initalperturbation::AbstractVector{<:Real}=Float64[0,1,0,0],
    verbose::Bool =true)

Returns a function T -> po1 that returns a PO from the same family as po but with period T. This algorithm applies the function monodromy_method_constant_period repeatedly, increasing or decreasing the period in small perturbations to reach the target.

Note that results are cached, so when po is returned by calling the function at some period T, a second call with the same period will not perform any calculation and will return po again.

Arguments

  • po should be an instance of PO

Keyword arguments

  • step is the initial size of the perturbations in period, this is decreased and increased dynamically (default is 0.1).
  • tol is the tolerance to pass to monodromy_method_constant_period (default is 1e-5).
  • verbose is a Boolean indicating whether to print the progress. Default is true.

The function returned accepts the following keyword arguments:

  • tol overrides tol above.
  • minstep is the minimum step (which is varied dynamically). Default is step/1000.
  • maxstep is the maximum step. Default is step.
  • step overrides step above. Default is maxstep.
  • maxiters is the maximum number of iterations. Default is 1000.
source
DickeModel.UPOs.follow_PO_family_from_energyFunction
function follow_PO_family_from_energy(po::PO;
    step::Real=0.1,
    tol::Real=1e-5,
    energytol::Real=1e-3,
    initalperturbation::AbstractVector{<:Real}=Float64[0,1,0,0],
    verbose::Bool =true,
    dontallowlessenergy::Bool=false)

Returns a function ϵ -> po1 that returns a PO from the same family as po but with energy ϵ. This algorithm is detailed in App. A.2. of Ref. [13]

Note that results are cached, so when po is returned by calling the function at some energy ϵ, a second call with the same energy will not perform any calculation and will return po again.

Arguments

  • po should be an instance of PO.

Keyword arguments

  • step is the initial size of the perturbations in energy, this is decreased and increased dynamically (default is 0.1). If the orbits seem to suddenly jump, try to decrease this number.
  • tol is the tolerance to pass to monodromy_method_constant_energy (default is 1e-5).
  • energytol is the precision in energy below which a PO is returned (default is 1e-3).
  • initalperturbation is de direction of the first perturbation in the form [Q,q,P,p] (default is [0,1,0,0]).
  • verbose is a Boolean indicating whether to print the progress. Default is true.
  • dontallowlessenergy forbids evaluation below the energy of po. Default is false.

The function returned accepts the following keyword arguments:

  • tol overrides tol above.
  • energytol overrides energytol above.
  • maxstep is the maximum step. Default is step.
  • step overrides step above. Default is maxstep.
  • minstep is the minimum step (which is varied dynamically). Default is min(step,energytol/10).
  • correct_energy is passed to monodromy_method_constant_energy. Default is true.
  • maxiters is the maximum number of iterations. Default is 1000.
  • energywiggletolerance is the tolerance for oscillations. Oscillating behaviour indicates instability, but sometimes it happens and there must be some tolerance. The default is 1e-2.
source

Scarring measure

DickeModel.UPOs.scarring_measureFunction
function scarring_measure(
    po::PO{DickeBCE.QuantumDickeSystem},
    quantum_state::AbstractVector{<:Number};
    chop::Real=1e-3,
    kargs...)

Returns the scarring measure $\mathcal{P}(\mathcal{O},\hat{\rho})$ as defined in Eq. (17) of Ref. [13].

Arguments

  • po should be an instance of PO representing $\mathcal{O}$ above. The system passed to create po should have been a QuantumDickeSystem.
  • quantum_state should be a vector representing the quantum state $\hat{\rho}$ in the coherent efficient basis.

Keyword arguments

source
DickeModel.UPOs.overlap_of_tube_with_homogenous_stateFunction
function overlap_of_tube_with_homogenous_state(po::PO{DickeBCE.QuantumDickeSystem};
                                        time_integral_tolerance::Real=1e-7,
                                        phase_space_integral_resolution::Real=0.1)

Returns the overlap $\text{tr}(\hat{\rho}_\epsilon \hat{\rho}_{\mathcal{O}} )$ of a tubular state $\hat{\rho}_{\mathcal{O}}$ around the periodic orbit $\mathcal{O}=$ po, (Eq. (15) of Ref. [13]) with a totally delocalized state $\hat{\rho}_\epsilon$ (Eq. (16) of Ref. [13]).

Arguments

  • po should be an instance of PO. The system passed to create po should have been a QuantumDickeSystem.

Keyword arguments

  • time_integral_tolerance is the numerical tolerance for the integral in Eq. (15) of Ref. [13]. Default is 1e-7.
  • phase_space_integral_resolution is the phase space resolution for the integral in Eq. (16) of Ref. [13], that is, res in EnergyShellProjections.energy_shell_average. Default is 0.1.
source