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.5.tar.gz (348.0 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.5-py3-none-any.whl (20.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: graphstate_opt-1.1.5.tar.gz
  • Upload date:
  • Size: 348.0 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.5.tar.gz
Algorithm Hash digest
SHA256 f545f7c4440a543e65174bd813b722fc068a2dced3bdd24578c67f9cef1cfc6b
MD5 be4c5e9b9ccc5d23905c53d6d772467e
BLAKE2b-256 42203b989b95e2b7109e3b8dec0f4f15724e79cea6cf98aadeb100f01c5fc1d0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: graphstate_opt-1.1.5-py3-none-any.whl
  • Upload date:
  • Size: 20.5 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 066cbe0a002a7a9f8c5663389b0d41669ee3a410b06c4fc009a2130b3d7ff946
MD5 29f9dd47b5a8d98b8a47ea51121890c9
BLAKE2b-256 8aa5aacfb7167bf74154d004ecd26e09d58c3c0a21439bea0e9ed42b6508e8ba

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