Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions qiskit_ibm_runtime/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,10 +217,21 @@ def from_id(
session_id: str,
service: Optional[QiskitRuntimeService] = None,
backend: Optional[Union[str, IBMBackend]] = None,
max_time: Optional[Union[int, str]] = None,
) -> "Session":
"""Construct a Session object with a given session_id"""
session = cls(service, backend, max_time)
"""Construct a Session object with a given session_id

Args:
session_id: the id of the session to be created. This can be an already
existing session id.
service: instance of the ``QiskitRuntimeService`` class.
backend: instance of :class:`qiskit_ibm_runtime.IBMBackend` class or
string name of backend.

Returns:
A new Session with the given ``session_id``

"""
session = cls(service, backend)
session._session_id = session_id
return session

Expand Down