Skip to content

Commit

Permalink
Merge pull request #5 from ChitambarLab/v0.1.1
Browse files Browse the repository at this point in the history
V0.1.1
  • Loading branch information
bdoolittle authored Feb 27, 2021
2 parents d25509d + 94631ca commit dedc2d1
Show file tree
Hide file tree
Showing 35 changed files with 1,064 additions and 322 deletions.
7 changes: 2 additions & 5 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Documentation: https://github.com/JuliaCI/Appveyor.jl
environment:
matrix:
- julia_version: 1.4
- julia_version: 1
platform:
- x64
cache:
Expand All @@ -24,7 +24,4 @@ build_script:
- C:\julia\bin\julia -e "%JL_BUILD_SCRIPT%"
test_script:
- echo "%JL_TEST_SCRIPT%"
- C:\julia\bin\julia -e "%JL_TEST_SCRIPT%"
on_success:
- echo "%JL_CODECOV_SCRIPT%"
- C:\julia\bin\julia -e "%JL_CODECOV_SCRIPT%"
- C:\julia\bin\julia -e "%JL_TEST_SCRIPT%
2 changes: 1 addition & 1 deletion CITATION.bib
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ @misc{SignalingDimension.jl
title = {{S}ignaling{D}imension.jl},
howpublished = {\url{https://github.com/ChitambarLab/SignalingDimension.jl}},
url = {https://github.com/ChitambarLab/SignalingDimension.jl},
version = {v0.1.0},
version = {v0.1.1},
year = {2021},
month = {2}
}
8 changes: 1 addition & 7 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "SignalingDimension"
uuid = "96aab1c2-4ac7-11eb-3d9a-a59b97fb3321"
authors = ["Brian Doolittle <brian.d.doolittle@gmail.com>"]
version = "0.1.0"
version = "0.1.1"

[deps]
BellScenario = "4e58fcc1-4405-48af-b0f2-42df636d9190"
Expand All @@ -14,9 +14,3 @@ julia = "1"
BellScenario = "0.1"
Combinatorics = "1.0"
QBase = "0.1"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Test"]
14 changes: 5 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@

*Certify the classical simulation cost of black-box systems.*

This Julia package is the software companion piece to [Certifying the Classical Simulation Cost of a Quantum Channel](broken link).
This Julia package is the software companion piece to [Certifying the Classical Simulation Cost of a Quantum Channel](https://arxiv.org/abs/2102.12543).

[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://ChitambarLab.github.io/SignalingDimension.jl/dev/)
| Documentation |
|:-------------:|
|[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://ChitambarLab.github.io/SignalingDimension.jl/dev/)|

## Features:
* Tools to compute signaling correlations and polytopes.
Expand All @@ -26,12 +28,6 @@ of this documentation.

## Quick Start

Note: Until SignalingDimension.jl is registered, add the package by typing `]` to enter `pkg>` mode and entering

```julia
pkg> add https://github.com/ChitambarLab/SignalingDimension.jl.git
```

* Install Julia: [https://julialang.org/downloads/](https://julialang.org/downloads/)
* Add the SignalingDimension.jl package (run from julia prompt):

Expand All @@ -52,7 +48,7 @@ julia> using Pkg; Pkg.add("QBase")
* `docs/` - [Documentation](https://chitambarlab.github.io/SignalingDimension.jl/dev/) source code.
* `src/` - Software for certifying signaling dimension.
* `test/` - Unit tests for code in `src/`.
* `script/` - Code for data computation and verification.
* `script/` - Scripts for computing signaling polytopes and verifying tight Bell inequalities.

## Citing

Expand Down
4 changes: 4 additions & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
[deps]
BellScenario = "4e58fcc1-4405-48af-b0f2-42df636d9190"
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
QBase = "e52e8ede-12bf-4731-8af7-b01f6064cb11"
Suppressor = "fd094767-a336-5f1f-9728-57cf17d0bbfb"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[compat]
BellScenario = "0.1"
Expand Down
6 changes: 5 additions & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@ using Documenter
using BellScenario
using QBase

include("../script/utilities.jl")
using .ScriptUtilities

makedocs(;
modules=[SignalingDimension],
modules=[SignalingDimension, ScriptUtilities],
authors="Brian Doolittle <brian.d.doolittle@gmail.com> and contributors",
repo="https://github.com/ChitambarLab/SignalingDimension.jl/blob/{commit}{path}#L{line}",
sitename="SignalingDimension.jl",
Expand All @@ -23,6 +26,7 @@ makedocs(;
],
"Bell Inequalities" => "bell_inequalities.md",
"Certifying Signaling Dimension" => "certifying_signaling_dimension.md",
"Script Utilities" => "script_utilities.md",
],
)

Expand Down
Binary file modified docs/src/assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/src/background/signaling_dimension.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ The signaling dimension is defined with respect to the observed signaling
correlations and requires no assumptions to be made about the communication process.
Hence the signaling dimension is a device-independent metric.
The signaling dimension of quantum channels is elaborated upon in
[Certifying the Classical Simulation Cost of a Quantum Channel](broken link).
[Certifying the Classical Simulation Cost of a Quantum Channel](https://arxiv.org/abs/2102.12543).

## Classical Simulation Cost

Expand Down
30 changes: 25 additions & 5 deletions docs/src/bell_inequalities.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ If they are able to score higher than ``\gamma``, then Alice and Bob "win" the g

We now discuss a subset of general Bell inequalities for signaling polytopes.
Further details about these inequalities are provided in
[Certifying the Classical Simulation Cost of a Quantum Channel](broken link).
[Certifying the Classical Simulation Cost of a Quantum Channel](https://arxiv.org/abs/2102.12543).

```@docs
k_guessing_game
Expand Down Expand Up @@ -67,7 +67,7 @@ Data is provided in two formats:

## Theoretical Facets

The following list of Bell inequalities are proven to be tight in [Certifying the Classical Simulation Cost of a Quantum Channel](broken link).
The following list of Bell inequalities are proven to be tight in [Certifying the Classical Simulation Cost of a Quantum Channel](https://arxiv.org/abs/2102.12543).
Each of the following methods constructs a canonical facet for the signaling polytope ``\mathcal{C}_d^{X \to Y}``.
The constructed facet inequalities are represented using the `BellScenario.BellGame` type.
All row and column permutations of facets are also facets of ``\mathcal{C}_d^{X \to Y}``.
Expand All @@ -85,9 +85,16 @@ non_negativity_facet

To verify the tightness of a Bell inequality, ``X(Y-1)`` affinely independent
vertices must be found to satisfy ``\gamma = \langle \mathbf{G}, \mathbf{V} \rangle``.
We demonstrate these enumerations for the set of facets described above.
The [`test/unit/affinely_independent_enumerations.jl`](https://github.com/ChitambarLab/SignalingDimension.jl/blob/master/test/unit/affinely_independent_enumerations.jl)
verify that each of these enumerations scale across a wide range of scenarios.
This procedure is facilitated by the following method.

```@docs
verify_facet
```

To apply `verify_facet`, a Bell inequality and set of affinely independent vertices
are required.
For each cataloged signaling polytope facet, an enumeration of
affinely independent vertices that saturate the Bell inequality is provided.

```@docs
aff_ind_maximum_likelihood_vertices
Expand All @@ -97,3 +104,16 @@ aff_ind_coarse_grained_input_ambiguous_guessing_vertices
aff_ind_anti_guessing_vertices
aff_ind_k_guessing_vertices
```

These enumerations are used to verify the tight Bell inequalities above over a
broad range of signaling polytopes.
These facet verifications are performed in the
[`script/facet_verifications/`](https://github.com/ChitambarLab/SignalingDimension.jl/tree/master/script/facet_verifications)
directory.
Each verification runs as a script and prints the results to a `.txt` file or `STDOUT`.
By default the scripts do not require arguments.
The default parameter are set to run the test over several minutes.
Arguments vary slightly for each script so refer to individual scripts for more details
about their command line arguments and default parameters.
For more details on how to run the scripts and interpret their results please refer
to the [Script Utilities](@ref) section.
2 changes: 1 addition & 1 deletion docs/src/certifying_signaling_dimension.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ In general cases, it is difficult derive these Bell inequalities and test them a
Despite this challenge, the signaling dimension can be bounded.
We now provide methods that efficiently compute upper and lower bounds on the signaling
dimension.
For more details please refer to our work [Certifying the Classical Simulation Cost of a Quantum Channel](broken link).
For more details please refer to our work [Certifying the Classical Simulation Cost of a Quantum Channel](https://arxiv.org/abs/2102.12543).

## Bounds

Expand Down
25 changes: 16 additions & 9 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ CurrentModule = SignalingDimension

*Certify the classical simulation cost of black-box systems.*

This Julia software package is the companion piece to [Certifying the Classical SImulation Cost of a Quantum Channel](broken link).
This Julia software package is the companion piece to [Certifying the Classical Simulation Cost of a Quantum Channel](https://arxiv.org/abs/2102.12543).

## Package Overview

Expand All @@ -20,15 +20,15 @@ Our computed facets of the signaling polytope are found in the [`data/`](https:/
directory. Please review the [Computed Facets](@ref) section for details regarding
individual data sets.

## Facet Verifications

## Quick Start

!!! warning "Package Registration in Progress"
Until SignalingDimension.jl is registered add the package typing `]` to enter `pkg>` mode and enter
This work provides scripts that verifies the tightness of the Bell inequalities
described in the [Bell Inequalities](@ref) section.
These scripts and their results are found in the [`script/facet_verifications/`](https://github.com/ChitambarLab/SignalingDimension.jl/tree/master/script/facet_verifications)
directory.
Please refer to the [Verification of Theoretical Facets](@ref) section for more details.

```julia
pkg> add https://github.com/ChitambarLab/SignalingDimension.jl.git
```
## Quick Start

* Install Julia: [https://julialang.org/downloads/](https://julialang.org/downloads/)
* Add the SignalingDimension.jl package (run from julia prompt):
Expand All @@ -47,7 +47,14 @@ julia> using Pkg; Pkg.add("QBase")
## Contents

```@contents
Pages = ["background/signaling_correlations.md", "background/signaling_polytopes.md", "background/signaling_dimension.md", "bell_inequalities.md", "certifying_signaling_dimension.md"]
Pages = [
"background/signaling_correlations.md",
"background/signaling_polytopes.md",
"background/signaling_dimension.md",
"bell_inequalities.md",
"certifying_signaling_dimension.md",
"script_utilities.md",
]
Depth = 2
```

Expand Down
32 changes: 32 additions & 0 deletions docs/src/script_utilities.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Script Utilities

A `ScriptUtilities` module is provided in the `./script` directory to assist with
running scripts and logging the results.
This module is treated as separate from SignalingDimension.jl because it includes
several dependencies not needed for the functionality in SignalingDimension.jl.

## Running Scripts

The scripts require a few dependencies to run. The most stable way to run these scripts
goes as follows:
* clone this project's git repo and navigate to the root directory `SignalingDimension.jl/`.
* From the project root directory, open a Julia REPL by running the `julia` command.
* Enter `Pkg` mode by entering `]` in the Julia REPL.
* In `Pkg` mode run `pkg> develop --local .` to import the local version of SignalingDimension.jl.
* In `Pkg` mode run `pkg> activate script` to load the script dependencies.
* Hit backspace to exit `Pkg` mode and return to the Julia REPL.
* Finally, run the script with `ARGS = ["--arg1", "value1", "--arg2"]; include("./script/path/to/script.jl")`.

!!! note "Note"
The `ARGS` array contains string values of positional argument, key-value pairs,
and flags that would be passed in the command line.
To run the same command from the command line, one could alternatively call
`$ julia ./script/path/to/script.jl --arg1 value1 --arg2`.
However, care must be taken to ensure that all dependencies are properly installed.

## Printing Test Results

```@docs
print_test_results
capture_test
```
12 changes: 12 additions & 0 deletions script/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[deps]
ArgParse = "c7e460c6-2fb9-53a9-8c5b-16f535851c63"
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
SignalingDimension = "96aab1c2-4ac7-11eb-3d9a-a59b97fb3321"
Suppressor = "fd094767-a336-5f1f-9728-57cf17d0bbfb"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[compat]
ArgParse = "1.1"
Suppressor = "0.2"
julia = "1"
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Version :

Status `~/.julia/dev/SignalingDimension.jl/script/Project.toml`
[96aab1c2] SignalingDimension v0.1.1 [`..`]

Test Completed : 2021-02-27T09:09:37.436
Elapsed Time : 540.417890703
Test Method : verify_ambiguous_guessing_facet
Test Args : (45)
Test Pass : true

Test Summary: | Pass Total
Testing all maximum likelihood facets with `Y ∈ [4, 45]` or less. | 903 903

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Version :

Status `~/.julia/dev/SignalingDimension.jl/script/Project.toml`
[96aab1c2] SignalingDimension v0.1.1 [`..`]

Test Completed : 2021-02-27T09:18:37.945
Elapsed Time : 866.942732493
Test Method : verify_anti_guessing_facet
Test Args : (35)
Test Pass : true

Test Summary: | Pass Total
Testing all anti-guessing facets of size `(35, 35)` or less. | 5984 5984

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Version :

Status `~/.julia/dev/SignalingDimension.jl/script/Project.toml`
[96aab1c2] SignalingDimension v0.1.1 [`..`]

Test Completed : 2021-02-27T09:33:04.944
Elapsed Time : 1437.52935996
Test Method : verify_k_guessing_facet
Test Args : (12)
Test Pass : true

Test Summary: | Pass Total
Testing all k-guessing facets with `k > 2`, `d > 2`, and `Y ≤ 12`. | 28 28

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Version :

Status `~/.julia/dev/SignalingDimension.jl/script/Project.toml`
[96aab1c2] SignalingDimension v0.1.1 [`..`]

Test Completed : 2021-02-27T09:57:02.511
Elapsed Time : 555.922374002
Test Method : verify_k_guessing_facet_d2
Test Args : (24)
Test Pass : true

Test Summary: | Pass Total
Testing all k-guessing facets with `k = 2` and `Y ≤ 24`. | 21 21

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Version :

Status `~/.julia/dev/SignalingDimension.jl/script/Project.toml`
[96aab1c2] SignalingDimension v0.1.1 [`..`]

Test Completed : 2021-02-27T10:06:18.557
Elapsed Time : 404.073366936
Test Method : verify_k_guessing_facet_k2
Test Args : (24)
Test Pass : true

Test Summary: | Pass Total
Testing all k-guessing facets with `k = 2` and `Y ≤ 24`. | 21 21

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Version :

Status `~/.julia/dev/SignalingDimension.jl/script/Project.toml`
[96aab1c2] SignalingDimension v0.1.1 [`..`]

Test Completed : 2021-02-27T10:13:02.68
Elapsed Time : 594.467665107
Test Method : verify_maximum_likelihood_facet
Test Args : (45)
Test Pass : true

Test Summary: | Pass Total
Testing all maximum likelihood facets of size `(45, 45)` or less. | 946 946

Loading

2 comments on commit dedc2d1

@bdoolittle
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/30925

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.1.1 -m "<description of version>" dedc2d1a46861be3c3c2788ca5b44684b3780ef1
git push origin v0.1.1

Please sign in to comment.