Skip to content

Commit 2638b90

Browse files
authored
doc: points to braket doc when using experimental caps (#1149)
1 parent 1a0f9bd commit 2638b90

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/braket/experimental_capabilities/experimental_capability_context.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
from __future__ import annotations
1515

1616
import types
17+
import warnings
1718

1819

1920
class ExperimentalCapabilityContextError(Exception):
@@ -83,6 +84,18 @@ def __enter__(self) -> None:
8384
"""
8485
GLOBAL_EXPERIMENTAL_CAPABILITY_CONTEXT.enable()
8586

87+
warnings.warn(
88+
(
89+
"You are enabling experimental capabilities. To view descriptions and "
90+
"restrictions of experimental capabilities, please review Amazon Braket "
91+
"Developer Guide ("
92+
"https://docs.aws.amazon.com/braket/latest/developerguide/braket-experimental-capabilities.html"
93+
")."
94+
),
95+
category=UserWarning,
96+
stacklevel=1,
97+
)
98+
8699
def __exit__(
87100
self,
88101
exc_type: type[BaseException] | None,

0 commit comments

Comments
 (0)