Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Instruction classes and execution results now support the pickle module #1795

Merged
merged 10 commits into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 47 additions & 52 deletions poetry.lock

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

12 changes: 10 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@ packages = [{ include = "pyquil" }]
exclude = ["pyquil/conftest.py"]

[tool.poetry.dependencies]
python = "^3.9,<=3.14"
python = "^3.9,<=4.0"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will close #1793.

MarquessV marked this conversation as resolved.
Show resolved Hide resolved
numpy = "^1.25"
scipy = "^1.11"
rpcq = "^3.11.0"
networkx = ">=2.5"
qcs-sdk-python = "0.19.0"
qcs-sdk-python = "0.19.2"
quil = ">=0.11.2"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prior to qcs-sdk-python 0.19.2, quil was required to be a specific version. That was meant to ensure compatibility between downstream users of both packages, but in practice that has been over-restrictive. This allows quil to be updated separately from qcs-sdk-python, at least between breaking changes.

packaging = "^23.1"
deprecated = "^1.2.14"
types-deprecated = "^1.2.9.3"
Expand Down Expand Up @@ -117,6 +118,13 @@ line-ending = "auto"
docstring-code-format = true
docstring-code-line-length = "dynamic"

[tool.ruff.lint.per-file-ignores]
"test/**/*.py" = [
"D", # docstrings are not enforced in tests
"S101", # asserts are allowed in tests
"S301", # we only deserialize our own data to ensure compatibility with the pickle module
]

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

Expand Down
3 changes: 2 additions & 1 deletion pyquil/api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
QVMCompiler,
)
from pyquil.api._qam import QAM, MemoryMap, QAMExecutionResult
from pyquil.api._qpu import QPU
from pyquil.api._qpu import QPU, QPUExecuteResponse
from pyquil.api._quantum_computer import (
QuantumComputer,
get_qc,
Expand Down Expand Up @@ -59,6 +59,7 @@
"MemoryMap",
"QAMExecutionResult",
"QPU",
"QPUExecuteResponse",
"QuantumComputer",
"get_qc",
"list_quantum_computers",
Expand Down
Loading
Loading