Skip to main content

Package for graph-state-optimisation

Project description

Installation

Package is available on pypi and can be intalled with pip install gso.

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 "gso[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_SimAnnealing is the class 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.3.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.3-py3-none-any.whl (18.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: graphstate_opt-1.1.3.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.3.tar.gz
Algorithm Hash digest
SHA256 51ef1390a713805e977c10c5cd9db5c771bb3a46bd7334a22fbfd9f7ca7c28b6
MD5 b9bdbc7789a2ac09d516c1a47b4a2ec7
BLAKE2b-256 8a932253c980770676052857dcf70e3e59f252c0d97a917fd22d06fc7ae2fb80

See more details on using hashes here.

File details

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

File metadata

  • Download URL: graphstate_opt-1.1.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9e1ac2c013e0f809c2cdcc445e70c8e4ba26f2d08fe647344433d83c0c9a7a63
MD5 e86fd7812718ca5fbd09dd2b1c760517
BLAKE2b-256 9d5b2512f799de59da3b52570a97f1d4042695eb11a1a2dbc9fd587ad88cc5da

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