Models

QEDFeynman.QEDFeynmanModule
QEDFeynman

A module containing QED and ABC model functionality for scattering processes in particle physics.

source

Interface and General

The interface that has to be implemented for a model to be usable is defined in src/interface.jl.

QEDFeynman.ParticleValueType
ParticleValue{ParticleType <: AbstractParticleStateful}

A struct describing a particle during a calculation of a Feynman Diagram, together with the value that's being calculated. AbstractParticleStateful is the type from the QEDbase package.

sizeof(ParticleValue()) = 48 Byte

source
QEDFeynman.interaction_resultFunction
interaction_result(t1::AbstractParticleStateful, t2::AbstractParticleStateful)

Interface function that must be implemented for AbstractParticleStatefuls for all pairs of particle_species that can occur in the model. It should return the result particle (stateful) type when the two given particles interact.

source
QEDFeynman.modelFunction
model(::AbstractProcessDescription)
model(::AbstractProcessInput)

Return the model of this process description or input.

source
QEDFeynman.part_from_xMethod
part_from_x(type::Type, index::Int, x::AbstractProcessInput)

Return the ParticleValue of the given type of particle with the given index from the given process input.

Function is wrapped into a FunctionCall in gen_input_assignment_code.

source
QEDFeynman.type_index_from_nameFunction
type_from_name(model::AbstractModel, name::String)

For a name of a particle in the given AbstractModel, return the particle's Type and index as a tuple. The input string can be expetced to be of the form "<name><index>".

source
QEDFeynman.typesFunction
types(::AbstractPhysicsModel)

Interface function that must be implemented for every subtype of AbstractPhysicsModel, returning a Vector of the available particle types in the model.

source

ABC-Model

Types

Particle

QEDFeynman.ABC_conserve_momentumMethod
ABC_conserve_momentum(p1::ABCParticle, p2::ABCParticle)

Calculate and return a new particle from two given interacting ones at a vertex.

Takes 4 effective FLOP.

source
QEDFeynman.ABC_inner_edgeMethod
ABC_inner_edge(p::AbstractParticleStateful{Dir, ABCParticle})

Return the factor of the inner edge with the given (virtual) particle.

Takes 10 effective FLOP. (3 here + 7 in square(p))

source
QEDFeynman.ABC_outer_edgeMethod
ABC_outer_edge(p::AbstractParticleStateful{Dir, ABCParticle})

Return the factor of the outer edge with the given (real) particle.

Takes 0 effective FLOP.

source
QEDFeynman.interaction_resultMethod
interaction_result(
    p1::AbstractParticleStateful{<:ParticleDirection, <:ABCParticle},
    p2::AbstractParticleStateful{<:ParticleDirection, <:ABCParticle},
)

For 2 given (non-equal) particle types, return the third of ABC.

source
QEDFeynman.squareMethod
square(p::AbstractParticleStateful{Dir, ABCParticle})

Return the square of the particle's momentum as a Float value.

Takes 7 effective FLOP.

source
QEDbase.massMethod
mass(t::Type{T}) where {T <: ABCParticle}

Return the mass (at rest) of the given particle type.

source

Parse

QEDFeynman.parse_dagFunction
parse_dag(filename::String, proc::GenericABCProcess; verbose::Bool = false)

Read an ABC-model process from the given file. If verbose is set to true, print some progress information to stdout.

Returns a valid DAG.

source
QEDFeynman.parse_edgesMethod
parse_edges(input::AbstractString)

Parse the given string into a vector of strings containing each edge. Currently unused since the entire graph can be read from just the node names.

source
QEDFeynman.parse_nodesMethod
parse_nodes(input::AbstractString)

Parse the given string into a vector of strings containing each node.

source

Properties

ComputableDAGs.compute_effortMethod
compute_effort(t::ComputeTaskABC_Sum)

Return the compute effort of a Sum task.

Note: This is a constant compute effort, even though sum scales with the number of its inputs. Since there is only ever a single sum node in a graph generated from the ABC-Model, this doesn't matter.

source

Create

Compute

