diff --git a/CHANGELOG.md b/CHANGELOG.md index 2355ce4b1..891fb07fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,6 +35,7 @@ The 4.0 release of pyQuil migrates its core functionality into Rigetti's latest - The `JumpConditional` base class has been removed, use `JumpWhen` and/or `JumpUnless` directly instead. - The `Program` class automatically sorts `DECLARE` instructions to the top of the Program when converting to Quil. - `FenceAll` is now a subclass of `Fence`. This can be impactful if you are doing something like `isinstance(instruction, Fence)` since that will now match `Fence` and `FenceAll`. If the difference between the two is important, check for `FenceAll` first. You can also check if the `qubits` property is empty, which implies a `FenceAll` instruction. +- The `RawInstr` class has been removed. All Quil instructions should be supported by either parsing them with the `Program` class, or constructing them with an instruction class. If you were using `RawInstr` for QASM2.0 transpilation, use the new `transpile_qasm_2` method on `AbstractCompiler`. ### Features @@ -54,6 +55,7 @@ installation, perform diagnostics checks, and return a summary. - The `Include` class for `INCLUDE` instructions. - The `DefCircuit` class `DEFCIRCUIT` instructions. - The `Program.copy` method now performs a deep copy. +- The `AbstractCompiler` class now has a method `transpile_qasm_2` method for transpiling QASM2.0 programs to Quil. ### Deprecations diff --git a/poetry.lock b/poetry.lock index d7a270d59..c805f203f 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,10 +1,9 @@ -# This file is automatically @generated by Poetry 1.4.0 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand. [[package]] name = "alabaster" version = "0.7.13" description = "A configurable sidebar-enabled Sphinx theme" -category = "main" optional = true python-versions = ">=3.6" files = [ @@ -16,7 +15,6 @@ files = [ name = "anyio" version = "4.0.0" description = "High level compatibility layer for multiple asynchronous event loop implementations" -category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -38,7 +36,6 @@ trio = ["trio (>=0.22)"] name = "appnope" version = "0.1.3" description = "Disable App Nap on macOS >= 10.9" -category = "main" optional = true python-versions = "*" files = [ @@ -50,7 +47,6 @@ files = [ name = "attrs" version = "23.1.0" description = "Classes Without Boilerplate" -category = "main" optional = true python-versions = ">=3.7" files = [ @@ -69,7 +65,6 @@ tests-no-zope = ["cloudpickle", "hypothesis", "mypy (>=1.1.1)", "pympler", "pyte name = "babel" version = "2.12.1" description = "Internationalization utilities" -category = "main" optional = true python-versions = ">=3.7" files = [ @@ -84,7 +79,6 @@ pytz = {version = ">=2015.7", markers = "python_version < \"3.9\""} name = "backcall" version = "0.2.0" description = "Specifications for callback functions passed in to an API" -category = "main" optional = true python-versions = "*" files = [ @@ -96,7 +90,6 @@ files = [ name = "beautifulsoup4" version = "4.12.2" description = "Screen-scraping library" -category = "main" optional = true python-versions = ">=3.6.0" files = [ @@ -115,7 +108,6 @@ lxml = ["lxml"] name = "black" version = "22.12.0" description = "The uncompromising code formatter." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -151,7 +143,6 @@ uvloop = ["uvloop (>=0.15.2)"] name = "bleach" version = "6.0.0" description = "An easy safelist-based HTML-sanitizing tool." -category = "main" optional = true python-versions = ">=3.7" files = [ @@ -170,7 +161,6 @@ css = ["tinycss2 (>=1.1.0,<1.2)"] name = "certifi" version = "2023.7.22" description = "Python package for providing Mozilla's CA Bundle." -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -182,7 +172,6 @@ files = [ name = "cffi" version = "1.15.1" description = "Foreign Function Interface for Python calling C code." -category = "main" optional = false python-versions = "*" files = [ @@ -259,7 +248,6 @@ pycparser = "*" name = "charset-normalizer" version = "3.2.0" description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." -category = "main" optional = true python-versions = ">=3.7.0" files = [ @@ -344,7 +332,6 @@ files = [ name = "click" version = "8.1.7" description = "Composable command line interface toolkit" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -359,7 +346,6 @@ colorama = {version = "*", markers = "platform_system == \"Windows\""} name = "colorama" version = "0.4.6" description = "Cross-platform colored terminal text." -category = "main" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" files = [ @@ -371,7 +357,6 @@ files = [ name = "colored" version = "1.4.4" description = "Simple library for color and formatting to terminal" -category = "dev" optional = false python-versions = "*" files = [ @@ -382,7 +367,6 @@ files = [ name = "commonmark" version = "0.9.1" description = "Python parser for the CommonMark Markdown spec" -category = "main" optional = true python-versions = "*" files = [ @@ -397,7 +381,6 @@ test = ["flake8 (==3.7.8)", "hypothesis (==3.55.3)"] name = "contourpy" version = "1.1.0" description = "Python library for calculating contours of 2D quadrilateral grids" -category = "main" optional = true python-versions = ">=3.8" files = [ @@ -408,6 +391,7 @@ files = [ {file = "contourpy-1.1.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:18a64814ae7bce73925131381603fff0116e2df25230dfc80d6d690aa6e20b37"}, {file = "contourpy-1.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:90c81f22b4f572f8a2110b0b741bb64e5a6427e0a198b2cdc1fbaf85f352a3aa"}, {file = "contourpy-1.1.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:53cc3a40635abedbec7f1bde60f8c189c49e84ac180c665f2cd7c162cc454baa"}, + {file = "contourpy-1.1.0-cp310-cp310-win32.whl", hash = "sha256:9b2dd2ca3ac561aceef4c7c13ba654aaa404cf885b187427760d7f7d4c57cff8"}, {file = "contourpy-1.1.0-cp310-cp310-win_amd64.whl", hash = "sha256:1f795597073b09d631782e7245016a4323cf1cf0b4e06eef7ea6627e06a37ff2"}, {file = "contourpy-1.1.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:0b7b04ed0961647691cfe5d82115dd072af7ce8846d31a5fac6c142dcce8b882"}, {file = "contourpy-1.1.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:27bc79200c742f9746d7dd51a734ee326a292d77e7d94c8af6e08d1e6c15d545"}, @@ -416,6 +400,7 @@ files = [ {file = "contourpy-1.1.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e5cec36c5090e75a9ac9dbd0ff4a8cf7cecd60f1b6dc23a374c7d980a1cd710e"}, {file = "contourpy-1.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1f0cbd657e9bde94cd0e33aa7df94fb73c1ab7799378d3b3f902eb8eb2e04a3a"}, {file = "contourpy-1.1.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:181cbace49874f4358e2929aaf7ba84006acb76694102e88dd15af861996c16e"}, + {file = "contourpy-1.1.0-cp311-cp311-win32.whl", hash = "sha256:edb989d31065b1acef3828a3688f88b2abb799a7db891c9e282df5ec7e46221b"}, {file = "contourpy-1.1.0-cp311-cp311-win_amd64.whl", hash = "sha256:fb3b7d9e6243bfa1efb93ccfe64ec610d85cfe5aec2c25f97fbbd2e58b531256"}, {file = "contourpy-1.1.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:bcb41692aa09aeb19c7c213411854402f29f6613845ad2453d30bf421fe68fed"}, {file = "contourpy-1.1.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:5d123a5bc63cd34c27ff9c7ac1cd978909e9c71da12e05be0231c608048bb2ae"}, @@ -424,6 +409,7 @@ files = [ {file = "contourpy-1.1.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:317267d915490d1e84577924bd61ba71bf8681a30e0d6c545f577363157e5e94"}, {file = "contourpy-1.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d551f3a442655f3dcc1285723f9acd646ca5858834efeab4598d706206b09c9f"}, {file = "contourpy-1.1.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:e7a117ce7df5a938fe035cad481b0189049e8d92433b4b33aa7fc609344aafa1"}, + {file = "contourpy-1.1.0-cp38-cp38-win32.whl", hash = "sha256:108dfb5b3e731046a96c60bdc46a1a0ebee0760418951abecbe0fc07b5b93b27"}, {file = "contourpy-1.1.0-cp38-cp38-win_amd64.whl", hash = "sha256:d4f26b25b4f86087e7d75e63212756c38546e70f2a92d2be44f80114826e1cd4"}, {file = "contourpy-1.1.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:bc00bb4225d57bff7ebb634646c0ee2a1298402ec10a5fe7af79df9a51c1bfd9"}, {file = "contourpy-1.1.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:189ceb1525eb0655ab8487a9a9c41f42a73ba52d6789754788d1883fb06b2d8a"}, @@ -432,6 +418,7 @@ files = [ {file = "contourpy-1.1.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:143dde50520a9f90e4a2703f367cf8ec96a73042b72e68fcd184e1279962eb6f"}, {file = "contourpy-1.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e94bef2580e25b5fdb183bf98a2faa2adc5b638736b2c0a4da98691da641316a"}, {file = "contourpy-1.1.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:ed614aea8462735e7d70141374bd7650afd1c3f3cb0c2dbbcbe44e14331bf002"}, + {file = "contourpy-1.1.0-cp39-cp39-win32.whl", hash = "sha256:71551f9520f008b2950bef5f16b0e3587506ef4f23c734b71ffb7b89f8721999"}, {file = "contourpy-1.1.0-cp39-cp39-win_amd64.whl", hash = "sha256:438ba416d02f82b692e371858143970ed2eb6337d9cdbbede0d8ad9f3d7dd17d"}, {file = "contourpy-1.1.0-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:a698c6a7a432789e587168573a864a7ea374c6be8d4f31f9d87c001d5a843493"}, {file = "contourpy-1.1.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:397b0ac8a12880412da3551a8cb5a187d3298a72802b45a3bd1805e204ad8439"}, @@ -456,7 +443,6 @@ test-no-images = ["pytest", "pytest-cov", "wurlitzer"] name = "coverage" version = "7.3.1" description = "Code coverage measurement for Python" -category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -524,7 +510,6 @@ toml = ["tomli"] name = "cycler" version = "0.11.0" description = "Composable style cycles" -category = "main" optional = true python-versions = ">=3.6" files = [ @@ -536,7 +521,6 @@ files = [ name = "decorator" version = "5.1.1" description = "Decorators for Humans" -category = "main" optional = true python-versions = ">=3.5" files = [ @@ -548,7 +532,6 @@ files = [ name = "defusedxml" version = "0.7.1" description = "XML bomb protection for Python stdlib modules" -category = "main" optional = true python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" files = [ @@ -560,7 +543,6 @@ files = [ name = "deprecated" version = "1.2.14" description = "Python @deprecated decorator to deprecate old python classes, functions or methods." -category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" files = [ @@ -578,7 +560,6 @@ dev = ["PyTest", "PyTest-Cov", "bump2version (<1)", "sphinx (<2)", "tox"] name = "docutils" version = "0.18.1" description = "Docutils -- Python Documentation Utilities" -category = "main" optional = true python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" files = [ @@ -590,7 +571,6 @@ files = [ name = "exceptiongroup" version = "1.1.3" description = "Backport of PEP 654 (exception groups)" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -605,7 +585,6 @@ test = ["pytest (>=6)"] name = "execnet" version = "2.0.2" description = "execnet: rapid multi-Python deployment" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -620,7 +599,6 @@ testing = ["hatch", "pre-commit", "pytest", "tox"] name = "fastjsonschema" version = "2.18.0" description = "Fastest Python implementation of JSON schema" -category = "main" optional = true python-versions = "*" files = [ @@ -635,7 +613,6 @@ devel = ["colorama", "json-spec", "jsonschema", "pylint", "pytest", "pytest-benc name = "flake8" version = "3.9.2" description = "the modular source code checker: pep8 pyflakes and co" -category = "dev" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" files = [ @@ -652,7 +629,6 @@ pyflakes = ">=2.3.0,<2.4.0" name = "fonttools" version = "4.42.1" description = "Tools to manipulate font files" -category = "main" optional = true python-versions = ">=3.8" files = [ @@ -710,7 +686,6 @@ woff = ["brotli (>=1.0.1)", "brotlicffi (>=0.8.0)", "zopfli (>=0.1.4)"] name = "h11" version = "0.14.0" description = "A pure-Python, bring-your-own-I/O implementation of HTTP/1.1" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -722,7 +697,6 @@ files = [ name = "httpcore" version = "0.18.0" description = "A minimal low-level HTTP client." -category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -734,17 +708,16 @@ files = [ anyio = ">=3.0,<5.0" certifi = "*" h11 = ">=0.13,<0.15" -sniffio = ">=1.0.0,<2.0.0" +sniffio = "==1.*" [package.extras] http2 = ["h2 (>=3,<5)"] -socks = ["socksio (>=1.0.0,<2.0.0)"] +socks = ["socksio (==1.*)"] [[package]] name = "httpx" version = "0.25.0" description = "The next generation HTTP client." -category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -760,15 +733,14 @@ sniffio = "*" [package.extras] brotli = ["brotli", "brotlicffi"] -cli = ["click (>=8.0.0,<9.0.0)", "pygments (>=2.0.0,<3.0.0)", "rich (>=10,<14)"] +cli = ["click (==8.*)", "pygments (==2.*)", "rich (>=10,<14)"] http2 = ["h2 (>=3,<5)"] -socks = ["socksio (>=1.0.0,<2.0.0)"] +socks = ["socksio (==1.*)"] [[package]] name = "idna" version = "3.4" description = "Internationalized Domain Names in Applications (IDNA)" -category = "main" optional = false python-versions = ">=3.5" files = [ @@ -780,7 +752,6 @@ files = [ name = "imagesize" version = "1.4.1" description = "Getting image size from png/jpeg/jpeg2000/gif file" -category = "main" optional = true python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" files = [ @@ -792,7 +763,6 @@ files = [ name = "importlib-metadata" version = "6.8.0" description = "Read metadata from Python packages" -category = "main" optional = true python-versions = ">=3.8" files = [ @@ -812,7 +782,6 @@ testing = ["flufl.flake8", "importlib-resources (>=1.3)", "packaging", "pyfakefs name = "importlib-resources" version = "6.0.1" description = "Read resources from Python packages" -category = "main" optional = true python-versions = ">=3.8" files = [ @@ -831,7 +800,6 @@ testing = ["pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", name = "iniconfig" version = "2.0.0" description = "brain-dead simple config-ini parsing" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -843,7 +811,6 @@ files = [ name = "ipython" version = "7.34.0" description = "IPython: Productive Interactive Computing" -category = "main" optional = true python-versions = ">=3.7" files = [ @@ -880,7 +847,6 @@ test = ["ipykernel", "nbformat", "nose (>=0.10.1)", "numpy (>=1.17)", "pygments" name = "jedi" version = "0.19.0" description = "An autocompletion tool for Python that can be used for text editors." -category = "main" optional = true python-versions = ">=3.6" files = [ @@ -900,7 +866,6 @@ testing = ["Django (<3.1)", "attrs", "colorama", "docopt", "pytest (<7.0.0)"] name = "jinja2" version = "3.1.2" description = "A very fast and expressive template engine." -category = "main" optional = true python-versions = ">=3.7" files = [ @@ -918,7 +883,6 @@ i18n = ["Babel (>=2.7)"] name = "jsonschema" version = "4.19.0" description = "An implementation of JSON Schema validation for Python" -category = "main" optional = true python-versions = ">=3.8" files = [ @@ -942,7 +906,6 @@ format-nongpl = ["fqdn", "idna", "isoduration", "jsonpointer (>1.13)", "rfc3339- name = "jsonschema-specifications" version = "2023.7.1" description = "The JSON Schema meta-schemas and vocabularies, exposed as a Registry" -category = "main" optional = true python-versions = ">=3.8" files = [ @@ -958,7 +921,6 @@ referencing = ">=0.28.0" name = "jupyter-client" version = "8.3.1" description = "Jupyter protocol implementation and client libraries" -category = "main" optional = true python-versions = ">=3.8" files = [ @@ -968,7 +930,7 @@ files = [ [package.dependencies] importlib-metadata = {version = ">=4.8.3", markers = "python_version < \"3.10\""} -jupyter-core = ">=4.12,<5.0.0 || >=5.1.0" +jupyter-core = ">=4.12,<5.0.dev0 || >=5.1.dev0" python-dateutil = ">=2.8.2" pyzmq = ">=23.0" tornado = ">=6.2" @@ -982,7 +944,6 @@ test = ["coverage", "ipykernel (>=6.14)", "mypy", "paramiko", "pre-commit", "pyt name = "jupyter-core" version = "5.3.1" description = "Jupyter core package. A base package on which Jupyter projects rely." -category = "main" optional = true python-versions = ">=3.8" files = [ @@ -1003,7 +964,6 @@ test = ["ipykernel", "pre-commit", "pytest", "pytest-cov", "pytest-timeout"] name = "jupyterlab-pygments" version = "0.2.2" description = "Pygments theme using JupyterLab CSS variables" -category = "main" optional = true python-versions = ">=3.7" files = [ @@ -1015,7 +975,6 @@ files = [ name = "kiwisolver" version = "1.4.5" description = "A fast implementation of the Cassowary constraint solver" -category = "main" optional = true python-versions = ">=3.7" files = [ @@ -1129,7 +1088,6 @@ files = [ name = "lark" version = "0.11.3" description = "a modern parsing library" -category = "main" optional = false python-versions = "*" files = [ @@ -1145,7 +1103,6 @@ regex = ["regex"] name = "markupsafe" version = "2.1.3" description = "Safely add untrusted strings to HTML/XML markup." -category = "main" optional = true python-versions = ">=3.7" files = [ @@ -1215,7 +1172,6 @@ files = [ name = "matplotlib" version = "3.7.2" description = "Python plotting package" -category = "main" optional = true python-versions = ">=3.8" files = [ @@ -1278,7 +1234,6 @@ python-dateutil = ">=2.7" name = "matplotlib-inline" version = "0.1.6" description = "Inline Matplotlib backend for Jupyter" -category = "main" optional = true python-versions = ">=3.5" files = [ @@ -1293,7 +1248,6 @@ traitlets = "*" name = "mccabe" version = "0.6.1" description = "McCabe checker, plugin for flake8" -category = "dev" optional = false python-versions = "*" files = [ @@ -1305,7 +1259,6 @@ files = [ name = "mistune" version = "3.0.1" description = "A sane and fast Markdown parser with useful plugins and renderers" -category = "main" optional = true python-versions = ">=3.7" files = [ @@ -1317,7 +1270,6 @@ files = [ name = "msgpack" version = "1.0.5" description = "MessagePack serializer" -category = "main" optional = false python-versions = "*" files = [ @@ -1390,7 +1342,6 @@ files = [ name = "mypy" version = "1.5.1" description = "Optional static typing for Python" -category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -1437,7 +1388,6 @@ reports = ["lxml"] name = "mypy-extensions" version = "1.0.0" description = "Type system extensions for programs checked with the mypy type checker." -category = "dev" optional = false python-versions = ">=3.5" files = [ @@ -1449,7 +1399,6 @@ files = [ name = "nbclient" version = "0.8.0" description = "A client library for executing notebooks. Formerly nbconvert's ExecutePreprocessor." -category = "main" optional = true python-versions = ">=3.8.0" files = [ @@ -1459,7 +1408,7 @@ files = [ [package.dependencies] jupyter-client = ">=6.1.12" -jupyter-core = ">=4.12,<5.0.0 || >=5.1.0" +jupyter-core = ">=4.12,<5.0.dev0 || >=5.1.dev0" nbformat = ">=5.1" traitlets = ">=5.4" @@ -1472,7 +1421,6 @@ test = ["flaky", "ipykernel (>=6.19.3)", "ipython", "ipywidgets", "nbconvert (>= name = "nbconvert" version = "7.8.0" description = "Converting Jupyter Notebooks" -category = "main" optional = true python-versions = ">=3.8" files = [ @@ -1511,7 +1459,6 @@ webpdf = ["playwright"] name = "nbformat" version = "5.9.2" description = "The Jupyter Notebook format" -category = "main" optional = true python-versions = ">=3.8" files = [ @@ -1533,7 +1480,6 @@ test = ["pep440", "pre-commit", "pytest", "testpath"] name = "nbsphinx" version = "0.9.3" description = "Jupyter Notebook Tools for Sphinx" -category = "main" optional = true python-versions = ">=3.6" files = [ @@ -1553,7 +1499,6 @@ traitlets = ">=5" name = "nest-asyncio" version = "1.5.7" description = "Patch asyncio to allow nested event loops" -category = "dev" optional = false python-versions = ">=3.5" files = [ @@ -1565,7 +1510,6 @@ files = [ name = "networkx" version = "3.1" description = "Python package for creating and manipulating graphs and networks" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1584,7 +1528,6 @@ test = ["codecov (>=2.1)", "pytest (>=7.2)", "pytest-cov (>=4.0)"] name = "numpy" version = "1.24.4" description = "Fundamental package for array computing in Python" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1622,7 +1565,6 @@ files = [ name = "packaging" version = "23.1" description = "Core utilities for Python packages" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1634,7 +1576,6 @@ files = [ name = "pandas" version = "2.0.3" description = "Powerful data structures for data analysis, time series, and statistics" -category = "main" optional = true python-versions = ">=3.8" files = [ @@ -1668,8 +1609,8 @@ files = [ [package.dependencies] numpy = [ {version = ">=1.20.3", markers = "python_version < \"3.10\""}, - {version = ">=1.21.0", markers = "python_version >= \"3.10\""}, {version = ">=1.23.2", markers = "python_version >= \"3.11\""}, + {version = ">=1.21.0", markers = "python_version >= \"3.10\" and python_version < \"3.11\""}, ] python-dateutil = ">=2.8.2" pytz = ">=2020.1" @@ -1702,7 +1643,6 @@ xml = ["lxml (>=4.6.3)"] name = "pandoc" version = "2.4b0" description = "Pandoc Documents for Python" -category = "main" optional = true python-versions = "*" files = [ @@ -1718,7 +1658,6 @@ ply = "*" name = "pandocfilters" version = "1.5.0" description = "Utilities for writing pandoc filters in python" -category = "main" optional = true python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" files = [ @@ -1730,7 +1669,6 @@ files = [ name = "parso" version = "0.8.3" description = "A Python Parser" -category = "main" optional = true python-versions = ">=3.6" files = [ @@ -1746,7 +1684,6 @@ testing = ["docopt", "pytest (<6.0.0)"] name = "pathspec" version = "0.11.2" description = "Utility library for gitignore style pattern matching of file paths." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1758,7 +1695,6 @@ files = [ name = "pexpect" version = "4.8.0" description = "Pexpect allows easy control of interactive console applications." -category = "main" optional = true python-versions = "*" files = [ @@ -1773,7 +1709,6 @@ ptyprocess = ">=0.5" name = "pickleshare" version = "0.7.5" description = "Tiny 'shelve'-like database with concurrency support" -category = "main" optional = true python-versions = "*" files = [ @@ -1785,7 +1720,6 @@ files = [ name = "pillow" version = "10.0.0" description = "Python Imaging Library (Fork)" -category = "main" optional = true python-versions = ">=3.8" files = [ @@ -1855,7 +1789,6 @@ tests = ["check-manifest", "coverage", "defusedxml", "markdown2", "olefile", "pa name = "pkgutil-resolve-name" version = "1.3.10" description = "Resolve a name to an object." -category = "main" optional = true python-versions = ">=3.6" files = [ @@ -1867,7 +1800,6 @@ files = [ name = "platformdirs" version = "3.10.0" description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1883,7 +1815,6 @@ test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.4)", "pytest-co name = "pluggy" version = "1.3.0" description = "plugin and hook calling mechanisms for python" -category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -1899,7 +1830,6 @@ testing = ["pytest", "pytest-benchmark"] name = "plumbum" version = "1.8.2" description = "Plumbum: shell combinators library" -category = "main" optional = true python-versions = ">=3.6" files = [ @@ -1919,7 +1849,6 @@ ssh = ["paramiko"] name = "ply" version = "3.11" description = "Python Lex & Yacc" -category = "main" optional = true python-versions = "*" files = [ @@ -1931,7 +1860,6 @@ files = [ name = "prompt-toolkit" version = "3.0.39" description = "Library for building powerful interactive command lines in Python" -category = "main" optional = true python-versions = ">=3.7.0" files = [ @@ -1946,7 +1874,6 @@ wcwidth = "*" name = "ptyprocess" version = "0.7.0" description = "Run a subprocess in a pseudo terminal" -category = "main" optional = true python-versions = "*" files = [ @@ -1958,7 +1885,6 @@ files = [ name = "pycodestyle" version = "2.7.0" description = "Python style guide checker" -category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" files = [ @@ -1970,7 +1896,6 @@ files = [ name = "pycparser" version = "2.21" description = "C parser in Python" -category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" files = [ @@ -1982,7 +1907,6 @@ files = [ name = "pydantic" version = "1.10.12" description = "Data validation and settings management using python type hints" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -2035,7 +1959,6 @@ email = ["email-validator (>=1.0.3)"] name = "pyflakes" version = "2.3.1" description = "passive checker of Python programs" -category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" files = [ @@ -2047,7 +1970,6 @@ files = [ name = "pygments" version = "2.16.1" description = "Pygments is a syntax highlighting package written in Python." -category = "main" optional = true python-versions = ">=3.7" files = [ @@ -2062,7 +1984,6 @@ plugins = ["importlib-metadata"] name = "pyparsing" version = "3.0.9" description = "pyparsing module - Classes and methods to define and execute parsing grammars" -category = "main" optional = true python-versions = ">=3.6.8" files = [ @@ -2077,7 +1998,6 @@ diagrams = ["jinja2", "railroad-diagrams"] name = "pytest" version = "7.4.2" description = "pytest: simple powerful testing with Python" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -2100,7 +2020,6 @@ testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "no name = "pytest-cov" version = "4.1.0" description = "Pytest plugin for measuring coverage." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -2119,7 +2038,6 @@ testing = ["fields", "hunter", "process-tests", "pytest-xdist", "six", "virtuale name = "pytest-mock" version = "3.11.1" description = "Thin-wrapper around the mock package for easier use with pytest" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -2137,7 +2055,6 @@ dev = ["pre-commit", "pytest-asyncio", "tox"] name = "pytest-rerunfailures" version = "12.0" description = "pytest plugin to re-run tests to eliminate flaky failures" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -2153,7 +2070,6 @@ pytest = ">=6.2" name = "pytest-timeout" version = "1.4.2" description = "py.test plugin to abort hanging tests" -category = "dev" optional = false python-versions = "*" files = [ @@ -2168,7 +2084,6 @@ pytest = ">=3.6.0" name = "pytest-xdist" version = "3.3.1" description = "pytest xdist plugin for distributed testing, most importantly across multiple CPUs" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -2189,7 +2104,6 @@ testing = ["filelock"] name = "python-dateutil" version = "2.8.2" description = "Extensions to the standard Python datetime module" -category = "main" optional = true python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" files = [ @@ -2204,7 +2118,6 @@ six = ">=1.5" name = "python-rapidjson" version = "1.11" description = "Python wrapper around rapidjson" -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -2270,7 +2183,6 @@ files = [ name = "pytz" version = "2023.3.post1" description = "World timezone definitions, modern and historical" -category = "main" optional = true python-versions = "*" files = [ @@ -2282,7 +2194,6 @@ files = [ name = "pywin32" version = "306" description = "Python for Window Extensions" -category = "main" optional = true python-versions = "*" files = [ @@ -2306,7 +2217,6 @@ files = [ name = "pyzmq" version = "25.1.1" description = "Python bindings for 0MQ" -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -2410,56 +2320,69 @@ cffi = {version = "*", markers = "implementation_name == \"pypy\""} [[package]] name = "qcs-sdk-python" -version = "0.12.0" +version = "0.12.1" description = "Python interface for the QCS Rust SDK" -category = "main" optional = false python-versions = "*" files = [ - {file = "qcs_sdk_python-0.12.0-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:ece5f6cd243a484a37b84d87fdd940c7472fb781634385d4d6968cd081a094c5"}, - {file = "qcs_sdk_python-0.12.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8db46df5f31ea9ae1456fb99baa402ad218b1676c099e3c6dee99cef43e3d6d8"}, - {file = "qcs_sdk_python-0.12.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d25dab644c7addabf7f5c1d128487ea806747bbffc455662c0ef47c249dd559e"}, - {file = "qcs_sdk_python-0.12.0-cp311-cp311-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:656c7ed05c34a095399a2c12b990333190ee43899dcbd7c2a2f26feaa27c3d3c"}, - {file = "qcs_sdk_python-0.12.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8452a79ef5a7e175ef17af13f62ea8498a4e0f8c8cf8f2c95299bdd6e45c54f0"}, - {file = "qcs_sdk_python-0.12.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:76a54f564e3c31da1edacf72c370c713ab9251b8448b6c5487b9a332b39e6af4"}, - {file = "qcs_sdk_python-0.12.0-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:a3e08d60c8c56dd2008189dc675dd37aef1cadacd47b116b37c6bb14852dfd68"}, - {file = "qcs_sdk_python-0.12.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:683016216a8c8bed1bd0e36a9eef676818bae369d4262242b96f392237a79c85"}, - {file = "qcs_sdk_python-0.12.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7cf0c701aa1d7d27d91a793e544d5c070b7700412ac0eb36d4d8800153206bef"}, - {file = "qcs_sdk_python-0.12.0-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:2140d136ec78e8f1a5396fab91684f157f554fa63056b2d5ab85b9cd1d744f8c"}, - {file = "qcs_sdk_python-0.12.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:49be6b280a19c89d20194cea3867a8eb4afba42591fe6d9f4442de479b55e3c1"}, - {file = "qcs_sdk_python-0.12.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:44b7323362a4171a45fd1730f087150635755ab7a0b364b166d2241bddd6e578"}, + {file = "qcs_sdk_python-0.12.1-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:d2facf4eac841ccd68a2a55298159fec7b65bf7ed4cda679e4b7ae0d6fec2b92"}, + {file = "qcs_sdk_python-0.12.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:34c5589b2550abd8a91ab6b27a127be719143a8d636ab10c066d5c123aaed3e2"}, + {file = "qcs_sdk_python-0.12.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f23840734305ff5f7767e9e602b82fcaba35f2f667d05b28b2b80c76cc864a34"}, + {file = "qcs_sdk_python-0.12.1-cp310-none-win32.whl", hash = "sha256:5f533dac6d5be30e86dbee39f3cbb8eae88d8ef9b92ee041edcdd3ccb1c36d84"}, + {file = "qcs_sdk_python-0.12.1-cp310-none-win_amd64.whl", hash = "sha256:fd959ab1e509d9a6e7dc98aa60fc0820844824b85486afcb472da09371b1bfce"}, + {file = "qcs_sdk_python-0.12.1-cp311-cp311-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:d946883d3d5965a7b0ad7a7a3f0c60aa9432c5b21b23c16bcf3e68a171a9b9a3"}, + {file = "qcs_sdk_python-0.12.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a9b549f7f1da90d0bb3a0a6448899843b2108f1dfa885c147a69813374c900c1"}, + {file = "qcs_sdk_python-0.12.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:058a085bbce2dcd386feac9cfdbdc4db2ce65b383a9abd119f14f8a8bf57a4e9"}, + {file = "qcs_sdk_python-0.12.1-cp311-none-win32.whl", hash = "sha256:3c47d1723619e92b0a1fd81f3ab425047bac96720a71620b2b04be7286bcebc3"}, + {file = "qcs_sdk_python-0.12.1-cp311-none-win_amd64.whl", hash = "sha256:ec185f6b4eeb5a2f9de2372b7e9ecd9f5de0c5ce997cabf8793b09f10aae2480"}, + {file = "qcs_sdk_python-0.12.1-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:a2d4906f30f4f9773673a51400d20123e34fbe85d0d962efc4c8901735060b59"}, + {file = "qcs_sdk_python-0.12.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5324a05784948fbe9ab1a254659fe158e9e97e87f31c3ddeb81baee81dc421e1"}, + {file = "qcs_sdk_python-0.12.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d7caebc3a96cf7d39613a51f48d94759fd232f60c24fd987a0206a3a4a2476a5"}, + {file = "qcs_sdk_python-0.12.1-cp38-none-win32.whl", hash = "sha256:20611718cb2e02ef4a34ceb79551e6914031f8dd3a248c027aa5d45ab28d0c2b"}, + {file = "qcs_sdk_python-0.12.1-cp38-none-win_amd64.whl", hash = "sha256:6f959ec176b7686c7e359712f74432f6f694573ded8e30309112dae0091fcfde"}, + {file = "qcs_sdk_python-0.12.1-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:5c02d1791501176a305ab496e86544028085cd0e7d7671c047764adb77b3fffa"}, + {file = "qcs_sdk_python-0.12.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1d63a78950c620aa3b9c6476162f06a959e3549ef4fc18fbf3ac81f63597058d"}, + {file = "qcs_sdk_python-0.12.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ae8e4ee5e4d7279adaa20443e269712be70af91f0fc5e6c8940792c60e1f906e"}, + {file = "qcs_sdk_python-0.12.1-cp39-none-win32.whl", hash = "sha256:68ff2ffaa223db42894c79174af0a2636774187baade3e2e383983a5c7cb0a07"}, + {file = "qcs_sdk_python-0.12.1-cp39-none-win_amd64.whl", hash = "sha256:0b59c676ea51ac0865683875a539428302aa3c5b094ee40592c5f0b4ca2256d4"}, ] [package.dependencies] -quil = "0.5.0" +quil = "0.5.2" [[package]] name = "quil" -version = "0.5.0" +version = "0.5.2" description = "A Python package for building and parsing Quil programs." -category = "main" optional = false python-versions = ">=3.8" files = [ - {file = "quil-0.5.0-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:885736b565f9710c32131929013e40dfdf81ded1075d1f07bbc0fda78a33c13d"}, - {file = "quil-0.5.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2c9162683004edefc8623f15eaa1850e16360e0b131f6435a96eeaab3591ece5"}, - {file = "quil-0.5.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:085dfedb733163e89fbf2c9fde011d2c299e185b2807065eb679c1927afb21b7"}, - {file = "quil-0.5.0-cp311-cp311-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:38613d8446389b45b4a72cbf82335014ec4b2f71e5fcecbbe9f113bb1ff789fe"}, - {file = "quil-0.5.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7f08561160cd30f8d4af0bfa3c187c780164dbf001f1b03d5a11c879d1a3f8f0"}, - {file = "quil-0.5.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d1929995baf76da850be16d59430b0985847e360cf16f7bceeaca4fb9b97a67c"}, - {file = "quil-0.5.0-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:684a0c36e8b107aeb61fbd9cf81a26be40451046202274bf64c118e2dab0cde5"}, - {file = "quil-0.5.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1f23970e85fc768837b3c30899d86881d5204c66d40e30db673e20dc0218dc15"}, - {file = "quil-0.5.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:baf584fa8ab23ea2d16dc4174822d633ed8563557f5f7c09a4728c2664f87726"}, - {file = "quil-0.5.0-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:f5958cc8b287d75c6f123105935d02ba5ca79e8f04df919fffd3cc167abb6611"}, - {file = "quil-0.5.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4645cf87b25d0c3a9b5205ee0fd572c252acac57f38db9a80848f699ba8a311d"}, - {file = "quil-0.5.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8c69cbdaae8098206a74c5d27ecc2a4310cecad682852f39c5c47be4af659507"}, + {file = "quil-0.5.2-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:dbc5fe317f815e3b5a0a9bd536b29bf5859a190fd8d1651feb24422cfd253914"}, + {file = "quil-0.5.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:12534b98b3ce09953dc31d13fc60e7c0bc69dfe34378e46ccb04f4d01324eac0"}, + {file = "quil-0.5.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:02e91a155c438bbf0c8c4e7e7e15f5936461cb9077a486fdd02cac9fa86f3b29"}, + {file = "quil-0.5.2-cp310-none-win32.whl", hash = "sha256:68acfb3cc0f81607525a2385ef3f61a8ed1f9d952bf5db2f5df198dfecac7da8"}, + {file = "quil-0.5.2-cp310-none-win_amd64.whl", hash = "sha256:be1bdc1a7eda8e8bf46ed9909c02eb76165d749b8e15c3947fed6e79c074f6e4"}, + {file = "quil-0.5.2-cp311-cp311-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:959083d4412cf81c4743b7c29ce9c0c690b622d84e7d1d619cad081a06045003"}, + {file = "quil-0.5.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:54457d58ef90d366f3b60996e7380984cb602977404ebd16ab32e4ba678b4a98"}, + {file = "quil-0.5.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a876aa8f8e925856224f383ea3072c50657f78cdcee2f08215fa10ced326f0f7"}, + {file = "quil-0.5.2-cp311-none-win32.whl", hash = "sha256:07f5f61cc9944a54f84ebeb1269d8f3362d4c39b62d8d50ac4eb56ea3cc0e844"}, + {file = "quil-0.5.2-cp311-none-win_amd64.whl", hash = "sha256:ba6bc259a844f80e708fda03f57ece4cbc8c2034c66806919a8d8c4570cf415a"}, + {file = "quil-0.5.2-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:c991e77e3c6331e2bd1231fcda07ab9ef5a23363d57e035d8e2e7aaa7ca4c0d5"}, + {file = "quil-0.5.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4a7d0bb9025ab0a0f20fd547faf247c59c58398a9e6e5682bd360fd459639bdc"}, + {file = "quil-0.5.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b942d91004187306859685cf7103d9bbc44d681f7e74930f2204f9cebc843c72"}, + {file = "quil-0.5.2-cp38-none-win32.whl", hash = "sha256:34979a3a592a2a887837cdb9cd59d304cec003813a35bf8fb0147b96d39762bd"}, + {file = "quil-0.5.2-cp38-none-win_amd64.whl", hash = "sha256:88d894b0a5fe42fe31fb045a464a83e329cb4df2b785f5b29ab01a379f55c81b"}, + {file = "quil-0.5.2-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:f8d439b3b2702d2a897d1c045bf25c46cc99485f3a91a7ba6ec90ea991a7ac6f"}, + {file = "quil-0.5.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2d0f2b84bf310b74628b727085157292427fb43f1cd7045709440161698bc44f"}, + {file = "quil-0.5.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:47da2ce232b37e91ad854e7c0108bd2544757ec927353a4a38d2de35c4901ffe"}, + {file = "quil-0.5.2-cp39-none-win32.whl", hash = "sha256:94fa93db55d2133199e81f49c99b21fa69a6b0ab33602cd24efbb10fa69aaf4e"}, + {file = "quil-0.5.2-cp39-none-win_amd64.whl", hash = "sha256:4e2d300bd87118f95123001531ff483f1541da8a02d85da027b25c3618bbd8ee"}, ] [[package]] name = "recommonmark" version = "0.7.1" description = "A docutils-compatibility bridge to CommonMark, enabling you to write CommonMark inside of Docutils & Sphinx projects." -category = "main" optional = true python-versions = "*" files = [ @@ -2476,7 +2399,6 @@ sphinx = ">=1.3.1" name = "referencing" version = "0.30.2" description = "JSON Referencing + Python" -category = "main" optional = true python-versions = ">=3.8" files = [ @@ -2492,7 +2414,6 @@ rpds-py = ">=0.7.0" name = "requests" version = "2.31.0" description = "Python HTTP for Humans." -category = "main" optional = true python-versions = ">=3.7" files = [ @@ -2514,7 +2435,6 @@ use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] name = "respx" version = "0.20.2" description = "A utility for mocking out the Python HTTPX and HTTP Core libraries." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -2529,7 +2449,6 @@ httpx = ">=0.21.0" name = "rpcq" version = "3.11.0" description = "The RPC framework and message specification for Rigetti QCS." -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -2546,7 +2465,6 @@ pyzmq = ">=17" name = "rpds-py" version = "0.10.2" description = "Python bindings to Rust's persistent data structures (rpds)" -category = "main" optional = true python-versions = ">=3.8" files = [ @@ -2653,7 +2571,6 @@ files = [ name = "ruamel-yaml" version = "0.17.32" description = "ruamel.yaml is a YAML parser/emitter that supports roundtrip preservation of comments, seq/map flow style, and map key order" -category = "main" optional = false python-versions = ">=3" files = [ @@ -2672,7 +2589,6 @@ jinja2 = ["ruamel.yaml.jinja2 (>=0.2)"] name = "ruamel-yaml-clib" version = "0.2.7" description = "C version of reader, parser and emitter for ruamel.yaml derived from libyaml" -category = "main" optional = false python-versions = ">=3.5" files = [ @@ -2719,7 +2635,6 @@ files = [ name = "scipy" version = "1.9.3" description = "Fundamental algorithms for scientific computing in Python" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -2758,7 +2673,6 @@ test = ["asv", "gmpy2", "mpmath", "pytest", "pytest-cov", "pytest-xdist", "sciki name = "seaborn" version = "0.12.2" description = "Statistical data visualization" -category = "main" optional = true python-versions = ">=3.7" files = [ @@ -2780,7 +2694,6 @@ stats = ["scipy (>=1.3)", "statsmodels (>=0.10)"] name = "setuptools" version = "68.2.1" description = "Easily download, build, install, upgrade, and uninstall Python packages" -category = "main" optional = true python-versions = ">=3.8" files = [ @@ -2797,7 +2710,6 @@ testing-integration = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "jar name = "six" version = "1.16.0" description = "Python 2 and 3 compatibility utilities" -category = "main" optional = true python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" files = [ @@ -2809,7 +2721,6 @@ files = [ name = "sniffio" version = "1.3.0" description = "Sniff out which async library your code is running under" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -2821,7 +2732,6 @@ files = [ name = "snowballstemmer" version = "2.2.0" description = "This package provides 29 stemmers for 28 languages generated from Snowball algorithms." -category = "main" optional = true python-versions = "*" files = [ @@ -2833,7 +2743,6 @@ files = [ name = "soupsieve" version = "2.5" description = "A modern CSS selector implementation for Beautiful Soup." -category = "main" optional = true python-versions = ">=3.8" files = [ @@ -2845,7 +2754,6 @@ files = [ name = "sphinx" version = "7.1.2" description = "Python documentation generator" -category = "main" optional = true python-versions = ">=3.8" files = [ @@ -2881,7 +2789,6 @@ test = ["cython", "filelock", "html5lib", "pytest (>=4.6)"] name = "sphinx-rtd-theme" version = "1.3.0" description = "Read the Docs theme for Sphinx" -category = "main" optional = true python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,>=2.7" files = [ @@ -2901,7 +2808,6 @@ dev = ["bump2version", "sphinxcontrib-httpdomain", "transifex-client", "wheel"] name = "sphinxcontrib-applehelp" version = "1.0.4" description = "sphinxcontrib-applehelp is a Sphinx extension which outputs Apple help books" -category = "main" optional = true python-versions = ">=3.8" files = [ @@ -2917,7 +2823,6 @@ test = ["pytest"] name = "sphinxcontrib-devhelp" version = "1.0.2" description = "sphinxcontrib-devhelp is a sphinx extension which outputs Devhelp document." -category = "main" optional = true python-versions = ">=3.5" files = [ @@ -2933,7 +2838,6 @@ test = ["pytest"] name = "sphinxcontrib-htmlhelp" version = "2.0.1" description = "sphinxcontrib-htmlhelp is a sphinx extension which renders HTML help files" -category = "main" optional = true python-versions = ">=3.8" files = [ @@ -2949,7 +2853,6 @@ test = ["html5lib", "pytest"] name = "sphinxcontrib-jquery" version = "4.1" description = "Extension to include jQuery on newer Sphinx releases" -category = "main" optional = true python-versions = ">=2.7" files = [ @@ -2964,7 +2867,6 @@ Sphinx = ">=1.8" name = "sphinxcontrib-jsmath" version = "1.0.1" description = "A sphinx extension which renders display math in HTML via JavaScript" -category = "main" optional = true python-versions = ">=3.5" files = [ @@ -2979,7 +2881,6 @@ test = ["flake8", "mypy", "pytest"] name = "sphinxcontrib-qthelp" version = "1.0.3" description = "sphinxcontrib-qthelp is a sphinx extension which outputs QtHelp document." -category = "main" optional = true python-versions = ">=3.5" files = [ @@ -2995,7 +2896,6 @@ test = ["pytest"] name = "sphinxcontrib-serializinghtml" version = "1.1.5" description = "sphinxcontrib-serializinghtml is a sphinx extension which outputs \"serialized\" HTML files (json and pickle)." -category = "main" optional = true python-versions = ">=3.5" files = [ @@ -3011,7 +2911,6 @@ test = ["pytest"] name = "syrupy" version = "3.0.6" description = "Pytest Snapshot Test Utility" -category = "dev" optional = false python-versions = ">=3.7,<4" files = [ @@ -3027,7 +2926,6 @@ pytest = ">=5.1.0,<8.0.0" name = "tenacity" version = "8.2.3" description = "Retry code until it succeeds" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -3042,7 +2940,6 @@ doc = ["reno", "sphinx", "tornado (>=4.5)"] name = "tinycss2" version = "1.2.1" description = "A tiny CSS parser" -category = "main" optional = true python-versions = ">=3.7" files = [ @@ -3061,7 +2958,6 @@ test = ["flake8", "isort", "pytest"] name = "toml" version = "0.10.2" description = "Python Library for Tom's Obvious, Minimal Language" -category = "dev" optional = false python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" files = [ @@ -3073,7 +2969,6 @@ files = [ name = "tomli" version = "2.0.1" description = "A lil' TOML parser" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -3085,7 +2980,6 @@ files = [ name = "tornado" version = "6.3.3" description = "Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed." -category = "main" optional = true python-versions = ">= 3.8" files = [ @@ -3106,7 +3000,6 @@ files = [ name = "traitlets" version = "5.9.0" description = "Traitlets Python configuration system" -category = "main" optional = true python-versions = ">=3.7" files = [ @@ -3122,7 +3015,6 @@ test = ["argcomplete (>=2.0)", "pre-commit", "pytest", "pytest-mock"] name = "types-deprecated" version = "1.2.9.3" description = "Typing stubs for Deprecated" -category = "main" optional = false python-versions = "*" files = [ @@ -3134,7 +3026,6 @@ files = [ name = "types-python-dateutil" version = "2.8.19.14" description = "Typing stubs for python-dateutil" -category = "main" optional = false python-versions = "*" files = [ @@ -3146,7 +3037,6 @@ files = [ name = "types-retry" version = "0.9.9.4" description = "Typing stubs for retry" -category = "main" optional = false python-versions = "*" files = [ @@ -3158,7 +3048,6 @@ files = [ name = "typing-extensions" version = "4.7.1" description = "Backported and Experimental Type Hints for Python 3.7+" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -3170,7 +3059,6 @@ files = [ name = "tzdata" version = "2023.3" description = "Provider of IANA time zone data" -category = "main" optional = true python-versions = ">=2" files = [ @@ -3182,7 +3070,6 @@ files = [ name = "urllib3" version = "2.0.4" description = "HTTP library with thread-safe connection pooling, file post, and more." -category = "main" optional = true python-versions = ">=3.7" files = [ @@ -3200,7 +3087,6 @@ zstd = ["zstandard (>=0.18.0)"] name = "wcwidth" version = "0.2.6" description = "Measures the displayed width of unicode strings in a terminal" -category = "main" optional = true python-versions = "*" files = [ @@ -3212,7 +3098,6 @@ files = [ name = "webencodings" version = "0.5.1" description = "Character encoding aliases for legacy web content" -category = "main" optional = true python-versions = "*" files = [ @@ -3224,7 +3109,6 @@ files = [ name = "wrapt" version = "1.15.0" description = "Module for decorators, wrappers and monkey patching." -category = "main" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" files = [ @@ -3309,7 +3193,6 @@ files = [ name = "zipp" version = "3.16.2" description = "Backport of pathlib-compatible object wrapper for zip files" -category = "main" optional = true python-versions = ">=3.8" files = [ @@ -3328,4 +3211,4 @@ latex = ["ipython"] [metadata] lock-version = "2.0" python-versions = "^3.8,<4.0" -content-hash = "d92b06cab01ad82b0fef3ef5f921164a97a598d275f669729ca4368cd1e7d5af" +content-hash = "8c2d5623878f0333c8475f6392ad33d9fabf17fe0e7f542ed12f71958eff1967" diff --git a/pyproject.toml b/pyproject.toml index 134613e49..c5e787223 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,7 +27,7 @@ rpcq = "^3.10.0" pydantic = "^1.10.7" networkx = ">=2.5" importlib-metadata = { version = ">=3.7.3,<5", python = "<3.8" } -qcs-sdk-python = "0.12.0" +qcs-sdk-python = "0.12.1" tenacity = "^8.2.2" types-python-dateutil = "^2.8.19" types-retry = "^0.9.9" diff --git a/pyquil/api/_abstract_compiler.py b/pyquil/api/_abstract_compiler.py index d04e29d29..5c3f17e00 100644 --- a/pyquil/api/_abstract_compiler.py +++ b/pyquil/api/_abstract_compiler.py @@ -20,7 +20,7 @@ import json from qcs_sdk import QCSClient -from qcs_sdk.compiler.quilc import compile_program, TargetDevice, CompilerOpts, QuilcClient +from qcs_sdk.compiler.quilc import compile_program, TargetDevice, CompilerOpts, QuilcClient, CompilationResult from pyquil._version import pyquil_version from pyquil.api._compiler_client import CompilerClient @@ -103,6 +103,18 @@ def quil_to_native_quil(self, program: Program, *, protoquil: Optional[bool] = N """ Convert a Quil program into native Quil, which is supported for execution on a QPU. """ + result = self._compile_with_quilc( + program.out(calibrations=False), + options=CompilerOpts(protoquil=protoquil, timeout=self._compiler_client.timeout), + ) + + native_program = program.copy_everything_except_instructions() + native_program.native_quil_metadata = result.native_quil_metadata + native_program.inst(result.program) + + return native_program + + def _compile_with_quilc(self, input: str, options: Optional[CompilerOpts] = None) -> CompilationResult: self._connect() # convert the pyquil ``TargetDevice`` to the qcs_sdk ``TargetDevice`` @@ -110,19 +122,13 @@ def quil_to_native_quil(self, program: Program, *, protoquil: Optional[bool] = N target_device_json = json.dumps(compiler_isa_to_target_quantum_processor(compiler_isa).asdict()) # type: ignore target_device = TargetDevice.from_json(target_device_json) - result = compile_program( - quil=program.out(calibrations=False), + return compile_program( + quil=input, target=target_device, client=self._compiler_client.quilc_client, - options=CompilerOpts(protoquil=protoquil, timeout=self._compiler_client.timeout), + options=options, ) - native_program = program.copy_everything_except_instructions() - native_program.native_quil_metadata = result.native_quil_metadata - native_program.inst(result.program) - - return native_program - def _connect(self) -> None: try: _check_quilc_version(self._compiler_client.get_version()) @@ -134,6 +140,11 @@ def _connect(self) -> None: "{DOCS_URL}/troubleshooting.html" ) + def transpile_qasm_2(self, qasm: str) -> Program: + """Transpile a QASM 2.0 program string to Quil, returning the result as a :py:class:~`pyquil.quil.Program`""" + result = self._compile_with_quilc(qasm, options=CompilerOpts(timeout=self._compiler_client.timeout)) + return Program(result.program) + @abstractmethod def native_quil_to_executable(self, nq_program: Program, **kwargs: Any) -> QuantumExecutable: """ diff --git a/pyquil/latex/_diagram.py b/pyquil/latex/_diagram.py index f587d363f..d8d9e12c8 100644 --- a/pyquil/latex/_diagram.py +++ b/pyquil/latex/_diagram.py @@ -37,7 +37,6 @@ ClassicalLoad, ClassicalStore, ClassicalComparison, - RawInstr, Measurement, Gate, Pragma, @@ -108,7 +107,6 @@ class DiagramSettings: ClassicalLoad, ClassicalStore, ClassicalComparison, - RawInstr, ) diff --git a/pyquil/pyqvm.py b/pyquil/pyqvm.py index 5f7cba21e..9dfcd1657 100644 --- a/pyquil/pyqvm.py +++ b/pyquil/pyqvm.py @@ -55,7 +55,6 @@ Jump, Pragma, Declare, - RawInstr, DefGateByPaulis, DefPermutationGate, ) @@ -452,9 +451,6 @@ def transition(self) -> bool: self.defined_gates[instruction.name] = instruction.matrix self.program_counter += 1 - elif isinstance(instruction, RawInstr): - raise NotImplementedError("PyQVM does not support raw instructions. Parse your program") - elif isinstance(instruction, Halt): return True else: diff --git a/pyquil/quilbase.py b/pyquil/quilbase.py index 96018c362..c73728dee 100644 --- a/pyquil/quilbase.py +++ b/pyquil/quilbase.py @@ -1652,23 +1652,6 @@ def __str__(self) -> str: return super().to_quil_or_debug() -class RawInstr(AbstractInstruction): - """ - A raw instruction represented as a string. - """ - - def __init__(self, instr_str: str): - if not isinstance(instr_str, str): - raise TypeError("Raw instructions require a string.") - self.instr = instr_str - - def out(self) -> str: - return self.instr - - def __repr__(self) -> str: - return "".format(self.instr) - - class Pulse(quil_rs.Pulse, AbstractInstruction): def __new__(cls, frame: Frame, waveform: Waveform, nonblocking: bool = False) -> Self: return super().__new__(cls, not nonblocking, frame, waveform) diff --git a/test/unit/__snapshots__/test_compiler.ambr b/test/unit/__snapshots__/test_compiler.ambr new file mode 100644 index 000000000..dbdd56a7e --- /dev/null +++ b/test/unit/__snapshots__/test_compiler.ambr @@ -0,0 +1,9 @@ +# name: test_transpile_qasm_2 + ''' + DECLARE ro BIT[2] + MEASURE 0 ro[0] + MEASURE 1 ro[1] + HALT + + ''' +# --- diff --git a/test/unit/test_compiler.py b/test/unit/test_compiler.py index 02c26ab04..98de38f7e 100644 --- a/test/unit/test_compiler.py +++ b/test/unit/test_compiler.py @@ -1,5 +1,7 @@ import math +from syrupy.assertion import SnapshotAssertion + from pyquil import Program from pyquil.api._compiler import QPUCompiler from pyquil.gates import RX, MEASURE, RZ @@ -25,3 +27,8 @@ def test_compile_with_quilt_calibrations(compiler: QPUCompiler): assert compilation_result.calibrations == cals assert program.calibrations == cals assert compilation_result == program + +def test_transpile_qasm_2(compiler: QPUCompiler, snapshot: SnapshotAssertion): + qasm = 'OPENQASM 2.0;\nqreg q[3];\ncreg ro[2];\nmeasure q[0] -> ro[0];\nmeasure q[1] -> ro[1];' + program = compiler.transpile_qasm_2(qasm) + assert program.out() == snapshot