DickeModel.UPOs
For examples of usage, go to Examples for UPOs.
Periodic Orbit (PO) type
DickeModel.UPOs.PO — Typestruct POThis 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.
DickeModel.UPOs.PO — Methodfunction PO(system::DickeSystem, u::AbstractVector{<:Real})Generates a PO, given a periodic condition u = [Q,q,P,p], where the period is calculated using approximate_period(system,u,bound=1e-2).
Base.:== — MethodBase.:(==)(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
Base.in — MethodBase.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.
Integrals over POs
DickeModel.ClassicalSystems.integrate — Methodfunction integrate(po::PO;tol::Real=1e-16, kargs...)Returns an instance of OrdinaryDiffEq.ODESolution, resulting from integrating po.u from t = 0 to t = po.T.
Arguments
poshould be an instance ofPO.
Keyword arguments
tolis a real number indicating the precision for the integrator. Defaults to1e-16.kargsare redirected toClassicalSystems.integrate.
DickeModel.UPOs.average_over_PO — Functionfunction 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
poshould be an instance ofPOor an instance ofOrdinaryDiffEq.ODESolution, in which case the integration is ommited.fshould be a function with a methodf([Q,q,P,p]), which returns values that may be added together and multiplied by scalars (e.g. numbers or arrays).
Keyword arguments
kargsare redirected toClassicalSystems.integrate.
DickeModel.UPOs.average_over_PO_QP — Functionfunction average_over_PO_QP(po::Union{OrdinaryDiffEq.ODESolution,PO},
f::Function;
kargs...)Same as average_over_PO, but f only depends on Q,P, that is, the signature of f is f(Q,P).
DickeModel.UPOs.average_over_PO_qp — Functionfunction average_over_PO_qp(po::Union{OrdinaryDiffEq.ODESolution,PO},
f::Function;
kargs...)Same as average_over_PO, but f only depends on q,p, that is, the signature of f is f(q,p).
Properties of POs
DickeModel.UPOs.action — Functionfunction action(po::PO;kargs...)Numerically computes the action
\[ S = \int p\,\text{d} q + P \, \text{d} Q\]
along the periodic orbit po.
Arguments
poshould be an instance ofPO
Keyword arguments
kargsare redirected tointegrate
DickeModel.UPOs.jx_PO_average — Functionfunction jx_PO_average(po::Union{OrdinaryDiffEq.ODESolution,PO},
f::Function;
kargs...)Returns average_over_PO_QP(PO,PhaseSpaces.jx;kargs...).
DickeModel.UPOs.jy_PO_average — Functionfunction jy_PO_average(po::Union{OrdinaryDiffEq.ODESolution,PO},
f::Function;
kargs...)Returns average_over_PO_QP(PO,PhaseSpaces.jy;kargs...).
DickeModel.UPOs.jz_PO_average — Functionfunction jz_PO_average(po::Union{OrdinaryDiffEq.ODESolution,PO},
f::Function;
kargs...)Returns average_over_PO_QP(PO,PhaseSpaces.jz;kargs...).
DickeModel.UPOs.lyapunov — Functionfunction lyapunov(po::PO)Returns the Lyapunov exponent of the periodic orbit po, as given by Eq. (B3) of Ref. [13].
DickeModel.UPOs.energy — Functionenergy(po::PO) = ClassicalDicke.hamiltonian(po.system)(po.u)Returns the energy of the periodic orbit po.
Operations on POs
Mirror operations
DickeModel.UPOs.mirror_Qq — Functionfunction 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.
DickeModel.UPOs.mirror_Pp — Functionfunction 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.
Coordinate extraction
DickeModel.UPOs.po_coordinates — Functionfunction 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.
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.QP — FunctionQP(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
DickeModel.UPOs.qp — Functionqp(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
DickeModel.UPOs.QPp — FunctionQPp(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.
DickeModel.UPOs.QPq — FunctionQPq(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.
Finding POs
DickeModel.UPOs.approximate_period — Functionfunction 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
systemshould be an instance ofClassicalDicke.DickeSystem.u₀is a point[Q,q,P,p]in the phase space of the Dicke model.
Keyword arguments
boundis a positive real number indicating how close does the evolution has to come back tou₀. Defaults to0.1.tolis the integration tolerance. Not to be confused withbound. Defaults to 1e-8.max_p_crossingsis the maximum number of times the condition may cross thepplane before aborting. Defaults toInf(no maximum).verboseis a boolean indicating whether to log information messages. Defaults totrue.
DickeModel.UPOs.find_p_zero — Functionfunction 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
systemshould be an instance ofClassicalDicke.DickeSystem.u₀is a point[Q,q,P,p]in the phase space of the Dicke model.
Keyword arguments
tolis the numerical tolerance.- If
negativeistrue, then the crossing is from positive to negative. Default isfalse.
Monodromy methods
DickeModel.UPOs.monodromy_method_constant_period — Functionfunction 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
systemshould be an instance ofClassicalDicke.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.Tis a positive real number, indicating the desired period.
Keyword arguments
maxitersis a integer which sets the maximum number of iterations. Defaults to100.tolis a tolerance. If $\|u-u(T)\|<$tol, $u$ is considered a periodic condition with periodT. The smaller the tolerance, the more iterations are needed to converge. Default is1e-8inttolis the tolerance to be passed toClassicalSystems.integrate. Default istol/10.
DickeModel.UPOs.monodromy_method_constant_energy — Functionfunction 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
systemshould be an instance ofClassicalDicke.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.Tis a positive real number, which is used as the starting point to find an orbit.
Keyword arguments
maxitersis a integer which sets the maximum number of iterations. Defaults to100.tolis a tolerance. If $\|u-u(T)\|<$tol, $u$ is considered a periodic condition with periodT. The smaller the tolerance, the more iterations are needed to converge. Default is1e-8inttolis the tolerance to be passed toClassicalSystems.integrate. Default istol/10.correct_energyis a Boolean. As described in Ref. [13], this algorithm only approximately conserves energy. Ifcorrect_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 istrue.
PO familly followers
DickeModel.UPOs.follow_PO_family_from_period — Functionfunction 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
poshould be an instance ofPO
Keyword arguments
stepis the initial size of the perturbations in period, this is decreased and increased dynamically (default is0.1).tolis the tolerance to pass tomonodromy_method_constant_period(default is1e-5).verboseis a Boolean indicating whether to print the progress. Default istrue.
The function returned accepts the following keyword arguments:
toloverridestolabove.minstepis the minimum step (which is varied dynamically). Default isstep/1000.maxstepis the maximum step. Default isstep.stepoverridesstepabove. Default ismaxstep.maxitersis the maximum number of iterations. Default is1000.
DickeModel.UPOs.follow_PO_family_from_energy — Functionfunction 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
poshould be an instance ofPO.
Keyword arguments
stepis the initial size of the perturbations in energy, this is decreased and increased dynamically (default is0.1). If the orbits seem to suddenly jump, try to decrease this number.tolis the tolerance to pass tomonodromy_method_constant_energy(default is1e-5).energytolis the precision in energy below which a PO is returned (default is1e-3).initalperturbationis de direction of the first perturbation in the form[Q,q,P,p](default is[0,1,0,0]).verboseis a Boolean indicating whether to print the progress. Default istrue.dontallowlessenergyforbids evaluation below the energy ofpo. Default isfalse.
The function returned accepts the following keyword arguments:
toloverridestolabove.energytoloverridesenergytolabove.maxstepis the maximum step. Default isstep.stepoverridesstepabove. Default ismaxstep.minstepis the minimum step (which is varied dynamically). Default ismin(step,energytol/10).correct_energyis passed tomonodromy_method_constant_energy. Default istrue.maxitersis the maximum number of iterations. Default is1000.energywiggletoleranceis the tolerance for oscillations. Oscillating behaviour indicates instability, but sometimes it happens and there must be some tolerance. The default is1e-2.
DickeModel.UPOs.family_A — Functionfunction family_A(system::DickeSystem;kargs...)Returns a function ϵ -> po that returns a PO from family $\mathcal{A}$ of Ref. [13]. This is done by passing the ground state fixed point with the positive normal frequency as period to follow_PO_family_from_energy.
Arguments
systemshould be an instance ofClassicalDicke.DickeSystem. The system must be in the supperradiant regime.
Keyword arguments
kargs...are redirected tofollow_PO_family_from_energy
DickeModel.UPOs.family_B — Functionfunction family_B(system::DickeSystem;kargs...)Returns a function ϵ -> po that returns a PO from family $\mathcal{B}$ of Ref. [13]. This is done by passing the ground state fixed point with the negative normal frequency as period to follow_PO_family_from_energy.
Arguments
systemshould be an instance ofClassicalDicke.DickeSystem. The system must be in the supperradiant regime.
Keyword arguments
kargs...are redirected tofollow_PO_family_from_energy
Scarring measure
DickeModel.UPOs.scarring_measure — Functionfunction 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
poshould be an instance ofPOrepresenting $\mathcal{O}$ above. The system passed to createposhould have been aQuantumDickeSystem.quantum_stateshould be a vector representing the quantum state $\hat{\rho}$ in the coherent efficient basis.
Keyword arguments
chopis the tolerance to be passed toDickeBCE.husimi(see the documentation ofDickeBCE.coherent_overlap)kargsare redirected tooverlap_of_tube_with_homogenous_state, which gives the denominator in Eq. (17) of Ref. [13].
DickeModel.UPOs.overlap_of_tube_with_homogenous_state — Functionfunction 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
poshould be an instance ofPO. The system passed to createposhould have been aQuantumDickeSystem.
Keyword arguments
time_integral_toleranceis the numerical tolerance for the integral in Eq. (15) of Ref. [13]. Default is1e-7.phase_space_integral_resolutionis the phase space resolution for the integral in Eq. (16) of Ref. [13], that is,resinEnergyShellProjections.energy_shell_average. Default is0.1.