From 2a55ca28cccb8b2be3a5635a05fd3da8430b2700 Mon Sep 17 00:00:00 2001 From: Phillip Weinberg Date: Mon, 23 Oct 2023 11:30:23 -0400 Subject: [PATCH 1/2] 724 device capabilities info (#736) * adding doc string for `get_capabilities`. * adding `get_capabilities` to public API. --- src/bloqade/__init__.py | 2 ++ src/bloqade/submission/capabilities.py | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/bloqade/__init__.py b/src/bloqade/__init__.py index e9629bbd7..d2328acdd 100644 --- a/src/bloqade/__init__.py +++ b/src/bloqade/__init__.py @@ -11,6 +11,7 @@ ) import bloqade.ir as _ir from bloqade.constants import RB_C6 +from bloqade.submission.capabilities import get_capabilities import importlib.metadata @@ -52,4 +53,5 @@ def tree_depth(depth: int = None): "dumps", "rydberg_h", "waveform", + "get_capabilities", ] diff --git a/src/bloqade/submission/capabilities.py b/src/bloqade/submission/capabilities.py index 041516fa3..7f2818a17 100644 --- a/src/bloqade/submission/capabilities.py +++ b/src/bloqade/submission/capabilities.py @@ -4,7 +4,12 @@ # TODO: Create unit converter for capabilities -def get_capabilities(): +def get_capabilities() -> QuEraCapabilities: + """Get the device capabilities for Aquila + + Returns: + QuEraCapabilities: capabilities object for Aquila + """ base_path = os.path.dirname(__file__) full_path = os.path.join( base_path, "quera_api_client", "config", "capabilities.json" From 624dafff3548ca2bd78e7b28341bbf6c53cb1299 Mon Sep 17 00:00:00 2001 From: Phillip Weinberg Date: Mon, 23 Oct 2023 11:58:35 -0400 Subject: [PATCH 2/2] update .gitignore. --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index cc40feb02..154e35de1 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,7 @@ out.txt .DS_Store tests/data/jobs/ main.html -main*.py +main # Byte-compiled / optimized / DLL files __pycache__/