Adjacency Decomposition

BellScenario.LocalPolytope.adjacency_decompositionFunction
adjacenecy_decomposition(
    vertices :: Vector{Vector{Int64}},
    BG_seed :: BellGame,
    scenario :: LocalSignaling;
    kwargs...
) :: Dict

Given a polytpe represented by vertices, returns the complete set of canonical facets for prepare and measure scenario scenario. The adjacencydecomposition algorithm requires a seeded vertex which is supplied with the `BGseed` argument. Facets are returned in the lexicographic normal form.

Returned Dictionary Format

Returns a dictionary where the keys are canonical BellGames and the value is a dictionary with keys

  • "considered" => true, if the facet was considered in the algorithm.
  • "skipped" => true, if the facet was skipped (not considered).
  • "num_vertices" => number of vertices.
  • "norm_facet" => facet vector representative (normalized rep) of canonical game

Keyword Arguments: kwargs...

  • skip_games = [] :: Vector{BellGame} - List of games to skip.
  • max_vertices = 100 :: Int64 - The maximum number of vertices to allow in target facets.
  • dir = "./" :: String- Directory in which to createporta_tmp/and.json` files.
  • log = false :: Bool - If true, the facet dictionary is written to .json each iteration.
  • log_filename = "adjacency_decomposition_now.json" :: String
source
BellScenario.LocalPolytope.adjacent_facetsFunction
adjacent_facets(
    vertices :: Vector{Vector{Int64}},
    F :: Vector{int64};
    dir = "./" :: String,
    cleanup = true ::Bool
) :: Vector{Vector{Int64}}

For the polytope represented by vertices, returns the set of facets adjacent to F.

Facet vector F and the return facet vectors are assumed to ba in the normalized subspace.

The dir argument specifies where to where to write files and directories from XPORTA.jl. If cleanup is true, then a porta_tmp directory is created as a subdirectory of dir.

If cleanup is false, the created porta_tmp directory is not removed.

source
BellScenario.LocalPolytope.rotate_facetFunction
rotate_facet(
    F :: Vector{Int64},
    G :: Vector{Int64},
    xbar :: Vector{Int64}
) :: Vector{Int64}

Performs a rotation of facet F relative to non-included vertex xbar and returns the rotated facet vector. F is a polytope facet, G is a subfacet of F and xbar is a vertex not contained by F. By construction, the rotated facet contains xbar.

source