From 8bd5a08b0ccc93e7bf23421f13a15397c35d9734 Mon Sep 17 00:00:00 2001 From: Rebecca Dimock <66339736+beckykd@users.noreply.github.com> Date: Wed, 11 Dec 2024 08:51:17 -0600 Subject: [PATCH] Add alt text to images (#2079) * Add alt text to images * Update __init__.py * Update dynamical_decoupling.py * Update __init__.py --- qiskit_ibm_runtime/fake_provider/__init__.py | 9 +++++++-- .../transpiler/passes/scheduling/__init__.py | 19 ++++++++++++++++++- .../passes/scheduling/dynamical_decoupling.py | 2 ++ 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/qiskit_ibm_runtime/fake_provider/__init__.py b/qiskit_ibm_runtime/fake_provider/__init__.py index 26e1f4245..82b5917b9 100644 --- a/qiskit_ibm_runtime/fake_provider/__init__.py +++ b/qiskit_ibm_runtime/fake_provider/__init__.py @@ -32,6 +32,7 @@ Here is an example of using a fake backend for transpilation and simulation. .. plot:: + :alt: [Circuit diagram output by the previous code.] :include-source: :context: close-figs @@ -53,14 +54,17 @@ circuit.draw('mpl', style="iqp") .. plot:: + :alt: [Circuit diagram output by the previous code.] :include-source: :context: close-figs - # Transpile the ideal circuit to a circuit that can be directly executed by the backend + # Transpile the ideal circuit to a circuit that can be + # directly executed by the backend transpiled_circuit = transpile(circuit, backend) transpiled_circuit.draw('mpl', style="iqp") .. plot:: + :alt: [Histogram output by the previous code.] :include-source: :context: close-figs @@ -89,7 +93,8 @@ service = QiskitRuntimeService() backend = service.backend('ibmq_manila') - # generate a simulator that mimics the real quantum system with the latest calibration results + # generate a simulator that mimics the real quantum + # system with the latest calibration results backend_sim = AerSimulator.from_backend(backend) diff --git a/qiskit_ibm_runtime/transpiler/passes/scheduling/__init__.py b/qiskit_ibm_runtime/transpiler/passes/scheduling/__init__.py index d62e1c87f..a5662ca23 100644 --- a/qiskit_ibm_runtime/transpiler/passes/scheduling/__init__.py +++ b/qiskit_ibm_runtime/transpiler/passes/scheduling/__init__.py @@ -23,7 +23,7 @@ of measurement results. .. warning:: - You should not mix these scheduling passes with Qiskit's builtin scheduling + You should not mix these scheduling passes with Qiskit's built in scheduling passes as they will negatively interact with the scheduling routines for dynamic circuits. This includes setting ``scheduling_method`` in :func:`~qiskit.compiler.transpile` or @@ -49,6 +49,7 @@ for a dynamic circuit backend's execution model: .. plot:: + :alt: [Circuit diagram output by the previous code.] :include-source: :context: close-figs @@ -100,6 +101,7 @@ using the :class:`PadDynamicalDecoupling` pass as shown below: .. plot:: + :alt: [Circuit diagram output by the previous code.] :include-source: :context: close-figs @@ -135,6 +137,7 @@ Scheduling with old format ``c_if`` conditioned gates is not supported. .. plot:: + :alt: [Circuit diagram output by the previous code.] :include-source: :context: close-figs @@ -150,6 +153,7 @@ We may then schedule the transpiled circuit without further modification. .. plot:: + :alt: [Circuit diagram output by the previous code.] :include-source: :context: close-figs @@ -174,6 +178,7 @@ prior to your scheduling pass. .. plot:: + :alt: [Circuit diagram output by the previous code.] :include-source: :context: close-figs @@ -205,6 +210,7 @@ gates to the same measurement qubit. .. plot:: + :alt: [Circuit diagram output by the previous code.] :include-source: :context: close-figs @@ -224,6 +230,7 @@ on a different qubit than the measurement qubit. .. plot:: + :alt: [Circuit diagram output by the previous code.] :include-source: :context: close-figs @@ -238,6 +245,7 @@ and will not be performed using the fast-path. .. plot:: + :alt: [Circuit diagram output by the previous code.] :include-source: :context: close-figs @@ -254,6 +262,7 @@ padded out to the duration of the longest block. .. plot:: + :alt: [Circuit diagram output by the previous code.] :include-source: :context: close-figs @@ -272,6 +281,7 @@ This behavior is also applied to the else condition of a fast-path eligible branch. .. plot:: + :alt: [Circuit diagram output by the previous code.] :include-source: :context: close-figs @@ -292,6 +302,7 @@ the standard higher latency conditional branch. .. plot:: + :alt: [Circuit diagram output by the previous code.] :include-source: :context: close-figs @@ -311,6 +322,7 @@ the conditional branch. .. plot:: + :alt: [Circuit diagram output by the previous code.] :include-source: :context: close-figs @@ -326,6 +338,7 @@ Conditional measurements are not eligible for the fast-path. .. plot:: + :alt: [Circuit diagram output by the previous code.] :include-source: :context: close-figs @@ -340,6 +353,7 @@ Similarly nested control-flow is not eligible. .. plot:: + :alt: [Circuit diagram output by the previous code.] :include-source: :context: close-figs @@ -361,6 +375,7 @@ be padded out by the scheduler to ensure they are of the same duration in Qiskit .. plot:: + :alt: [Circuit diagram output by the previous code.] :include-source: :context: close-figs @@ -380,6 +395,7 @@ qc.draw(output="mpl", style="iqp") .. plot:: + :alt: [Circuit diagram output by the previous code.] :include-source: :context: close-figs @@ -404,6 +420,7 @@ For example: .. plot:: + :alt: [Circuit diagram output by the previous code.] :include-source: :context: close-figs diff --git a/qiskit_ibm_runtime/transpiler/passes/scheduling/dynamical_decoupling.py b/qiskit_ibm_runtime/transpiler/passes/scheduling/dynamical_decoupling.py index aefdc6b50..47afd6418 100644 --- a/qiskit_ibm_runtime/transpiler/passes/scheduling/dynamical_decoupling.py +++ b/qiskit_ibm_runtime/transpiler/passes/scheduling/dynamical_decoupling.py @@ -54,6 +54,7 @@ class PadDynamicalDecoupling(BlockBasePadder): (including global phase). .. plot:: + :alt: [Circuit diagram output by the previous code.] :include-source: :context: close-figs @@ -86,6 +87,7 @@ class PadDynamicalDecoupling(BlockBasePadder): circ_dd.draw('mpl', style="iqp") .. plot:: + :alt: [Circuit diagram output by the previous code.] :include-source: :context: close-figs