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_sais 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 theSA+ILPalgorithm. We use it to find MERs for graphs up to 16 vertices.edm_ilp.pyis the source code for theSA+ILPalgorithm that implements the ILP part of theSA+ILPalgorithm
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.pyandgen_er.pyfiles respectively. - Run edge-minimisation of BD and ER graph using
edm_bd_opt.pyandedm_bd_opt.pyfiles respectively. plot_bd.pyandplot_er.pyfiles for plotting the results for BD and ER graphs respectively.- The files that start with
grgs_sampling.pyis for sampling gRGS.grgs_comparison.pyis to analyse and plot the effects of varying fusion probabilities on the resources required to create a gRGS state. weighted_edm.pyshows 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 and should be put in the folder
edge_minimisation so that the python files can access the data.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f545f7c4440a543e65174bd813b722fc068a2dced3bdd24578c67f9cef1cfc6b
|
|
| MD5 |
be4c5e9b9ccc5d23905c53d6d772467e
|
|
| BLAKE2b-256 |
42203b989b95e2b7109e3b8dec0f4f15724e79cea6cf98aadeb100f01c5fc1d0
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
066cbe0a002a7a9f8c5663389b0d41669ee3a410b06c4fc009a2130b3d7ff946
|
|
| MD5 |
29f9dd47b5a8d98b8a47ea51121890c9
|
|
| BLAKE2b-256 |
8aa5aacfb7167bf74154d004ecd26e09d58c3c0a21439bea0e9ed42b6508e8ba
|