-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Move the compiled eccs to a separate package
- Loading branch information
Showing
19 changed files
with
198 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
{ | ||
"tket2-py": "0.1.0a4" | ||
"tket2-py": "0.1.0a4", | ||
"tket2-eccs": "0.0.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
[tool.poetry] | ||
name = "tket2-py" | ||
version = "0.1.0a4" | ||
description = "pytket extension for the tket 2 compiler" | ||
description = "Quantinuum's TKET2 Quantum Compiler" | ||
classifiers = [ | ||
"Environment :: Console", | ||
"Programming Language :: Python :: 3.10", | ||
|
@@ -25,10 +25,12 @@ packages = [{ include = "tket2-py" }] | |
|
||
[tool.poetry.dependencies] | ||
python = "^3.10" | ||
|
||
# Note: Be sure to update the dependency versions in [project.dependencies] as well | ||
# | ||
# Poetry does not currently follow PEP 621, it will be supported on poetry 2 | ||
# https://github.com/python-poetry/poetry/issues/3332 | ||
tket2_eccs = { path = "tket2-eccs", develop = true } | ||
pytket = "1.30.0" | ||
hugr = "^0.5.0" | ||
|
||
|
@@ -68,12 +70,16 @@ maintainers = [ | |
{ name = "TKET development team", email = "[email protected]" }, | ||
] | ||
version = "0.1.0a4" | ||
description = "pytket extension for the tket 2 compiler" | ||
description = "Quantinuum's TKET2 Quantum Compiler" | ||
requires-python = ">=3.10" | ||
license = { file = "LICENCE" } | ||
|
||
# Note: Be sure to update the dependency versions in [tool.poetry.dependencies] as well | ||
dependencies = ['pytket >= 1.29.2, < 2', 'hugr >= 0.5.0, < 0.6'] | ||
dependencies = [ | ||
'pytket >= 1.29.2, < 2', | ||
'hugr >= 0.5.0, < 0.6', | ||
'tket2_eccs >= 0.1.0, < 0.2', | ||
] | ||
|
||
[project.urls] | ||
homepage = "https://github.com/CQCL/tket2" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Python wheel artifacts | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Changelog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# tket2-eccs | ||
|
||
[![pypi][]](https://pypi.org/project/tket2/) | ||
[![codecov][]](https://codecov.io/gh/CQCL/tket2) | ||
[![py-version][]](https://pypi.org/project/tket2/) | ||
|
||
[codecov]: https://img.shields.io/codecov/c/gh/CQCL/tket2?logo=codecov | ||
[py-version]: https://img.shields.io/pypi/pyversions/tket2 | ||
[pypi]: https://img.shields.io/pypi/v/tket2 | ||
|
||
This is an auxiliary Python package containing compiler rewrite sets used for `tket2`'s optimisation passes. | ||
|
||
This package is intended to be used as an internal dependency for `tket2`. | ||
See https://pypi.org/project/tket2/ for the main package. | ||
|
||
|
||
## Install | ||
|
||
TKET2-eccs can be installed via `pip`. | ||
|
||
```sh | ||
pip install tket2_eccs | ||
``` | ||
|
||
## Development | ||
|
||
See [DEVELOPMENT.md] information on how to develop and contribute to this package. | ||
|
||
[DEVELOPMENT.md]: https://github.com/CQCL/tket2/blob/main/DEVELOPMENT.md | ||
|
||
|
||
## License | ||
|
||
This project is licensed under Apache License, Version 2.0 ([LICENCE][] or http://www.apache.org/licenses/LICENSE-2.0). | ||
|
||
[LICENCE]: https://github.com/CQCL/tket2/blob/main/LICENCE |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
[tool.poetry] | ||
name = "tket2-eccs" | ||
version = "0.1.0" | ||
description = "Precompiled rewrite sets for the tket 2 compiler" | ||
classifiers = [ | ||
"Environment :: Console", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"License :: OSI Approved :: Apache Software License", | ||
"Operating System :: MacOS :: MacOS X", | ||
"Operating System :: POSIX :: Linux", | ||
"Operating System :: Microsoft :: Windows", | ||
"Intended Audience :: Developers", | ||
"Intended Audience :: Science/Research", | ||
"Topic :: Scientific/Engineering", | ||
] | ||
authors = ["TKET development team <[email protected]>"] | ||
maintainers = ["TKET development team <[email protected]>"] | ||
include = ["pyproject.toml"] | ||
license = "Apache-2.0" | ||
readme = "README.md" | ||
|
||
packages = [{ include = "tket2_eccs", from = "src" }] | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.10" | ||
|
||
[build-system] | ||
requires = ["poetry-core"] | ||
build-backend = "poetry.core.masonry.api" | ||
|
||
[project] | ||
name = "tket2_eccs" | ||
classifiers = [ | ||
"Environment :: Console", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"License :: OSI Approved :: Apache Software License", | ||
"Operating System :: MacOS :: MacOS X", | ||
"Operating System :: POSIX :: Linux", | ||
"Operating System :: Microsoft :: Windows", | ||
"Intended Audience :: Developers", | ||
"Intended Audience :: Science/Research", | ||
"Topic :: Scientific/Engineering", | ||
] | ||
authors = [ | ||
{ name = "TKET development team", email = "[email protected]" }, | ||
] | ||
maintainers = [ | ||
{ name = "TKET development team", email = "[email protected]" }, | ||
] | ||
version = "0.1.0" | ||
description = "Precompiled rewrite sets for the tket 2 compiler" | ||
requires-python = ">=3.10" | ||
license = { file = "LICENCE" } | ||
|
||
dependencies = [] | ||
|
||
[project.urls] | ||
homepage = "https://github.com/CQCL/tket2" | ||
repository = "https://github.com/CQCL/tket2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
"""`tket2-eccs` is a Python package containing compiler rewrite sets used for `tket2`'s optimisation passes. | ||
This package is intended to be used as an internal dependency for `tket2`. | ||
""" | ||
|
||
# This is updated by our release-please workflow, triggered by this | ||
# annotation: x-release-please-version | ||
__version__ = "0.1.0" | ||
|
||
from importlib import resources | ||
from pathlib import Path | ||
|
||
|
||
def nam_6_3() -> Path: | ||
"""Get the path to the included `nam_6_3.rwr` rewriter. | ||
This is a rewrite set obtained from the equivalence classes of circuits with | ||
up to 3 qubits and 6 gates on the Nam gateset, as | ||
generated by TASO. | ||
See https://dl.acm.org/doi/10.1145/3341301.3359630 | ||
""" | ||
with resources.as_file( | ||
resources.files("tket2_eccs").joinpath("data/nam_6_3.rwr") | ||
) as r: | ||
rewriter = Path(r) | ||
return rewriter |
File renamed without changes.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters