From d56e6ee36b3a523c231a2f00dcead0964a3a3f65 Mon Sep 17 00:00:00 2001 From: Rebecca Dimock Date: Fri, 31 Jan 2025 15:55:04 -0600 Subject: [PATCH] review comments --- docs/guides/run-jobs-batch.mdx | 5 +---- docs/guides/run-jobs-session.mdx | 6 ------ 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/docs/guides/run-jobs-batch.mdx b/docs/guides/run-jobs-batch.mdx index 59a5bc0c02..6367b33421 100644 --- a/docs/guides/run-jobs-batch.mdx +++ b/docs/guides/run-jobs-batch.mdx @@ -111,15 +111,12 @@ batch.close() For a comprehensive overview of a batch's configuration and status, including its interactive and max TTL, use the `batch.details() method`. ``` python -from qiskit_ibm_runtime import QiskitRuntimeService, SamplerV2 as Sampler +from qiskit_ibm_runtime import QiskitRuntimeService, batch, SamplerV2 as Sampler service = QiskitRuntimeService() backend = service.least_busy(operational=True, simulator=False) with Batch(backend=backend) as batch: - sampler = Sampler() - for partition in partitions: - job = sampler.run(partition) print(batch.details()) ``` diff --git a/docs/guides/run-jobs-session.mdx b/docs/guides/run-jobs-session.mdx index fe25834158..15a2b38577 100644 --- a/docs/guides/run-jobs-session.mdx +++ b/docs/guides/run-jobs-session.mdx @@ -93,10 +93,6 @@ A session ends in the following circumstances: * The session is manually closed. The session stops accepting new jobs but continues to run queued jobs with priority. * If you use Session as a context manager, that is, `with Session()`, the session is automatically closed when the context ends (the same behavior as using `session.close()`). - -When a session ends, the QPU finishes running any job that is currently running. - - ### Close a session @@ -155,8 +151,6 @@ service = QiskitRuntimeService() backend = service.least_busy(operational=True, simulator=False) with Session(backend=backend) as session: - estimator = Estimator() - job = estimator.run([(circuit, observable)]) print(session.details()) ```