qcs-sdk-python 0.16.4rc1__tar.gz → 0.16.5rc0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/Cargo.lock +4 -4
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/Cargo.toml +1 -1
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/PKG-INFO +2 -2
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/lib/CHANGELOG.md +26 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/lib/Cargo.toml +1 -1
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/lib/src/executable.rs +14 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/lib/src/qpu/api.rs +76 -2
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/lib/src/qpu/execution.rs +11 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/lib/src/qpu/translation.rs +1 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/CHANGELOG.md +26 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/Cargo.toml +1 -1
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/qcs_sdk/qpu/api.pyi +105 -4
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/src/qpu/api.rs +57 -10
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/pyproject.toml +3 -3
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/qcs_sdk/qpu/api.pyi +105 -4
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/README.md +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/lib/Makefile.toml +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/lib/README.md +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/lib/build.rs +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/lib/examples/delayed_job_retrieval.rs +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/lib/examples/execute.rs +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/lib/examples/libquil.rs +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/lib/examples/local.rs +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/lib/examples/parametric_compilation.rs +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/lib/examples/quil_t.rs +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/lib/src/bin/diagnostics.rs +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/lib/src/client.rs +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/lib/src/compiler/isa/edge.rs +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/lib/src/compiler/isa/mod.rs +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/lib/src/compiler/isa/operator.rs +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/lib/src/compiler/isa/qubit.rs +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/lib/src/compiler/libquil.rs +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/lib/src/compiler/mod.rs +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/lib/src/compiler/quilc.rs +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/lib/src/compiler/rpcq.rs +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/lib/src/diagnostics.rs +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/lib/src/execution_data.rs +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/lib/src/lib.rs +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/lib/src/qpu/mod.rs +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/lib/src/qpu/result_data.rs +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/lib/src/qpu/rewrite_arithmetic.rs +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/lib/src/qpu/snapshots/qcs__qpu__rewrite_arithmetic__describe_rewrite_arithmetic__it_allocates_for_multiple_expressions-2.snap +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/lib/src/qpu/snapshots/qcs__qpu__rewrite_arithmetic__describe_rewrite_arithmetic__it_allocates_for_multiple_expressions.snap +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/lib/src/qpu/snapshots/qcs__qpu__rewrite_arithmetic__describe_rewrite_arithmetic__it_converts_frequency_expressions-2.snap +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/lib/src/qpu/snapshots/qcs__qpu__rewrite_arithmetic__describe_rewrite_arithmetic__it_converts_frequency_expressions.snap +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/lib/src/qpu/snapshots/qcs__qpu__rewrite_arithmetic__describe_rewrite_arithmetic__it_converts_phases.snap +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/lib/src/qpu/snapshots/qcs__qpu__rewrite_arithmetic__describe_rewrite_arithmetic__it_converts_set_scale_units.snap +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/lib/src/qpu/snapshots/qcs__qpu__rewrite_arithmetic__describe_rewrite_arithmetic__it_substitutes_and_reuses_gate_expressions.snap +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/lib/src/qpu/snapshots/qcs__qpu__rewrite_arithmetic__describe_rewrite_arithmetic__it_substitutes_gate_parameters.snap +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/lib/src/qvm/execution.rs +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/lib/src/qvm/http.rs +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/lib/src/qvm/libquil.rs +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/lib/src/qvm/mod.rs +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/lib/src/qvm/snapshots/qcs__qvm__test__apply_valid_parameters_to_program.snap +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/lib/src/register_data.rs +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/lib/tests/aspen_9_isa.json +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/lib/tests/basic_qvm.rs +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/lib/tests/bell_state_response_data.hex +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/lib/tests/compiler-isa-Aspen-8.json +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/lib/tests/mocked_qpu.rs +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/lib/tests/parametric_compilation.rs +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/lib/tests/qcs-isa-Aspen-8.json +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/lib/tests/qvm_api.rs +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/lib/tests/qvm_isa.json +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/lib/tests/secrets.toml +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/lib/tests/settings.toml +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/.flake8 +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/.stubtest-allowlist +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/Makefile.toml +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/README.md +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/build.rs +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/poetry.lock +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/qcs_sdk/__init__.py +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/qcs_sdk/__init__.pyi +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/qcs_sdk/client.py +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/qcs_sdk/client.pyi +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/qcs_sdk/compiler/__init__.py +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/qcs_sdk/compiler/__init__.pyi +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/qcs_sdk/compiler/quilc.pyi +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/qcs_sdk/diagnostics.py +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/qcs_sdk/py.typed +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/qcs_sdk/qpu/__init__.py +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/qcs_sdk/qpu/__init__.pyi +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/qcs_sdk/qpu/isa.pyi +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/qcs_sdk/qpu/rewrite_arithmetic.pyi +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/qcs_sdk/qpu/translation.pyi +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/qcs_sdk/qvm/__init__.py +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/qcs_sdk/qvm/__init__.pyi +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/qcs_sdk/qvm/api.pyi +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/src/client.rs +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/src/compiler/mod.rs +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/src/compiler/quilc.rs +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/src/executable.rs +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/src/execution_data.rs +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/src/from_py.rs +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/src/grpc/mod.rs +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/src/grpc/models/controller.rs +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/src/grpc/models/mod.rs +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/src/lib.rs +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/src/py_sync.rs +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/src/qpu/isa.rs +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/src/qpu/mod.rs +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/src/qpu/result_data.rs +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/src/qpu/rewrite_arithmetic.rs +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/src/qpu/translation.rs +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/src/qvm/api.rs +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/src/qvm/mod.rs +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/src/register_data.rs +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/tests/_fixtures/aspen-m-3.json +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/tests/_fixtures/device-2q.json +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/tests/_qcs_config/secrets.toml +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/tests/_qcs_config/settings.toml +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/tests/compiler/__snapshots__/test_quilc.ambr +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/tests/compiler/test_quilc.py +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/tests/conftest.py +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/tests/execution_data/test_execution_data.py +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/tests/qpu/test_api.py +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/tests/qpu/test_isa.py +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/tests/qpu/test_qpu.py +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/tests/qpu/test_rewrite_arithmetic.py +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/tests/qpu/test_translation.py +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/tests/qvm/test_qvm.py +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/tests/test_client.py +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/tests/test_diagnostics.py +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/tests/test_executable.py +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/tests/test_logging.py +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/qcs_sdk/__init__.py +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/qcs_sdk/__init__.pyi +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/qcs_sdk/client.py +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/qcs_sdk/client.pyi +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/qcs_sdk/compiler/__init__.py +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/qcs_sdk/compiler/__init__.pyi +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/qcs_sdk/compiler/quilc.pyi +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/qcs_sdk/diagnostics.py +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/qcs_sdk/py.typed +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/qcs_sdk/qpu/__init__.py +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/qcs_sdk/qpu/__init__.pyi +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/qcs_sdk/qpu/isa.pyi +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/qcs_sdk/qpu/rewrite_arithmetic.pyi +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/qcs_sdk/qpu/translation.pyi +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/qcs_sdk/qvm/__init__.py +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/qcs_sdk/qvm/__init__.pyi +0 -0
- {qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/qcs_sdk/qvm/api.pyi +0 -0
|
@@ -2054,7 +2054,7 @@ dependencies = [
|
|
|
2054
2054
|
|
|
2055
2055
|
[[package]]
|
|
2056
2056
|
name = "qcs"
|
|
2057
|
-
version = "0.20.
|
|
2057
|
+
version = "0.20.6-rc.0"
|
|
2058
2058
|
dependencies = [
|
|
2059
2059
|
"assert2",
|
|
2060
2060
|
"async-trait",
|
|
@@ -2183,7 +2183,7 @@ dependencies = [
|
|
|
2183
2183
|
|
|
2184
2184
|
[[package]]
|
|
2185
2185
|
name = "qcs-sdk-python"
|
|
2186
|
-
version = "0.16.
|
|
2186
|
+
version = "0.16.5-rc.0"
|
|
2187
2187
|
dependencies = [
|
|
2188
2188
|
"async-trait",
|
|
2189
2189
|
"numpy",
|
|
@@ -2213,8 +2213,8 @@ checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0"
|
|
|
2213
2213
|
|
|
2214
2214
|
[[package]]
|
|
2215
2215
|
name = "quil-rs"
|
|
2216
|
-
version = "0.22.
|
|
2217
|
-
source = "git+https://github.com/rigetti/quil-rs?tag=quil-py/v0.6.
|
|
2216
|
+
version = "0.22.6"
|
|
2217
|
+
source = "git+https://github.com/rigetti/quil-rs?tag=quil-py/v0.6.6#b406c3e98a974e391d16236a75b8e6cbea102f2f"
|
|
2218
2218
|
dependencies = [
|
|
2219
2219
|
"approx",
|
|
2220
2220
|
"indexmap 1.9.3",
|
|
@@ -15,7 +15,7 @@ tokio = "1.34.0"
|
|
|
15
15
|
# be a `quil-py` tag and should match the version used in `crates/python/pyproject.toml`
|
|
16
16
|
# The version must also be specified in order to publish to crates.io. Cargo enforces
|
|
17
17
|
# that the specified version is the same as the version in the git repository.
|
|
18
|
-
quil-rs = { version = "0.22.
|
|
18
|
+
quil-rs = { version = "0.22.6", git = "https://github.com/rigetti/quil-rs", tag = "quil-py/v0.6.6" }
|
|
19
19
|
|
|
20
20
|
# ndarray is used by the `qcs` crate, but it is also used in the `python` crate via a
|
|
21
21
|
# re-export through the numpy crate. They should be updated as a pair to keep both
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: qcs-sdk-python
|
|
3
|
-
Version: 0.16.
|
|
3
|
+
Version: 0.16.5rc0
|
|
4
4
|
Classifier: Development Status :: 3 - Alpha
|
|
5
5
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
6
6
|
Classifier: Programming Language :: Python :: 3.8
|
|
@@ -8,7 +8,7 @@ Classifier: Programming Language :: Python :: 3.9
|
|
|
8
8
|
Classifier: Programming Language :: Python :: 3.10
|
|
9
9
|
Classifier: Programming Language :: Python :: 3.11
|
|
10
10
|
Classifier: Operating System :: OS Independent
|
|
11
|
-
Requires-Dist: quil ==0.6.
|
|
11
|
+
Requires-Dist: quil ==0.6.6
|
|
12
12
|
Summary: Python interface for the QCS Rust SDK
|
|
13
13
|
Keywords: pyquil,SDK,Rigetti,Quil,Quantum
|
|
14
14
|
Author-email: Rigetti Computing <softapps@rigetti.com>, Mark Skilbeck <mark.skilbeck@rigetti.com>, Marquess Valdez <mvaldez@rigetti.com>, Randall Fulton <rfulton@rigetti.com>
|
|
@@ -1,3 +1,29 @@
|
|
|
1
|
+
## 0.20.6-rc.0
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
- Jobs that have yet to begin executing can be cancelled. (#438)
|
|
6
|
+
|
|
7
|
+
## 0.20.5
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
- instrument pyo3-opentelemetry (#391)
|
|
12
|
+
|
|
13
|
+
### Fixes
|
|
14
|
+
|
|
15
|
+
- bump quil-rs versions (#435)
|
|
16
|
+
|
|
17
|
+
## 0.20.5-rc.2
|
|
18
|
+
|
|
19
|
+
### Features
|
|
20
|
+
|
|
21
|
+
- instrument pyo3-opentelemetry (#391)
|
|
22
|
+
|
|
23
|
+
### Fixes
|
|
24
|
+
|
|
25
|
+
- bump quil-rs versions (#435)
|
|
26
|
+
|
|
1
27
|
## 0.20.5-rc.1
|
|
2
28
|
|
|
3
29
|
### Features
|
|
@@ -587,6 +587,20 @@ impl<'execution> Executable<'_, 'execution> {
|
|
|
587
587
|
Ok(job_handle)
|
|
588
588
|
}
|
|
589
589
|
|
|
590
|
+
/// Cancel a job that has yet to begin executing.
|
|
591
|
+
///
|
|
592
|
+
/// This action is *not* atomic, and will attempt to cancel a job even if it cannot be cancelled. A
|
|
593
|
+
/// job can be cancelled only if it has not yet started executing.
|
|
594
|
+
///
|
|
595
|
+
/// Success response indicates only that the request was received. Cancellation is not guaranteed,
|
|
596
|
+
/// as it is based on job state at the time of cancellation, and is completed on a best effort
|
|
597
|
+
/// basis.
|
|
598
|
+
pub async fn cancel_qpu_job(&mut self, job_handle: JobHandle<'execution>) -> Result<(), Error> {
|
|
599
|
+
let quantum_processor_id = job_handle.quantum_processor_id.to_string();
|
|
600
|
+
let qpu = self.qpu_for_id(quantum_processor_id).await?;
|
|
601
|
+
Ok(qpu.cancel_job(job_handle).await?)
|
|
602
|
+
}
|
|
603
|
+
|
|
590
604
|
/// Wait for the results of a job submitted via [`Executable::submit_to_qpu`] to complete.
|
|
591
605
|
///
|
|
592
606
|
/// # Errors
|
|
@@ -16,8 +16,9 @@ use qcs_api_client_grpc::{
|
|
|
16
16
|
},
|
|
17
17
|
services::controller::{
|
|
18
18
|
controller_client::ControllerClient, execute_controller_job_request,
|
|
19
|
-
get_controller_job_results_request,
|
|
20
|
-
ExecutionOptions as InnerApiExecutionOptions,
|
|
19
|
+
get_controller_job_results_request, CancelControllerJobsRequest,
|
|
20
|
+
ExecuteControllerJobRequest, ExecutionOptions as InnerApiExecutionOptions,
|
|
21
|
+
GetControllerJobResultsRequest,
|
|
21
22
|
},
|
|
22
23
|
};
|
|
23
24
|
pub use qcs_api_client_openapi::apis::Error as OpenApiError;
|
|
@@ -125,6 +126,79 @@ pub async fn submit(
|
|
|
125
126
|
.ok_or_else(|| GrpcClientError::ResponseEmpty("Job Execution ID".into()))?)
|
|
126
127
|
}
|
|
127
128
|
|
|
129
|
+
/// Cancel all given jobs that have yet to begin executing.
|
|
130
|
+
///
|
|
131
|
+
/// This action is *not* atomic, and will attempt to cancel every job even when some jobs cannot be
|
|
132
|
+
/// cancelled. A job can be cancelled only if it has not yet started executing.
|
|
133
|
+
///
|
|
134
|
+
/// Success response indicates only that the request was received. Cancellation is not guaranteed,
|
|
135
|
+
/// as it is based on job state at the time of cancellation, and is completed on a best effort
|
|
136
|
+
/// basis.
|
|
137
|
+
///
|
|
138
|
+
/// # Arguments
|
|
139
|
+
/// * `quantum_processor_id` - The quantum processor to execute the job on. This parameter
|
|
140
|
+
/// is required unless using [`ConnectionStrategy::EndpointId`] in `execution_options`
|
|
141
|
+
/// to target a specific endpoint ID.
|
|
142
|
+
/// * `job_ids` - The [`JobId`]s to cancel.
|
|
143
|
+
/// * `client` - The [`Qcs`] client to use.
|
|
144
|
+
/// * `execution_options` - The [`ExecutionOptions`] to use. If the connection strategy used
|
|
145
|
+
/// is [`ConnectionStrategy::EndpointId`] then direct access to that endpoint
|
|
146
|
+
/// overrides the `quantum_processor_id` parameter.
|
|
147
|
+
pub async fn cancel_jobs(
|
|
148
|
+
job_ids: Vec<JobId>,
|
|
149
|
+
quantum_processor_id: Option<&str>,
|
|
150
|
+
client: &Qcs,
|
|
151
|
+
execution_options: &ExecutionOptions,
|
|
152
|
+
) -> Result<(), QpuApiError> {
|
|
153
|
+
let request = CancelControllerJobsRequest {
|
|
154
|
+
job_ids: job_ids.into_iter().map(|id| id.0).collect(),
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
let mut controller_client = execution_options
|
|
158
|
+
.get_controller_client(client, quantum_processor_id)
|
|
159
|
+
.await?;
|
|
160
|
+
|
|
161
|
+
controller_client
|
|
162
|
+
.cancel_controller_jobs(request)
|
|
163
|
+
.await
|
|
164
|
+
.map_err(GrpcClientError::RequestFailed)?;
|
|
165
|
+
|
|
166
|
+
Ok(())
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/// Cancel a job that has yet to begin executing.
|
|
170
|
+
///
|
|
171
|
+
/// This action is *not* atomic, and will attempt to cancel a job even if it cannot be cancelled. A
|
|
172
|
+
/// job can be cancelled only if it has not yet started executing.
|
|
173
|
+
///
|
|
174
|
+
/// Success response indicates only that the request was received. Cancellation is not guaranteed,
|
|
175
|
+
/// as it is based on job state at the time of cancellation, and is completed on a best effort
|
|
176
|
+
/// basis.
|
|
177
|
+
///
|
|
178
|
+
/// # Arguments
|
|
179
|
+
/// * `quantum_processor_id` - The quantum processor to execute the job on. This parameter is
|
|
180
|
+
/// required unless using [`ConnectionStrategy::EndpointId`] in `execution_options` to target
|
|
181
|
+
/// a specific endpoint ID.
|
|
182
|
+
/// * `job_ids` - The [`JobId`]s to cancel.
|
|
183
|
+
/// * `client` - The [`Qcs`] client to use.
|
|
184
|
+
/// * `execution_options` - The [`ExecutionOptions`] to use. If the connection strategy used is
|
|
185
|
+
/// [`ConnectionStrategy::EndpointId`] then direct access to that endpoint overrides the
|
|
186
|
+
/// `quantum_processor_id` parameter.
|
|
187
|
+
pub async fn cancel_job(
|
|
188
|
+
job_id: JobId,
|
|
189
|
+
quantum_processor_id: Option<&str>,
|
|
190
|
+
client: &Qcs,
|
|
191
|
+
execution_options: &ExecutionOptions,
|
|
192
|
+
) -> Result<(), QpuApiError> {
|
|
193
|
+
cancel_jobs(
|
|
194
|
+
vec![job_id],
|
|
195
|
+
quantum_processor_id,
|
|
196
|
+
client,
|
|
197
|
+
execution_options,
|
|
198
|
+
)
|
|
199
|
+
.await
|
|
200
|
+
}
|
|
201
|
+
|
|
128
202
|
/// Fetch results from QPU job execution.
|
|
129
203
|
///
|
|
130
204
|
/// # Arguments
|
|
@@ -259,6 +259,17 @@ impl<'a> Execution<'a> {
|
|
|
259
259
|
))
|
|
260
260
|
}
|
|
261
261
|
|
|
262
|
+
pub(crate) async fn cancel_job(&self, job_handle: JobHandle<'a>) -> Result<(), Error> {
|
|
263
|
+
crate::qpu::api::cancel_job(
|
|
264
|
+
job_handle.job_id(),
|
|
265
|
+
Some(job_handle.quantum_processor_id()),
|
|
266
|
+
self.client.as_ref(),
|
|
267
|
+
job_handle.execution_options(),
|
|
268
|
+
)
|
|
269
|
+
.await
|
|
270
|
+
.map_err(Error::from)
|
|
271
|
+
}
|
|
272
|
+
|
|
262
273
|
pub(crate) async fn retrieve_results(
|
|
263
274
|
&self,
|
|
264
275
|
job_handle: JobHandle<'a>,
|
|
@@ -174,6 +174,7 @@ impl TranslationOptions {
|
|
|
174
174
|
options
|
|
175
175
|
}
|
|
176
176
|
|
|
177
|
+
#[allow(dead_code)]
|
|
177
178
|
fn ensure_backend_v1(&mut self) -> Result<&mut BackendV1Options, TranslationBackendMismatch> {
|
|
178
179
|
if matches!(self.backend(), None | Some(TranslationBackend::V1(_))) {
|
|
179
180
|
Ok(self.with_backend_v1())
|
|
@@ -1,3 +1,29 @@
|
|
|
1
|
+
## 0.16.5-rc.0
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
- Jobs that have yet to begin executing can be cancelled. (#438)
|
|
6
|
+
|
|
7
|
+
## 0.16.4
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
- instrument pyo3-opentelemetry (#391)
|
|
12
|
+
|
|
13
|
+
### Fixes
|
|
14
|
+
|
|
15
|
+
- bump quil-rs versions (#435)
|
|
16
|
+
|
|
17
|
+
## 0.16.4-rc.2
|
|
18
|
+
|
|
19
|
+
### Features
|
|
20
|
+
|
|
21
|
+
- instrument pyo3-opentelemetry (#391)
|
|
22
|
+
|
|
23
|
+
### Fixes
|
|
24
|
+
|
|
25
|
+
- bump quil-rs versions (#435)
|
|
26
|
+
|
|
1
27
|
## 0.16.4-rc.1
|
|
2
28
|
|
|
3
29
|
### Features
|
|
@@ -8,8 +8,8 @@ class SubmissionError(RuntimeError):
|
|
|
8
8
|
|
|
9
9
|
...
|
|
10
10
|
|
|
11
|
-
class
|
|
12
|
-
"""
|
|
11
|
+
class QpuApiError(RuntimeError):
|
|
12
|
+
"""An error occured while interacting with the QPU API."""
|
|
13
13
|
|
|
14
14
|
...
|
|
15
15
|
|
|
@@ -133,6 +133,107 @@ async def submit_async(
|
|
|
133
133
|
"""
|
|
134
134
|
...
|
|
135
135
|
|
|
136
|
+
def cancel_job(
|
|
137
|
+
job_id: str,
|
|
138
|
+
quantum_processor_id: Optional[str] = None,
|
|
139
|
+
client: Optional[QCSClient] = None,
|
|
140
|
+
execution_options: Optional[ExecutionOptions] = None,
|
|
141
|
+
):
|
|
142
|
+
"""
|
|
143
|
+
Cancel a job that has yet to begin executing.
|
|
144
|
+
|
|
145
|
+
This action is *not* atomic, and will attempt to cancel a job even if it cannot be cancelled. A
|
|
146
|
+
job can be cancelled only if it has not yet started executing.
|
|
147
|
+
|
|
148
|
+
Success response indicates only that the request was received. Cancellation is not guaranteed,
|
|
149
|
+
as it is based on job state at the time of cancellation, and is completed on a best effort
|
|
150
|
+
basis.
|
|
151
|
+
|
|
152
|
+
:param job_id: The job ID to cancel.
|
|
153
|
+
:param quantum_processor_id: The quantum processor to execute the job on. This parameter is
|
|
154
|
+
required unless using the `ConnectionStrategy.endpoint_id()` execution option.
|
|
155
|
+
:client: - The `QCSClient` to use.
|
|
156
|
+
:execution_options: The `ExecutionOptions` to use. If the connection strategy used is
|
|
157
|
+
ConnectionStrategy.endpoint_id() then direct access to that endpoint overrides the
|
|
158
|
+
`quantum_processor_id` parameter.
|
|
159
|
+
"""
|
|
160
|
+
...
|
|
161
|
+
|
|
162
|
+
async def cancel_job_async(
|
|
163
|
+
job_id: str,
|
|
164
|
+
quantum_processor_id: Optional[str] = None,
|
|
165
|
+
client: Optional[QCSClient] = None,
|
|
166
|
+
execution_options: Optional[ExecutionOptions] = None,
|
|
167
|
+
):
|
|
168
|
+
"""
|
|
169
|
+
Cancel a job that has yet to begin executing (async analog of `cancel_job`).
|
|
170
|
+
|
|
171
|
+
This action is *not* atomic, and will attempt to cancel a job even if it cannot be cancelled. A
|
|
172
|
+
job can be cancelled only if it has not yet started executing.
|
|
173
|
+
|
|
174
|
+
Success response indicates only that the request was received. Cancellation is not guaranteed,
|
|
175
|
+
as it is based on job state at the time of cancellation, and is completed on a best effort
|
|
176
|
+
basis.
|
|
177
|
+
|
|
178
|
+
:param job_id: The job ID to cancel.
|
|
179
|
+
:param quantum_processor_id: The quantum processor to execute the job on. This parameter is
|
|
180
|
+
required unless using the `ConnectionStrategy.endpoint_id()` execution option.
|
|
181
|
+
:client: - The `QCSClient` to use.
|
|
182
|
+
:execution_options: The `ExecutionOptions` to use. If the connection strategy used is
|
|
183
|
+
ConnectionStrategy.endpoint_id() then direct access to that endpoint overrides the
|
|
184
|
+
`quantum_processor_id` parameter.
|
|
185
|
+
"""
|
|
186
|
+
...
|
|
187
|
+
|
|
188
|
+
def cancel_jobs(
|
|
189
|
+
job_ids: List[str],
|
|
190
|
+
quantum_processor_id: Optional[str] = None,
|
|
191
|
+
client: Optional[QCSClient] = None,
|
|
192
|
+
execution_options: Optional[ExecutionOptions] = None,
|
|
193
|
+
):
|
|
194
|
+
"""
|
|
195
|
+
Cancel all given jobs that have yet to begin executing.
|
|
196
|
+
|
|
197
|
+
This action is *not* atomic, and will attempt to cancel every job even when some jobs cannot be
|
|
198
|
+
cancelled. A job can be cancelled only if it has not yet started executing.
|
|
199
|
+
|
|
200
|
+
Success response indicates only that the request was received. Cancellation is not guaranteed,
|
|
201
|
+
as it is based on job state at the time of cancellation, and is completed on a best effort
|
|
202
|
+
basis.
|
|
203
|
+
|
|
204
|
+
:param quantum_processor_id: The quantum processor to execute the job on. This parameter is
|
|
205
|
+
required unless using the `ConnectionStrategy.endpoint_id()` execution option.
|
|
206
|
+
:param job_ids: The job IDs to cancel.
|
|
207
|
+
:client: - The `QCSClient` to use.
|
|
208
|
+
:execution_options: The `ExecutionOptions` to use. If the connection strategy used is
|
|
209
|
+
ConnectionStrategy.endpoint_id() then direct access to that endpoint overrides the
|
|
210
|
+
`quantum_processor_id` parameter.
|
|
211
|
+
"""
|
|
212
|
+
...
|
|
213
|
+
|
|
214
|
+
async def cancel_jobs_async(
|
|
215
|
+
job_ids: List[str],
|
|
216
|
+
quantum_processor_id: Optional[str] = None,
|
|
217
|
+
client: Optional[QCSClient] = None,
|
|
218
|
+
execution_options: Optional[ExecutionOptions] = None,
|
|
219
|
+
):
|
|
220
|
+
"""
|
|
221
|
+
Cancel all given jobs that have yet to begin executing (async analog of `cancel_jobs`).
|
|
222
|
+
|
|
223
|
+
Success response indicates only that the request was received. Cancellation is not guaranteed,
|
|
224
|
+
as it is based on job state at the time of cancellation, and is completed on a best effort
|
|
225
|
+
basis.
|
|
226
|
+
|
|
227
|
+
:param quantum_processor_id: The quantum processor to execute the job on. This parameter is
|
|
228
|
+
required unless using the `ConnectionStrategy.endpoint_id()` execution option.
|
|
229
|
+
:param job_ids: The job IDs to cancel.
|
|
230
|
+
:client: - The `QCSClient` to use.
|
|
231
|
+
:execution_options: The `ExecutionOptions` to use. If the connection strategy used is
|
|
232
|
+
ConnectionStrategy.endpoint_id() then direct access to that endpoint overrides the
|
|
233
|
+
`quantum_processor_id` parameter.
|
|
234
|
+
"""
|
|
235
|
+
...
|
|
236
|
+
|
|
136
237
|
def retrieve_results(
|
|
137
238
|
job_id: str,
|
|
138
239
|
quantum_processor_id: Optional[str] = None,
|
|
@@ -151,7 +252,7 @@ def retrieve_results(
|
|
|
151
252
|
:returns: results from execution.
|
|
152
253
|
|
|
153
254
|
:raises LoadClientError: If there is an issue loading the QCS Client configuration.
|
|
154
|
-
:raises
|
|
255
|
+
:raises QpuApiError: If there was a problem retrieving the results.
|
|
155
256
|
"""
|
|
156
257
|
...
|
|
157
258
|
|
|
@@ -174,7 +275,7 @@ async def retrieve_results_async(
|
|
|
174
275
|
:returns: results from execution.
|
|
175
276
|
|
|
176
277
|
:raises LoadClientError: If there is an issue loading the QCS Client configuration.
|
|
177
|
-
:raises
|
|
278
|
+
:raises QpuApiError: If there was a problem retrieving the results.
|
|
178
279
|
"""
|
|
179
280
|
...
|
|
180
281
|
|
|
@@ -42,11 +42,15 @@ create_init_submodule! {
|
|
|
42
42
|
],
|
|
43
43
|
errors: [
|
|
44
44
|
SubmissionError,
|
|
45
|
-
|
|
45
|
+
QpuApiError
|
|
46
46
|
],
|
|
47
47
|
funcs: [
|
|
48
48
|
py_submit,
|
|
49
49
|
py_submit_async,
|
|
50
|
+
py_cancel_job,
|
|
51
|
+
py_cancel_job_async,
|
|
52
|
+
py_cancel_jobs,
|
|
53
|
+
py_cancel_jobs_async,
|
|
50
54
|
py_retrieve_results,
|
|
51
55
|
py_retrieve_results_async
|
|
52
56
|
],
|
|
@@ -107,13 +111,8 @@ py_function_sync_async! {
|
|
|
107
111
|
}
|
|
108
112
|
}
|
|
109
113
|
|
|
110
|
-
wrap_error!(
|
|
111
|
-
py_wrap_error!(
|
|
112
|
-
runner,
|
|
113
|
-
RustRetrieveResultsError,
|
|
114
|
-
RetrieveResultsError,
|
|
115
|
-
PyRuntimeError
|
|
116
|
-
);
|
|
114
|
+
wrap_error!(RustQpuApiError(qcs::qpu::api::QpuApiError));
|
|
115
|
+
py_wrap_error!(runner, RustQpuApiError, QpuApiError, PyRuntimeError);
|
|
117
116
|
|
|
118
117
|
/// Variants of data vectors within a single ExecutionResult.
|
|
119
118
|
#[derive(Clone, Debug)]
|
|
@@ -276,6 +275,54 @@ impl ExecutionResults {
|
|
|
276
275
|
}
|
|
277
276
|
}
|
|
278
277
|
|
|
278
|
+
py_function_sync_async! {
|
|
279
|
+
#[pyfunction]
|
|
280
|
+
#[pyo3(signature = (job_ids, quantum_processor_id = None, client = None, execution_options = None))]
|
|
281
|
+
async fn cancel_jobs(
|
|
282
|
+
job_ids: Vec<String>,
|
|
283
|
+
quantum_processor_id: Option<String>,
|
|
284
|
+
client: Option<PyQcsClient>,
|
|
285
|
+
execution_options: Option<PyExecutionOptions>,
|
|
286
|
+
) -> PyResult<()> {
|
|
287
|
+
let client = PyQcsClient::get_or_create_client(client).await;
|
|
288
|
+
|
|
289
|
+
qcs::qpu::api::cancel_jobs(
|
|
290
|
+
job_ids.into_iter().map(|id| id.into()).collect(),
|
|
291
|
+
quantum_processor_id.as_deref(),
|
|
292
|
+
&client,
|
|
293
|
+
execution_options.unwrap_or_default().as_inner()
|
|
294
|
+
)
|
|
295
|
+
.await
|
|
296
|
+
.map_err(RustQpuApiError::from).map_err(RustQpuApiError::to_py_err)?;
|
|
297
|
+
|
|
298
|
+
Ok(())
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
py_function_sync_async! {
|
|
303
|
+
#[pyfunction]
|
|
304
|
+
#[pyo3(signature = (job_id, quantum_processor_id = None, client = None, execution_options = None))]
|
|
305
|
+
async fn cancel_job(
|
|
306
|
+
job_id: String,
|
|
307
|
+
quantum_processor_id: Option<String>,
|
|
308
|
+
client: Option<PyQcsClient>,
|
|
309
|
+
execution_options: Option<PyExecutionOptions>,
|
|
310
|
+
) -> PyResult<()> {
|
|
311
|
+
let client = PyQcsClient::get_or_create_client(client).await;
|
|
312
|
+
|
|
313
|
+
qcs::qpu::api::cancel_job(
|
|
314
|
+
job_id.into(),
|
|
315
|
+
quantum_processor_id.as_deref(),
|
|
316
|
+
&client,
|
|
317
|
+
execution_options.unwrap_or_default().as_inner()
|
|
318
|
+
)
|
|
319
|
+
.await
|
|
320
|
+
.map_err(RustQpuApiError::from).map_err(RustQpuApiError::to_py_err)?;
|
|
321
|
+
|
|
322
|
+
Ok(())
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
|
|
279
326
|
py_function_sync_async! {
|
|
280
327
|
#[pyfunction]
|
|
281
328
|
#[pyo3(signature = (job_id, quantum_processor_id = None, client = None, execution_options = None))]
|
|
@@ -289,8 +336,8 @@ py_function_sync_async! {
|
|
|
289
336
|
|
|
290
337
|
let results = qcs::qpu::api::retrieve_results(job_id.into(), quantum_processor_id.as_deref(), &client, execution_options.unwrap_or_default().as_inner())
|
|
291
338
|
.await
|
|
292
|
-
.map_err(
|
|
293
|
-
.map_err(
|
|
339
|
+
.map_err(RustQpuApiError::from)
|
|
340
|
+
.map_err(RustQpuApiError::to_py_err)?;
|
|
294
341
|
|
|
295
342
|
Python::with_gil(|py| {
|
|
296
343
|
ExecutionResults::from_controller_job_execution_result(py, results)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# This is the metadata Maturin uploads to PyPI on publish
|
|
2
2
|
[project]
|
|
3
3
|
name = "qcs-sdk-python"
|
|
4
|
-
version = "0.16.
|
|
4
|
+
version = "0.16.5-rc.0"
|
|
5
5
|
description = "Python interface for the QCS Rust SDK"
|
|
6
6
|
readme = "README.md"
|
|
7
7
|
license = { text = "Apache-2.0" }
|
|
@@ -20,13 +20,13 @@ classifiers = [
|
|
|
20
20
|
"Programming Language :: Python :: 3.11",
|
|
21
21
|
"Operating System :: OS Independent",
|
|
22
22
|
]
|
|
23
|
-
dependencies = ["quil==0.6.
|
|
23
|
+
dependencies = ["quil==0.6.6"]
|
|
24
24
|
|
|
25
25
|
# PEP 621 specifies the [project] table as the source for project metadata. However, Poetry only supports [tool.poetry]
|
|
26
26
|
# We can remove this table once this issue is resolved: https://github.com/python-poetry/poetry/issues/3332
|
|
27
27
|
[tool.poetry]
|
|
28
28
|
name = "qcs-sdk-python"
|
|
29
|
-
version = "0.16.
|
|
29
|
+
version = "0.16.5-rc.0"
|
|
30
30
|
description = "Python interface for the QCS Rust SDK"
|
|
31
31
|
readme = "README.md"
|
|
32
32
|
authors = [
|
|
@@ -8,8 +8,8 @@ class SubmissionError(RuntimeError):
|
|
|
8
8
|
|
|
9
9
|
...
|
|
10
10
|
|
|
11
|
-
class
|
|
12
|
-
"""
|
|
11
|
+
class QpuApiError(RuntimeError):
|
|
12
|
+
"""An error occured while interacting with the QPU API."""
|
|
13
13
|
|
|
14
14
|
...
|
|
15
15
|
|
|
@@ -133,6 +133,107 @@ async def submit_async(
|
|
|
133
133
|
"""
|
|
134
134
|
...
|
|
135
135
|
|
|
136
|
+
def cancel_job(
|
|
137
|
+
job_id: str,
|
|
138
|
+
quantum_processor_id: Optional[str] = None,
|
|
139
|
+
client: Optional[QCSClient] = None,
|
|
140
|
+
execution_options: Optional[ExecutionOptions] = None,
|
|
141
|
+
):
|
|
142
|
+
"""
|
|
143
|
+
Cancel a job that has yet to begin executing.
|
|
144
|
+
|
|
145
|
+
This action is *not* atomic, and will attempt to cancel a job even if it cannot be cancelled. A
|
|
146
|
+
job can be cancelled only if it has not yet started executing.
|
|
147
|
+
|
|
148
|
+
Success response indicates only that the request was received. Cancellation is not guaranteed,
|
|
149
|
+
as it is based on job state at the time of cancellation, and is completed on a best effort
|
|
150
|
+
basis.
|
|
151
|
+
|
|
152
|
+
:param job_id: The job ID to cancel.
|
|
153
|
+
:param quantum_processor_id: The quantum processor to execute the job on. This parameter is
|
|
154
|
+
required unless using the `ConnectionStrategy.endpoint_id()` execution option.
|
|
155
|
+
:client: - The `QCSClient` to use.
|
|
156
|
+
:execution_options: The `ExecutionOptions` to use. If the connection strategy used is
|
|
157
|
+
ConnectionStrategy.endpoint_id() then direct access to that endpoint overrides the
|
|
158
|
+
`quantum_processor_id` parameter.
|
|
159
|
+
"""
|
|
160
|
+
...
|
|
161
|
+
|
|
162
|
+
async def cancel_job_async(
|
|
163
|
+
job_id: str,
|
|
164
|
+
quantum_processor_id: Optional[str] = None,
|
|
165
|
+
client: Optional[QCSClient] = None,
|
|
166
|
+
execution_options: Optional[ExecutionOptions] = None,
|
|
167
|
+
):
|
|
168
|
+
"""
|
|
169
|
+
Cancel a job that has yet to begin executing (async analog of `cancel_job`).
|
|
170
|
+
|
|
171
|
+
This action is *not* atomic, and will attempt to cancel a job even if it cannot be cancelled. A
|
|
172
|
+
job can be cancelled only if it has not yet started executing.
|
|
173
|
+
|
|
174
|
+
Success response indicates only that the request was received. Cancellation is not guaranteed,
|
|
175
|
+
as it is based on job state at the time of cancellation, and is completed on a best effort
|
|
176
|
+
basis.
|
|
177
|
+
|
|
178
|
+
:param job_id: The job ID to cancel.
|
|
179
|
+
:param quantum_processor_id: The quantum processor to execute the job on. This parameter is
|
|
180
|
+
required unless using the `ConnectionStrategy.endpoint_id()` execution option.
|
|
181
|
+
:client: - The `QCSClient` to use.
|
|
182
|
+
:execution_options: The `ExecutionOptions` to use. If the connection strategy used is
|
|
183
|
+
ConnectionStrategy.endpoint_id() then direct access to that endpoint overrides the
|
|
184
|
+
`quantum_processor_id` parameter.
|
|
185
|
+
"""
|
|
186
|
+
...
|
|
187
|
+
|
|
188
|
+
def cancel_jobs(
|
|
189
|
+
job_ids: List[str],
|
|
190
|
+
quantum_processor_id: Optional[str] = None,
|
|
191
|
+
client: Optional[QCSClient] = None,
|
|
192
|
+
execution_options: Optional[ExecutionOptions] = None,
|
|
193
|
+
):
|
|
194
|
+
"""
|
|
195
|
+
Cancel all given jobs that have yet to begin executing.
|
|
196
|
+
|
|
197
|
+
This action is *not* atomic, and will attempt to cancel every job even when some jobs cannot be
|
|
198
|
+
cancelled. A job can be cancelled only if it has not yet started executing.
|
|
199
|
+
|
|
200
|
+
Success response indicates only that the request was received. Cancellation is not guaranteed,
|
|
201
|
+
as it is based on job state at the time of cancellation, and is completed on a best effort
|
|
202
|
+
basis.
|
|
203
|
+
|
|
204
|
+
:param quantum_processor_id: The quantum processor to execute the job on. This parameter is
|
|
205
|
+
required unless using the `ConnectionStrategy.endpoint_id()` execution option.
|
|
206
|
+
:param job_ids: The job IDs to cancel.
|
|
207
|
+
:client: - The `QCSClient` to use.
|
|
208
|
+
:execution_options: The `ExecutionOptions` to use. If the connection strategy used is
|
|
209
|
+
ConnectionStrategy.endpoint_id() then direct access to that endpoint overrides the
|
|
210
|
+
`quantum_processor_id` parameter.
|
|
211
|
+
"""
|
|
212
|
+
...
|
|
213
|
+
|
|
214
|
+
async def cancel_jobs_async(
|
|
215
|
+
job_ids: List[str],
|
|
216
|
+
quantum_processor_id: Optional[str] = None,
|
|
217
|
+
client: Optional[QCSClient] = None,
|
|
218
|
+
execution_options: Optional[ExecutionOptions] = None,
|
|
219
|
+
):
|
|
220
|
+
"""
|
|
221
|
+
Cancel all given jobs that have yet to begin executing (async analog of `cancel_jobs`).
|
|
222
|
+
|
|
223
|
+
Success response indicates only that the request was received. Cancellation is not guaranteed,
|
|
224
|
+
as it is based on job state at the time of cancellation, and is completed on a best effort
|
|
225
|
+
basis.
|
|
226
|
+
|
|
227
|
+
:param quantum_processor_id: The quantum processor to execute the job on. This parameter is
|
|
228
|
+
required unless using the `ConnectionStrategy.endpoint_id()` execution option.
|
|
229
|
+
:param job_ids: The job IDs to cancel.
|
|
230
|
+
:client: - The `QCSClient` to use.
|
|
231
|
+
:execution_options: The `ExecutionOptions` to use. If the connection strategy used is
|
|
232
|
+
ConnectionStrategy.endpoint_id() then direct access to that endpoint overrides the
|
|
233
|
+
`quantum_processor_id` parameter.
|
|
234
|
+
"""
|
|
235
|
+
...
|
|
236
|
+
|
|
136
237
|
def retrieve_results(
|
|
137
238
|
job_id: str,
|
|
138
239
|
quantum_processor_id: Optional[str] = None,
|
|
@@ -151,7 +252,7 @@ def retrieve_results(
|
|
|
151
252
|
:returns: results from execution.
|
|
152
253
|
|
|
153
254
|
:raises LoadClientError: If there is an issue loading the QCS Client configuration.
|
|
154
|
-
:raises
|
|
255
|
+
:raises QpuApiError: If there was a problem retrieving the results.
|
|
155
256
|
"""
|
|
156
257
|
...
|
|
157
258
|
|
|
@@ -174,7 +275,7 @@ async def retrieve_results_async(
|
|
|
174
275
|
:returns: results from execution.
|
|
175
276
|
|
|
176
277
|
:raises LoadClientError: If there is an issue loading the QCS Client configuration.
|
|
177
|
-
:raises
|
|
278
|
+
:raises QpuApiError: If there was a problem retrieving the results.
|
|
178
279
|
"""
|
|
179
280
|
...
|
|
180
281
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/lib/examples/delayed_job_retrieval.rs
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/lib/examples/parametric_compilation.rs
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/lib/src/compiler/isa/operator.rs
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/lib/src/qpu/rewrite_arithmetic.rs
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/lib/tests/bell_state_response_data.hex
RENAMED
|
File without changes
|
{qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/lib/tests/compiler-isa-Aspen-8.json
RENAMED
|
File without changes
|
|
File without changes
|
{qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/lib/tests/parametric_compilation.rs
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/qcs_sdk/compiler/__init__.py
RENAMED
|
File without changes
|
{qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/qcs_sdk/compiler/__init__.pyi
RENAMED
|
File without changes
|
{qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/qcs_sdk/compiler/quilc.pyi
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/qcs_sdk/qpu/__init__.pyi
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/qcs_sdk/qpu/translation.pyi
RENAMED
|
File without changes
|
|
File without changes
|
{qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/qcs_sdk/qvm/__init__.pyi
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/src/grpc/models/controller.rs
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/src/qpu/rewrite_arithmetic.rs
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/tests/_fixtures/aspen-m-3.json
RENAMED
|
File without changes
|
{qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/tests/_fixtures/device-2q.json
RENAMED
|
File without changes
|
{qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/tests/_qcs_config/secrets.toml
RENAMED
|
File without changes
|
{qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/tests/_qcs_config/settings.toml
RENAMED
|
File without changes
|
|
File without changes
|
{qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/tests/compiler/test_quilc.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/tests/qpu/test_translation.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/tests/test_diagnostics.py
RENAMED
|
File without changes
|
{qcs_sdk_python-0.16.4rc1 → qcs_sdk_python-0.16.5rc0}/crates/python/tests/test_executable.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|