Skip to main content

Package for graph-state-optimisation

Project description

Installation

Package is available on pypi and can be installed with pip install graphstate-opt.

Optional additional requirements

MOSEK could be used for solving the ILP formulation. MOSEK requires an additional step of download and activation of license file. Mosek can be installed via pip install mosek or pip install "graphstate-opt[mosek]". Information about mosek license can be found here: https://docs.mosek.com/11.0/licensing/quickstart.html.

Codes for finding the MER for a given input graph

The folder optimizer has all the files for optimisation
edm_sa.py and edm_sa_ilp.py are the two files that can be used to find the MERs. They take in: G_in: a networkx graph, k_max: maximum iterations and initial_temp: the initial temperature.

  • edm_sa is the function for implementing simulated annealing approach for finding MERs. This is a heuristic algorithm that can go up to graphs with 100 vertices.
  • edm_sa_ilp(G_in, k_max, temp) is the function for running the SA+ILP algorithm. We use it to find MERs for graphs up to 16 vertices.
  • edm_ilp.py is the source code for the SA+ILP algorithm that implements the ILP part of the SA+ILP algorithm

Edge-minimisation folder

The edge minimisation folder contains the files that can be used to

  • Generate bounded-degree (BD) and Erdos-Renyi (ER) graphs using gen_bd.py and gen_er.py files respectively.
  • Run edge-minimisation of BD and ER graph using edm_bd_opt.py and edm_bd_opt.py files respectively.
  • plot_bd.py and plot_er.py files for plotting the results for BD and ER graphs respectively.
  • The files that start with grgs_sampling.py is for sampling gRGS. grgs_comparison.py is to analyse and plot the effects of varying fusion probabilities on the resources required to create a gRGS state.
  • weighted_edm.py shows a use case of the weighted-edge minimization for distributing graph states in a network. It shows the input graph and the final optimized graph

The tutorial file

tutorial-1.ipynb is the file that shows how the aforementioned functions could be used to find MERs. It plots the input graph, approximate MER from SA and the exact MER from SA+ILP. It also prints the runtime of the SA+ILP and ILP algorithms.

Data files

Data files can be found at DOI and should be put in the folder edge_minimisation so that the python files can access the data.

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

graphstate_opt-1.1.4.tar.gz (354.1 kB view details)

Uploaded Source

Built Distribution

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

graphstate_opt-1.1.4-py3-none-any.whl (18.9 kB view details)

Uploaded Python 3

File details

Details for the file graphstate_opt-1.1.4.tar.gz.

File metadata

  • Download URL: graphstate_opt-1.1.4.tar.gz
  • Upload date:
  • Size: 354.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for graphstate_opt-1.1.4.tar.gz
Algorithm Hash digest
SHA256 aa179bb43a2fc7080e778204c3edb57dfeb2c86d8ebf3f6815121fcd9ce3313c
MD5 8ef1e71826d2c728aca654882791a016
BLAKE2b-256 32a5a0e21abbb3636e814575a1bf9cebe26d0a070b083d9746335bedd081b30f

See more details on using hashes here.

File details

Details for the file graphstate_opt-1.1.4-py3-none-any.whl.

File metadata

  • Download URL: graphstate_opt-1.1.4-py3-none-any.whl
  • Upload date:
  • Size: 18.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for graphstate_opt-1.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 ae8b986470befea38d61c9b40d0d199df00e188d6dcce747ff18c22849138d61
MD5 09e5822645ee351b042cdcc133b18012
BLAKE2b-256 f77cff96c40515553ae675648b71e3fdba987201875e317374d8b1895563d70c

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