@@ -48,6 +48,9 @@ class Session(WorkspaceItem):
4848 close and not accept further jobs.
4949 :type job_failure_policy: Union[str, SessionJobFailurePolicy, None]
5050
51+ :param priority: Priority of the session.
52+ :type priority: Optional[str]
53+
5154 :raises ValueError: if details is passed along individual parameters,
5255 or if required parameters are missing.
5356 """
@@ -61,6 +64,7 @@ def __init__(
6164 id : Optional [str ] = None ,
6265 name : Optional [str ] = None ,
6366 job_failure_policy : Union [str , SessionJobFailurePolicy , None ] = None ,
67+ priority : Optional [str ] = None ,
6468 ** kwargs ):
6569 from azure .quantum .target import Target
6670 target_name = target .name if isinstance (target , Target ) else target
@@ -92,6 +96,7 @@ def __init__(
9296 provider_id = provider_id ,
9397 target = target_name ,
9498 job_failure_policy = job_failure_policy ,
99+ priority = priority ,
95100 ** kwargs )
96101
97102 super ().__init__ (
@@ -259,6 +264,7 @@ def open_session(
259264 id : Optional [str ] = None ,
260265 name : Optional [str ] = None ,
261266 job_failure_policy : Union [str , SessionJobFailurePolicy , None ] = None ,
267+ priority : Optional [str ] = None ,
262268 ** kwargs
263269 ) -> Session :
264270 """Opens a session and associates all future job submissions to that
@@ -295,6 +301,10 @@ def open_session(
295301
296302 :param job_failure_policy: The policy that determines when a session would fail,
297303 close and not accept further jobs.
304+ :type job_failure_policy: Union[str, SessionJobFailurePolicy, None]
305+
306+ :param priority: Priority of the session.
307+ :type priority: Optional[str]
298308
299309 :return: The session object with updated details after its opening.
300310 :rtype: Session
@@ -309,6 +319,7 @@ def open_session(
309319 workspace = self ._get_azure_workspace (),
310320 target = self ._get_azure_target_id (),
311321 provider_id = self ._get_azure_provider_id (),
322+ priority = priority ,
312323 ** kwargs )
313324 self .latest_session = session
314325 return session .open ()
0 commit comments