ComputableDAGs.computeMethod
compute(::ComputeTaskABC_Sum, data...)
compute(::ComputeTaskABC_Sum, data::AbstractArray)

Compute a sum over the vector. Use an algorithm that accounts for accumulated errors in long sums with potentially large differences in magnitude of the summands.

Linearly many FLOP with growing data.

source
ComputableDAGs.computeMethod
compute(::ComputeTaskABC_V, data1::ParticleValue, data2::ParticleValue)

Compute a vertex. Preserve momentum and particle types (AB->C etc.) to create resulting particle, multiply values together and times a vertex factor.

6 FLOP.

source
ComputableDAGs.computeMethod
compute(::ComputeTaskABC_S1, data::ParticleValue)

Compute inner edge (1 input particle, 1 output particle).

11 FLOP.

source
ComputableDAGs.computeMethod
compute(::ComputeTaskABC_S2, data1::ParticleValue, data2::ParticleValue)

Compute a final inner edge (2 input particles, no output particle).

For valid inputs, both input particles should have the same momenta at this point.

12 FLOP.

source
ComputableDAGs.computeMethod
compute(::ComputeTaskABC_U, data::ParticleValue)

Compute an outer edge. Return the particle value with the same particle and the value multiplied by an ABCouteredge factor.

1 FLOP.

source

Print

QED-Model

Feynman Diagrams

QEDFeynman.FeynmanDiagramType
FeynmanDiagram

Representation of a feynman diagram. It consists of its initial input/output particles, and a vector of sets of FeynmanVertexs. The vertices are to be applied level by level. A FeynmanVertex will always be at the lowest level possible, i.e. the lowest level at which all input particles for it exist. The FeynmanTie represents the final inner edge of the diagram.

source
QEDFeynman.FeynmanTieType
FeynmanTie

Representation of a "tie" in a FeynmanDiagram. A tie ties two virtual particles in a diagram together and thus represent an inner line of the diagram. Not all inner lines are FeynmanTies, in fact, a connected diagram only ever has exactly one tie.

source
QEDFeynman.add_tie!Method
add_tie!(fd::FeynmanDiagram, tie::FeynmanTie)

Add the given tie to the diagram, always at the last level.

source
QEDFeynman.add_tieMethod
add_tie(fd::FeynmanDiagram, tie::FeynmanTie)

Add the given tie to the diagram, at the earliest level possible. Return the new diagram without muting the given one.

source
QEDFeynman.add_vertex!Method
add_vertex!(fd::FeynmanDiagram, vertex::FeynmanVertex)

Add the given vertex to the diagram, at the earliest level possible.

source
QEDFeynman.add_vertexMethod
add_vertex(fd::FeynmanDiagram, vertex::FeynmanVertex)

Add the given vertex to the diagram, at the earliest level possible. Return the new diagram without muting the given one.

source
QEDFeynman.can_apply_tieMethod
can_apply_tie(particles::Vector{FeynmanParticle}, tie::FeynmanTie)

Return true if the given FeynmanTie can be applied to the given particles, i.e. both input particles of the tie are in the vector.

source
QEDFeynman.can_apply_vertexMethod
can_apply_vertex(particles::Vector{FeynmanParticle}, vertex::FeynmanVertex)

Return true if the given FeynmanVertex can be applied to the given particles, i.e. both input particles of the vertex are in the vector and the output particle is not.

source
QEDFeynman.can_tieMethod
can_tie(p1::Type, p2::Type)

For two given QEDParticle types, return whether they can be tied together.

They can be tied iff one is the propagation_result of the other, or if both are photons, in which case their direction does not matter.

source
QEDFeynman.gen_compton_diagrams_one_sideMethod
gen_compton_diagrams_one_side(n::Int, m::Int)

Special case diagram generation for Compton processes, i.e., processes of the form k^ne->k^me, but generating from one end, yielding larger diagrams

source
QEDFeynman.get_particlesFunction
get_particles(fd::FeynmanDiagram, level::Int)

Return a vector of the particles after applying the vertices and tie of the diagram up to the given level. If no level is given, apply all. The tie comes last and is its own "level".

