bellpolytopes.jl

Bell inequalities and local models via Frank-Wolfe algorithms

https://github.com/zib-iol/bellpolytopes.jl

Science Score: 54.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: arxiv.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.7%) to scientific vocabulary

Keywords

bell-inequalities conditional-gradients frank-wolfe local-models local-polytope

Keywords from Contributors

interpretability standardization hack
Last synced: 6 months ago · JSON representation ·

Repository

Bell inequalities and local models via Frank-Wolfe algorithms

Basic Info
  • Host: GitHub
  • Owner: ZIB-IOL
  • License: mit
  • Language: Julia
  • Default Branch: main
  • Homepage:
  • Size: 4.49 MB
Statistics
  • Stars: 6
  • Watchers: 1
  • Forks: 1
  • Open Issues: 0
  • Releases: 6
Topics
bell-inequalities conditional-gradients frank-wolfe local-models local-polytope
Created about 3 years ago · Last pushed 7 months ago
Metadata Files
Readme License Citation

README.md

BellPolytopes.jl

Dev Build Status

This package addresses the membership problem for local polytopes: it constructs Bell inequalities and local models in multipartite Bell scenarios with arbitrary settings.

The original article for which it was written can be found here:

Improved local models and new Bell inequalities via Frank-Wolfe algorithms.

Installation

The most recent release is available via the julia package manager, e.g., with

julia using Pkg Pkg.add("BellPolytopes")

or the main branch:

julia Pkg.add(url="https://github.com/ZIB-IOL/BellPolytopes.jl", rev="main")

Getting started

Let's say we want to characterise the nonlocality threshold obtained with the two-qubit maximally entangled state and measurements whose Bloch vectors form an icosahedron. Using BellPolytopes.jl, here is what the code looks like.

```julia julia> using BellPolytopes, LinearAlgebra

julia> N = 2; # bipartite scenario

julia> rho = rho_GHZ(N) # two-qubit maximally entangled state 4×4 Matrix{Float64}: 0.5 0.0 0.0 0.5 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.5 0.0 0.0 0.5

julia> measurementsvec = icosahedronvec() # Bloch vectors forming an icosahedron 6×3 Matrix{Float64}: 0.0 0.525731 0.850651 0.0 0.525731 -0.850651 0.525731 0.850651 0.0 0.525731 -0.850651 0.0 0.850651 0.0 0.525731 0.850651 0.0 -0.525731

julia> , lowerbound, upperbound, localmodel, bellinequality, _ = nonlocalitythreshold(measurements_vec, N; rho = rho);

julia> println([lowerbound, upperbound]) [0.7784, 0.7784]

julia> p = correlationtensor(measurementsvec, N; rho = rho) 6×6 Matrix{Float64}: 0.447214 -1.0 -0.447214 0.447214 0.447214 -0.447214 -1.0 0.447214 -0.447214 0.447214 -0.447214 0.447214 -0.447214 -0.447214 -0.447214 1.0 0.447214 0.447214 0.447214 0.447214 1.0 -0.447214 0.447214 0.447214 0.447214 -0.447214 0.447214 0.447214 1.0 0.447214 -0.447214 0.447214 0.447214 0.447214 0.447214 1.0

julia> finaliterate = sum(localmodel.weights[i] * localmodel.atoms[i] for i in 1:length(localmodel));

julia> norm(finaliterate - lowerbound * p) < 1e-3 # checking local model true

julia> localbound(bellinequality)[1] / dot(bell_inequality, p) # checking the Bell inequality 0.7783914488195466 ```

Under the hood

The computation is based on an efficient variant of the Frank-Wolfe algorithm to iteratively find the local point closest to the input correlation tensor. See this recent review for an introduction to the method and the package FrankWolfe.jl for the implementation on which this package relies.

In a nutshell, each step gets closer to the objective point: * either by moving towards a good vertex of the local polytope, * or by astutely combining the vertices (or atoms) already found and stored in the active set.

