Skip to content

Commit

Permalink
split pyquil into python package and rust core
Browse files Browse the repository at this point in the history
  • Loading branch information
MarquessV committed Mar 24, 2024
1 parent 505b5a8 commit f11b491
Show file tree
Hide file tree
Showing 81 changed files with 2,216 additions and 1,922 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -190,3 +190,8 @@ fabric.properties


node_modules/


# Added by cargo

/target
32 changes: 31 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

84 changes: 78 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
[project]
name = "pyquil"
requires-python = ">=3.8"
classifiers = [
"Programming Language :: Rust",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]

[tool.poetry]
name = "pyquil"
version = "4.8.0"
Expand All @@ -12,7 +28,6 @@ classifiers = [
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Operating System :: OS Independent",
]
keywords = ["quantum", "quil", "programming", "hybrid"]
packages = [{ include = "pyquil" }]
Expand Down Expand Up @@ -63,18 +78,17 @@ pytest-benchmark = "^4.0.0"
pytest-profiling = "^1.7.0"
respx = "^0.20"
syrupy = "^3.0.6"
maturin = "^1.5.0"

[tool.poetry.extras]
latex = ["ipython"]
docs = ["Sphinx", "sphinx-rtd-theme", "nbsphinx", "recommonmark", "pandoc", "matplotlib", "seaborn", "toml"]
grpc-web = ["qcs-sdk-python-grpc-web"]

[tool.poetry.group.dev.dependencies]
setuptools = {version = "^69.0.2", python = ">=3.12"}
mypy = "^1.8.0"

[tool.ruff]
line-length = 120

[tool.black]
line-length = 120
target-version = ['py38']
Expand All @@ -100,9 +114,67 @@ exclude = '''
)
'''

[tool.ruff]
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".ipynb_checkpoints",
".mypy_cache",
".nox",
".pants.d",
".pyenv",
".pytest_cache",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
".vscode",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"site-packages",
"venv",
]
# Same as Black.
line-length = 120
indent-width = 4
# Assume Python 3.8
target-version = "py38"

[tool.ruff.lint]
select = ["D", "E4", "E7", "E9", "F", "I", "B", "S", "W"]
ignore = []
# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"

[tool.ruff.format]
# Like Black, use double quotes for strings.
quote-style = "double"
# Like Black, indent with spaces, rather than tabs.
indent-style = "space"
# Like Black, respect magic trailing commas.
skip-magic-trailing-comma = false
# Like Black, automatically detect the appropriate line ending.
line-ending = "auto"

[tool.pytest.ini_options]
filterwarnings = ["ignore::DeprecationWarning:pyquil.*:", "ignore::DeprecationWarning:test.unit.*:"]

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
requires = ["maturin>=1,<2"]
build-backend = "maturin"

[tool.maturin]
module-name = "pyquil._core"
5 changes: 0 additions & 5 deletions pyquil/__init__.py

This file was deleted.

21 changes: 0 additions & 21 deletions pyquil/simulation/__init__.py

This file was deleted.

Loading

0 comments on commit f11b491

Please sign in to comment.