source
QEDFeynman.id_for_typeMethod
id_for_type(d::FeynmanDiagram, t::Type{<:ParticleStateful})

Return the highest id of any particle of the given type in the diagram + 1.

source
QEDFeynman.is_comptonMethod
is_compton(fd::FeynmanDiagram)

Returns true iff the given feynman diagram is an (empty) diagram of a compton process like ke->k^ne

source
QEDFeynman.isvalidMethod
isvalid(fd::FeynmanDiagram)

Return whether the given diagram is valid. A diagram is valid iff the following are true:

  • After applying all vertices and the tie, there are no more particles left
  • The diagram is connected
source
QEDFeynman.possible_verticesMethod
possible_vertices(fd::FeynmanDiagram)

Return a vector of all possible vertices that can be applied to the diagram at its current state.

source

Types

Particle

QEDFeynman.QED_conserve_momentumMethod
QED_conserve_momentum(p1::ParticleStateful, p2::ParticleStateful)

Calculate and return a new particle from two given interacting ones at a vertex.

source
QEDFeynman.caninteractMethod
caninteract(T1::Type{<:ParticleStateful}, T2::Type{<:ParticleStateful})

For two given ParticleStateful types, return whether they can interact at a vertex. This is equivalent to !issame(T1, T2).

See also: issame and interaction_result

source
QEDFeynman.issameMethod
issame(T1::Type{<:ParticleStateful}, T2::Type{<:ParticleStateful})

For two given ParticleStateful types, return whether they are equivalent for the purpose of a Feynman Diagram. That means e.g. an Incoming AntiFermion is the same as an Outgoing Fermion. This is equivalent to !caninteract(T1, T2).

See also: caninteract and interaction_result

source
QEDFeynman.modelMethod
model(::AbstractProcessDescription)

Return the model of this process description.

source

Parse

QEDFeynman.parse_processFunction
parse_process(string::AbstractString, model::QEDModel)

Parse a string representation of a process, such as "ke->ke" into the corresponding QEDProcessDescription.

source

Properties

ComputableDAGs.compute_effortMethod
compute_effort(t::ComputeTaskQED_Sum)

Return the compute effort of a Sum task.

Note: This is a constant compute effort, even though sum scales with the number of its inputs. Since there is only ever a single sum node in a graph generated from the QED-Model, this doesn't matter.

source

Create

QEDFeynman.gen_graphMethod
gen_graph(process_description::ScatteringProcess)

For a given QEDprocesses.ScatteringProcess, return the DAG that computes it.

source
QEDFeynman.gen_process_inputMethod
gen_process_input(processDescription::ScatteringProcess)

Return a PhaseSpacePoint of randomly generated particles from a QEDprocesses.ScatteringProcess. The process description can be created manually or parsed from a string using parse_process.

Note: This uses RAMBO to create a valid process with conservation of momentum and energy.

source

Compute

ComputableDAGs.computeMethod
compute(::ComputeTaskQED_Sum, data...)
compute(::ComputeTaskQED_Sum, data::AbstractArray)

Compute a sum over the vector. Use an algorithm that accounts for accumulated errors in long sums with potentially large differences in magnitude of the summands.

Linearly many FLOP with growing data.

source
ComputableDAGs.computeMethod
compute(::ComputeTaskQED_S2, data1::ParticleValue, data2::ParticleValue)

Compute a final inner edge (2 input particles, no output particle).

For valid inputs, both input particles should have the same momenta at this point.

12 FLOP.

source
ComputableDAGs.computeMethod
compute(::ComputeTaskQED_U, data::ParticleValueSP)

Compute an outer edge. Return the particle value with the same particle and the value multiplied by an outer_edge factor.

source
ComputableDAGs.computeMethod
compute(::ComputeTaskQED_V, data1::ParticleValue, data2::ParticleValue)

Compute a vertex. Preserve momentum and particle types (e + gamma->p etc.) to create resulting particle, multiply values together and times a vertex factor.

source
ComputableDAGs.computeMethod
compute(::ComputeTaskQED_S1, data::ParticleValue)

Compute inner edge (1 input particle, 1 output particle).

source