```julia julia> res = bellfrankwolfe(p; v0=0.8, verbose=3, callbackinterval=10^2, modelast=-1);

Visibility: 0.8 Symmetric: true #Inputs: 6 Dimension: 21

Intervals Print: 100 Renorm: 100 Reduce: 10000 Upper: 1000 Increment: 1000

Iteration Primal Dual gap Time (sec) #It/sec #Atoms #LMO 100 8.7570e-03 6.0089e-02 6.9701e-04 1.4347e+05 11 26 200 5.9241e-03 5.4948e-02 9.4910e-04 2.1073e+05 16 33 300 3.5594e-03 3.4747e-02 1.1942e-03 2.5122e+05 18 40 400 1.9068e-03 3.4747e-02 1.3469e-03 2.9697e+05 16 42 500 1.8093e-03 5.7632e-06 1.5409e-03 3.2448e+05 14 48

Primal: 1.81e-03

Dual gap: 2.60e-08 Time: 1.63e-03 It/sec: 3.28e+05 #Atoms: 14

v_c ≤ 0.778392 ```

Going further

More examples can be found in the corresponding folder of the package. They include the construction of a Bell inequality with a higher tolerance to noise as CHSH as well as multipartite instances.

Owner

  • Name: IOL Lab
  • Login: ZIB-IOL
  • Kind: organization
  • Location: Germany

Working on optimization and learning at the intersection of mathematics and computer science

Citation (CITATION.bib)

@article{DIB+23,
  title = {Improved local models and new Bell inequalities via Frank-Wolfe algorithms},
  author = {Designolle, S\'ebastien and Iommazzo, Gabriele and Besan\ifmmode \mbox{\c{c}}\else \c{c}\fi{}on, Mathieu and Knebel, Sebastian and Gel\ss{}, Patrick and Pokutta, Sebastian},
  journal = {Phys. Rev. Res.},
  volume = {5},
  issue = {4},
  pages = {043059},
  numpages = {6},
  year = {2023},
  month = {Oct},
  publisher = {American Physical Society},
  doi = {10.1103/PhysRevResearch.5.043059},
  url = {https://link.aps.org/doi/10.1103/PhysRevResearch.5.043059}
}

GitHub Events

Total
  • Create event: 3
  • Commit comment event: 2
  • Release event: 1
  • Watch event: 3
  • Delete event: 1
  • Issue comment event: 1
  • Push event: 48
Last Year
  • Create event: 3
  • Commit comment event: 2
  • Release event: 1
  • Watch event: 3
  • Delete event: 1
  • Issue comment event: 1
  • Push event: 48

Committers

Last synced: 8 months ago

All Time
  • Total Commits: 207
  • Total Committers: 5
  • Avg Commits per committer: 41.4
  • Development Distribution Score (DDS): 0.217
Past Year
  • Commits: 37
  • Committers: 1
  • Avg Commits per committer: 37.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Sébastien Designolle s****e@g****m 162
Designolle s****o@b****e 28
Mathieu Besançon m****n@g****m 15
github-actions[bot] 4****] 1
Sebastian Pokutta 2****a 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 7 months ago

All Time
  • Total issues: 3
  • Total pull requests: 9
  • Average time to close issues: 22 days
  • Average time to close pull requests: 1 day
  • Total issue authors: 3
  • Total pull request authors: 3
  • Average comments per issue: 4.33
  • Average comments per pull request: 0.22
  • Merged pull requests: 9
  • Bot issues: 0
  • Bot pull requests: 1
Past Year
  • Issues: 0
  • Pull requests: 2
  • Average time to close issues: N/A
  • Average time to close pull requests: 14 minutes
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.5
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • Ryko24 (1)
  • matbesancon (1)
  • JuliaTagBot (1)
Pull Request Authors
  • sebastiendesignolle (7)
  • matbesancon (3)
  • github-actions[bot] (1)
Top Labels
Issue Labels
Pull Request Labels