Skip to main content

Theseus, a highly-efficient inverse-design algorithm for quantum optical experiments

Project description

Theseus

Theseus, a highly-efficient inverse-design algorithm for quantum optical experiments

Installation

When published it will be possible to install via pip install. Untill then, install from source (after cloning the repository):

python setup.py install

Running Theseus

To list the included examples, type

theseus list

To run one of the included examples, type e.g.

theseus run --example ghz_346

To run your own input file, type

theseus run PATH_TO_YOUR_INPUT_FILE

Output of optimization is saved to a directory called output. Names of the subdirectorie are specified by the name and content of the config file.

To plot the graph corresponding to one result saved as a json file, execute

theseus plot PATH_TO_RESULT_FILE

To analyze a subdirectory corresponding to one run, type

theseus analyze -d outputs/ghz_346/ghz_346 

or just

theseus analyze  

then an overview of all available folders that can be selected is given. After that one can choose which run (if there exists different run-folders having different summary files) one wants to analyze. When you have decided on a state, an overview plot is created that shows the graph, the development of the loss function and various properties that can be declared via -i. With -pm a pdf can be created that shows all perfect matchings. When one wants to set all weights to plus minus one one can choose the option -one. Everthing together:

theseus analyze -d your/directory -one -pm -i 'norm' -i 'ent' -i 'k'  

norm shows the normalization of the state, ent gives information about entanglement for the different bipartitions and k gives information if there is a k-uniform state and which bipartitions are maximally entangled (=1) or separable (=0).

To get help, add the --help option to any command. For instance

> theseus run --help

Usage: theseus run [OPTIONS] FILENAME

  Run an input file.

Options:
  --example  Load input file from examples directory.
  --help     Show this message and exit.

Development

Clone repository

git clone https://github.com/artificial-scientist-lab/Theseus.git

Create virtual environment

From the project root directory, submit

python -m venv venv

This will create a subfolder with your virtual environment.

To activate, type

. venv/bin/activate

Note the leading point!

Local development installation

Submit

python setup.py develop

from the project root directory (where setup.py is located). Any changes in the code will now automatically be reflected in your local package installation.

Tests

Run test suite

Running all tests

python -m unittest discover tests

Running only the fast tests

python -m unittest discover -s tests/fast

Test coverage

Install coverage, if you have not yet done so:

pip install coverage

Then run coverage scan:

coverage run --source=theseus -m unittest discover tests 

After that, create the coverage report:

coverage report -m

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

suehtyp-1.2.3.tar.gz (59.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

suehtyp-1.2.3-py3-none-any.whl (65.1 kB view details)

Uploaded Python 3

File details

Details for the file suehtyp-1.2.3.tar.gz.

File metadata

  • Download URL: suehtyp-1.2.3.tar.gz
  • Upload date:
  • Size: 59.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.8

File hashes

Hashes for suehtyp-1.2.3.tar.gz
Algorithm Hash digest
SHA256 4504b4f84d396618145bafeca429b1aba7d6b3cebd24c5445d7c7a8e122109fb
MD5 21fb678d713c2052b6913347e04a13d0
BLAKE2b-256 afb0e263152b42b96d68ac873962bd2be12782ec1f7b5f6bc89b90a591cb63c1

See more details on using hashes here.

File details

Details for the file suehtyp-1.2.3-py3-none-any.whl.

File metadata

  • Download URL: suehtyp-1.2.3-py3-none-any.whl
  • Upload date:
  • Size: 65.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.8

File hashes

Hashes for suehtyp-1.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b8657971a1f89b26119f723e96b1b22066554597ce5e64e0b5307545c0781c92
MD5 2e72ac8fd117f885d71dbdc2526471e2
BLAKE2b-256 ddcb5250acdb0a5dfed7e59e6f89f2d728b2b9b3a11bc02ef359cb2f559c73ec

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page