qiskit_serverless.core.get_runtime_service¶
- get_runtime_service(channel=None, token=None, instance=None, url=None)[source]¶
Get a QiskitRuntimeService wrapped into a ServerlessRuntimeService instance that allows to associate runtime job ids to serverless job ids. All input arguments are optional, and the recommended usage within a QiskitFunction source code is
get_runtime_service(), which will automatically pull authentication data from the environment variables.Set
QISKIT_IBM_PRIVATE_ENDPOINTtotrueto reach the Runtime API through a virtual private endpoint. It defaults to off, and the instance has to be a CRN for the private host to be resolved.- Parameters:
channel (
Optional[str]) – Optional QiskitRuntimeService channel argumenttoken (
Optional[str]) – Optional QiskitRuntimeService authorization tokeninstance (
Optional[str]) – Optional QiskitRuntimeService instance (CRN or name)url (
Optional[str]) – Optional QiskitRuntimeService url
- Return type:
ServerlessRuntimeService- Returns:
QiskitRuntimeService wrapped into a ServerlessRuntimeService instance that allows to associate serverless job ids to runtime job and sesison ids.