QInchworm.diagrammatics

QInchworm.diagrammatics.TopologyType
struct Topology

Datatype for strong coupling diagram topology.

A topology of order $n$ consists of a partition of the tuple $s = \{1,...,2n\}$ into $n$ pairs $\{(\pi(1), \pi(2)), ..., (\pi(2n-1), \pi(2n))\}$ where $\pi$ is a permutation of $s$. Diagrammatically, a topology can be thought of as a set of arcs connecting vertices located at $\{1,...,2n\}$. The parity of the topology is the sign of the permutation $\pi$.

Fields

  • order::Int64: Topology order $n$

  • pairs::Vector{Pair{Int64, Int64}}: List of pairs $\{(\pi(1), \pi(2)), ..., (\pi(2n-1), \pi(2n))\}$

  • parity::Int64: Parity of the permutation $\pi$

source
Base.isvalidMethod
isvalid(t::QInchworm.diagrammatics.Topology) -> Bool

Check that topology is properly constructed, i.e. that its list of pairs is derived from a permutation of 1:2order and that the parity of the permutation is correct.

source
QInchworm.diagrammatics.pair_partitionsFunction
pair_partitions(
    pairs::Vector{Pair{Int64, Int64}},
    unpaired::Vector{Int64}
) -> Vector{Vector{Pair{Int64, Int64}}}

Given a vector of pairs representing a partial partition of the vertices and a vector of unpaired vertices, return a vector of complete partitions.

source
pair_partitions(
    vertices::Vector{Int64}
) -> Vector{Vector{Pair{Int64, Int64}}}

Return all possible partitions of an even number of vertices into pairs.

source
pair_partitions(
    n::Int64
) -> Vector{Vector{Pair{Int64, Int64}}}

Return all partitions of $\{1,\ldots,2n\}$ into $n$ pairs.

source
QInchworm.diagrammatics.iscrossingFunction
iscrossing(
    p1::Pair{Int64, Int64},
    p2::Pair{Int64, Int64}
) -> Bool

Return true if two arcs cross.

Let $p_1 = (a_1, b_1)$, $p_2 = (a_2, b_2)$ represent two arcs, where without loss of generality we assume $a_1 < b_1$ and $a_2 < b_2$. Now consider the order of the points $\{a_1, b_1, a_2, b_2\}$. The orderings $a_1 b_1 a_2 b_2$, $a_1 a_2 b_2 b_1$, $a_2 b_2 a_1 b_1$ are all non-crossing while $a_1 a_2 b_1 b_2$ and $a_2 a_1 b_2 b_1$ are crossing.

source
QInchworm.diagrammatics.traverse_crossing_graph_dfs!Function
traverse_crossing_graph_dfs!(
    connected::Vector{Pair{Int64, Int64}},
    disconnected::Vector{Pair{Int64, Int64}}
)

Given a vector of connected arcs and a vector of disconnected arcs recursively add disconnected to connected if they cross with any connected. This is done by traversing the crossing graph using depth first search.

source
QInchworm.diagrammatics.is_k_connectedFunction
is_k_connected(
    t::QInchworm.diagrammatics.Topology,
    k::Int64
) -> Bool

Given a topology, check if every connected component of the graph induced by crossings between the arcs contains a pair with an element <= k.

source
QInchworm.diagrammatics.split_k_connectedFunction
split_k_connected(
    pairs::Vector{Pair{Int64, Int64}},
    k::Int64
) -> Tuple{Vector{Pair{Int64, Int64}}, Vector{Pair{Int64, Int64}}}

Given a vector of integer pairs, split it into a connected set containing pairs with an element <= k and a disconnected set containing the rest.

source
QInchworm.diagrammatics.is_doubly_k_connectedFunction
is_doubly_k_connected(
    p::Pair{Int64, Int64},
    k::Int64
) -> Bool

Return true if a given integer pair has one element <= k and the other element > k.

source
is_doubly_k_connected(
    t::QInchworm.diagrammatics.Topology,
    k::Int64
) -> Bool

Given a topology, check if every connected component of the graph induced by crossings between the arcs contains a pair with one element <= k and the other element > k.

source
QInchworm.diagrammatics.split_doubly_k_connectedFunction
split_doubly_k_connected(
    pairs::Vector{Pair{Int64, Int64}},
    k::Int64
) -> Tuple{Vector{Pair{Int64, Int64}}, Vector{Pair{Int64, Int64}}}

Given a vector of integer pairs, split it into a connected set containing pairs with one element <= k and the other element > k, and a disconnected set containing the rest.

source
QInchworm.diagrammatics.generate_topologies_implFunction
generate_topologies_impl(
    topology_partial::QInchworm.diagrammatics.Topology,
    unpaired::Vector{Int64}
) -> Vector{QInchworm.diagrammatics.Topology}

Given a partial topology and a vector of unpaired vertices, return a vector of complete topologies, efficiently computing the permutation sign.

source
QInchworm.diagrammatics.get_topologies_at_orderFunction
get_topologies_at_order(
    order::Int64;
    ...
) -> Vector{QInchworm.diagrammatics.Topology}
get_topologies_at_order(
    order::Int64,
    k;
    with_external_arc
) -> Vector{QInchworm.diagrammatics.Topology}

Return topologies of a given order. If k is specified, then only the doubly k-connected topologies are returned. With with_external_arc set to true parity of the returned topologies is computed as if an extra arc overarching the last 2order - k vertices was present.

source