https://github.com/cqcl/pytket-dqc
Science Score: 36.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
✓Academic publication links
Links to: arxiv.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (16.2%) to scientific vocabulary
Repository
Basic Info
- Host: GitHub
- Owner: CQCL
- License: apache-2.0
- Language: Python
- Default Branch: main
- Size: 2.53 MB
Statistics
- Stars: 12
- Watchers: 8
- Forks: 2
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
pytket-dqc
Automated entanglement-efficient distribution of quantum circuits.
Table of Contents
About
This package takes a quantum circuit and network description and produces a circuit distributed across the given network, using entanglement-assisted local operations and classical communication to implement non-local gates in the circuit, with the aim of reducing the amount of entanglement required for the circuit implementation. A more in-depth presentation of the methods implemented here can be found in the corresponding paper "Distributing circuits over heterogeneous, modular quantum computing network architectures".
Here we detail the steps required to install pytket-dqc. More thorough documentation of it use can be found here
You may also find the example Jupyter notebooks in examples/ instructive.
Requirements
In addition to specified Python packages that will automatically be installed when you install pytket-dqc,
the following packages are also required.
We provide installation steps for MacOS,
but they should apply just the same for Linux systems by replacing brew with your package manager
(e.g. apt for Debian/Ubuntu users).
CMake
This is required for building KaHyPar. Please refer to Building KaHyPar for more details.
Installation Steps
1. `brew install cmake`KaHyPar (with Python interface)
This is required for the hypergraph partitioning methods used in pytket-dqc.
Note that continuous integration tests are run with v1.3.2, released with this commit and we recommend you use that version.
We use an experimental feature from KaHyPar that let us select a different maximum weight for each block of the partition (i.e. a different qubit capacity for each server). The python interface for this feature was added in this commit. It looks like KaHyPar >1.2.1 is the least requirement for this feature. If KaHyPar is built from their repository (following the instructions given below), this feature is automatically available.
Boost
[KaHyPar requires Boost.Program_options](https://github.com/kahypar/kahypar#requirements). If you do not have Boost installed then you can: - Install it (see [here](https://www.boost.org/doc/libs/1_78_0/tools/build/doc/html/index.html#bbv2.installation)) - Add the flag `-DKAHYPAR_USE_MINIMAL_BOOST=ON` to the command given in Step 4 below.Installation Steps
1. Navigate to the directory where you wish to download and build KaHyPar. For instance, `cd ~` will do so in your home directory, which is probably fine for most people. The location of this directory is up to you and it will not affect installation. 2. Clone the repository (using HTTPS, since the SSH link to the repository seems to be broken): ``` git clone --depth=1 --recursive https://github.com/kahypar/kahypar.git ``` 3. Create and move to the build directory: ``` mkdir kahypar/build && cd kahypar/build ``` 4. Build KaHyPar ``` cmake ../ -DCMAKE_BUILD_TYPE=RELEASE -DKAHYPAR_PYTHON_INTERFACE=1 ``` 5. Build KaHyPar's Python interface: ``` cd python make ``` 6. Copy the dynamic library to the appropriate path so that Python can import the kahypar module and use its contents: ``` cp kahypar*.soTest KaHyPar
You should now be able to use KaHyPar in Python. To test this, in your terminal open a Python 3 shell with command `python3` and then do `import kahypar`. If this fails then Python cannot access the dynamic library (the `.so` file). If you get such an error it is likely something went wrong in step 6 from the instructions above, i.e. the `.so` file was not copied to the right directory, or the wrong `.so` file was copied.Troubleshooting
I got an error when building KaHyPar! (Step 4)
If an error occurs it might be that you do not have the Boost library installed in your computer. You may choose to install it yourself (your package manager is likely able to do it for you, e.g. `brew install boost`) or ask CMake to fetch the minimal requirements and install them using the following command instead of the one given in Step 4 ``` cmake ../ -DCMAKE_BUILD_TYPE=RELEASE -DKAHYPAR_PYTHON_INTERFACE=1 -DKAHYPAR_USE_MINIMAL_BOOST=ON ``` Note that the `-DKAHYPAR_USE_MINIMAL_BOOST=ON` flag is used. It may not be possible to get it to play nicely with an already present installation of boost. SeeMy terminal is telling me `kahypar.so` doesn't exist when I try to copy it! (Step 6)
Try to find a file in the directory `kahypar/build/python` with the extension `.so` and copy that instead. You do not need to rename the file.Graphviz
This package is used for graph visualisation.
Installation Steps
1. `brew install graphviz` 1. `pip install --global-option=build_ext --global-option="-I/opt/homebrew/include/" --global-option="-L/opt/homebrew/lib/graphviz" pygraphviz`Installing pytket-dqc
- Ensure that CMake, KaHyPar, and Graphviz are installed. See above for guidance on this.
- In your terminal, navigate to the directory you wish to download
pytket-dqc's source files to. (If unsure, thencd ~is probably fine.) - Clone this repository with
git clone git@github.com:CQCL/pytket-dqc.git. - Navigate to the cloned repository
cd pytket-dqc. - Run
pip install .
Testing pytket-dqc
You may wish to test your installation has succeeded.
You can do this by running pip install pytest to install pytest.
Then running pytest tests -m "not high_compute from the directory that these source files were git cloned to.
(The additional flag skips tests that will take a long time.)
Assuming that all the tests pass then you have succeeded in installing pytket-dqc!
Contributing
If you wish to contribute to the development of pytket-dqc (which would be extremely welcome!),
you can do so by creating a branch and submitting a PR.
For code consistency, we'd ask you to include type annotations on your code,
and ensure that your code conforms to standards set by flake8 (with a line length of 79 characters).
This will be checked automatically on any PRs submitted to this project, by mypy and flake8 respectively.
Owner
- Name: Cambridge Quantum
- Login: CQCL
- Kind: organization
- Location: Cambridge, UK
- Website: http://www.cambridgequantum.com
- Repositories: 48
- Profile: https://github.com/CQCL
Quantum Software and Technologies
GitHub Events
Total
- Issues event: 3
- Watch event: 4
- Delete event: 31
- Issue comment event: 13
- Push event: 118
- Pull request review comment event: 2
- Pull request review event: 34
- Pull request event: 64
- Fork event: 2
- Create event: 30
Last Year
- Issues event: 3
- Watch event: 4
- Delete event: 31
- Issue comment event: 13
- Push event: 118
- Pull request review comment event: 2
- Pull request review event: 34
- Pull request event: 64
- Fork event: 2
- Create event: 30
Issues and Pull Requests
Last synced: 10 months ago
All Time
- Total issues: 2
- Total pull requests: 161
- Average time to close issues: 7 months
- Average time to close pull requests: 9 days
- Total issue authors: 2
- Total pull request authors: 4
- Average comments per issue: 2.0
- Average comments per pull request: 0.64
- Merged pull requests: 140
- Bot issues: 0
- Bot pull requests: 53
Past Year
- Issues: 1
- Pull requests: 63
- Average time to close issues: 13 days
- Average time to close pull requests: 3 days
- Issue authors: 1
- Pull request authors: 2
- Average comments per issue: 1.0
- Average comments per pull request: 0.35
- Merged pull requests: 49
- Bot issues: 0
- Bot pull requests: 53
Top Authors
Issue Authors
- DmitriyFilippov (1)
- DavideFrr (1)
Pull Request Authors
- dependabot[bot] (53)
- daniel-mills-cqc (47)
- PabloAndresCQ (39)
- tim-forrer (22)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- actions/checkout v3 composite
- actions/checkout v2 composite
- actions/configure-pages v3 composite
- actions/deploy-pages v2 composite
- actions/setup-python v2 composite
- actions/upload-artifact v2 composite
- actions/upload-pages-artifact v1 composite
- jwlawson/actions-setup-cmake v1.12 composite
- actions/cache v3 composite
- actions/checkout v2 composite
- actions/setup-python v2 composite
- actions/upload-artifact v2 composite
- jwlawson/actions-setup-cmake v1.12 composite
- celluloid >=0.2, <0.3
- decorator >=5.1.0, <5.2
- hypernetx >=1.2, <2.5
- igraph >=0.11.8, <0.12
- importlib_resources >=5.7.1, <5.8
- numpy >=1.26, <2.3
- pygraphviz >=1.14, <1.15
- pytket >=1.31, <2.1
- pytket-pyzx >=0.24.0, <0.25
- pyzx >=0.7.0, <0.8