Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add alt text to images #13555

Open
wants to merge 32 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
5edf643
Add alt text to images
beckykd Dec 11, 2024
4474eb6
Update operation.py
beckykd Dec 11, 2024
4ad57ac
Update parameter.py
beckykd Dec 11, 2024
b10af93
Update quantumcircuit.py
beckykd Dec 11, 2024
c38a3c7
try breaking line
beckykd Dec 11, 2024
833d009
Update __init__.py
beckykd Dec 11, 2024
e27d873
Update fourier_checking.py
beckykd Dec 11, 2024
d0fbad4
Update graph_state.py
beckykd Dec 11, 2024
886c331
Update grover_operator.py
beckykd Dec 11, 2024
8a5ee1f
add more alt text and some missing directives
beckykd Dec 11, 2024
c5cf51b
add nofigs for missing figures
beckykd Dec 11, 2024
2c7b877
Add more alt text
beckykd Dec 11, 2024
b447509
next set
beckykd Dec 11, 2024
b9a59d6
need different text when there's no code
beckykd Dec 11, 2024
8c1cbbc
fix text when no code
beckykd Dec 11, 2024
d2a1c54
more alt text
beckykd Dec 11, 2024
fe25141
remove brackets
beckykd Dec 12, 2024
2aae2e8
Merge branch 'main' into BD-add-alt-text
beckykd Dec 12, 2024
6324af5
More alt text and some fixes
beckykd Dec 12, 2024
c77efe2
Adding more text
beckykd Dec 13, 2024
2dea884
more alt text
beckykd Dec 16, 2024
6065b15
missing file name
beckykd Dec 17, 2024
15d40bd
missing blank line
beckykd Dec 17, 2024
ee7f758
extra blank line
beckykd Dec 17, 2024
c7fa1a5
Merge branch 'main' into BD-add-alt-text
beckykd Dec 17, 2024
ea3afd8
update allowlist
beckykd Dec 17, 2024
caf8ebf
Merge branch 'BD-add-alt-text' of https://github.com/beckykd/qiskit-t…
beckykd Dec 17, 2024
f47c88b
Merge branch 'main' into BD-add-alt-text
beckykd Dec 18, 2024
66d84ad
fix spacing
beckykd Dec 18, 2024
2e73ce2
Merge branch 'BD-add-alt-text' of https://github.com/beckykd/qiskit-t…
beckykd Dec 18, 2024
b31c0dd
add more alt text
beckykd Dec 18, 2024
7ec1473
Apply suggestions from code review
beckykd Dec 18, 2024
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
2 changes: 2 additions & 0 deletions qiskit/circuit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@


.. plot::
:alt: Circuit diagram output by the previous code.
:include-source:

from qiskit import QuantumCircuit
Expand Down Expand Up @@ -1144,6 +1145,7 @@ def __array__(self, dtype=None, copy=None):
drawing:

.. plot::
:alt: Circuit diagram output by the previous code.
:include-source:
:context:
:show-source-link: False
Expand Down
2 changes: 2 additions & 0 deletions qiskit/circuit/controlledgate.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ def __init__(
Create a controlled standard gate and apply it to a circuit.

.. plot::
:alt: Circuit diagram output by the previous code.
:include-source:

from qiskit import QuantumCircuit, QuantumRegister
Expand All @@ -84,6 +85,7 @@ def __init__(
Create a controlled custom gate and apply it to a circuit.

.. plot::
:alt: Circuit diagram output by the previous code.
:include-source:

from qiskit import QuantumCircuit, QuantumRegister
Expand Down
1 change: 1 addition & 0 deletions qiskit/circuit/library/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
For example, to append a multi-controlled CNOT:

.. plot::
:alt: Circuit diagram output by the previous code.
:include-source:

from qiskit.circuit.library import MCXGate
Expand Down
1 change: 1 addition & 0 deletions qiskit/circuit/library/arithmetic/piecewise_chebyshev.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class PiecewiseChebyshev(BlueprintCircuit):
Examples:

.. plot::
:alt: Circuit diagram output by the previous code.
:include-source:

import numpy as np
Expand Down
3 changes: 3 additions & 0 deletions qiskit/circuit/library/basis_change/qft.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class QFT(BlueprintCircuit):
For 4 qubits, the circuit that implements this transformation is:

.. plot::
:alt: Diagram illustrating the previously described circuit.

from qiskit.circuit.library import QFT
from qiskit.visualization.library import _generate_circuit_library_visualization
Expand All @@ -48,6 +49,7 @@ class QFT(BlueprintCircuit):
The respective circuit diagram is:

.. plot::
:alt: Diagram illustrating the previously described circuit.

from qiskit.circuit.library import QFT
from qiskit.visualization.library import _generate_circuit_library_visualization
Expand All @@ -64,6 +66,7 @@ class QFT(BlueprintCircuit):
on 5 qubits with approximation degree 2 yields (the barriers are dropped in this example):

.. plot::
:alt: Diagram illustrating the previously described circuit.

from qiskit.circuit.library import QFT
from qiskit.visualization.library import _generate_circuit_library_visualization
Expand Down
2 changes: 2 additions & 0 deletions qiskit/circuit/library/boolean_logic/inner_product.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ class InnerProduct(QuantumCircuit):

Reference Circuit:
.. plot::
:alt: Diagram illustrating the previously described circuit.

from qiskit.circuit.library import InnerProduct
from qiskit.visualization.library import _generate_circuit_library_visualization
Expand Down Expand Up @@ -121,6 +122,7 @@ class InnerProductGate(Gate):

Reference Circuit:
.. plot::
:alt: Diagram illustrating the previously described circuit.

from qiskit.circuit import QuantumCircuit
from qiskit.circuit.library import InnerProductGate
Expand Down
4 changes: 4 additions & 0 deletions qiskit/circuit/library/boolean_logic/quantum_and.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class AND(QuantumCircuit):
The AND gate without special flags equals the multi-controlled-X gate:

.. plot::
:alt: Diagram illustrating the previously described circuit.

from qiskit.circuit.library import AND
from qiskit.visualization.library import _generate_circuit_library_visualization
Expand All @@ -43,6 +44,7 @@ class AND(QuantumCircuit):
``[-1, 0, 0, 1, 1]``.

.. plot::
:alt: Diagram illustrating the previously described circuit.

from qiskit.circuit.library import AND
from qiskit.visualization.library import _generate_circuit_library_visualization
Expand Down Expand Up @@ -116,6 +118,7 @@ class AndGate(Gate):
The AndGate gate without special flags equals the multi-controlled-X gate:

.. plot::
:alt: Diagram illustrating the previously described circuit.

from qiskit.circuit import QuantumCircuit
from qiskit.circuit.library import AndGate
Expand All @@ -129,6 +132,7 @@ class AndGate(Gate):
``[-1, 0, 0, 1, 1]``.

.. plot::
:alt: Diagram illustrating the previously described circuit.

from qiskit.circuit import QuantumCircuit
from qiskit.circuit.library import AndGate
Expand Down
4 changes: 4 additions & 0 deletions qiskit/circuit/library/boolean_logic/quantum_or.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class OR(QuantumCircuit):
The OR gate without special flags:

.. plot::
:alt: Diagram illustrating the previously described circuit.

from qiskit.circuit.library import OR
from qiskit.visualization.library import _generate_circuit_library_visualization
Expand All @@ -44,6 +45,7 @@ class OR(QuantumCircuit):
flags ``[-1, 0, 0, 1, 1]``.

.. plot::
:alt: Diagram illustrating the previously described circuit.

from qiskit.circuit.library import OR
from qiskit.visualization.library import _generate_circuit_library_visualization
Expand Down Expand Up @@ -117,6 +119,7 @@ class OrGate(Gate):
The OrGate gate without special flags:

.. plot::
:alt: Diagram illustrating the previously described circuit.

from qiskit.circuit import QuantumCircuit
from qiskit.circuit.library import OrGate
Expand All @@ -130,6 +133,7 @@ class OrGate(Gate):
flags ``[-1, 0, 0, 1, 1]``.

.. plot::
:alt: Diagram illustrating the previously described circuit.

from qiskit.circuit import QuantumCircuit
from qiskit.circuit.library import OrGate
Expand Down
2 changes: 2 additions & 0 deletions qiskit/circuit/library/boolean_logic/quantum_xor.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ def __init__(

Reference Circuit:
.. plot::
:alt: Diagram illustrating the previously described circuit.

from qiskit.circuit.library import XOR
from qiskit.visualization.library import _generate_circuit_library_visualization
Expand Down Expand Up @@ -88,6 +89,7 @@ class BitwiseXorGate(Gate):
Reference Circuit:

.. plot::
:alt: Diagram illustrating the previously described circuit.

from qiskit.circuit import QuantumCircuit
from qiskit.circuit.library import BitwiseXorGate
Expand Down
2 changes: 2 additions & 0 deletions qiskit/circuit/library/fourier_checking.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ def __init__(self, f: Sequence[int], g: Sequence[int]) -> None:

Reference Circuit:
.. plot::
:alt: Diagram illustrating the previously described circuit.

from qiskit.circuit.library import FourierChecking
from qiskit.visualization.library import _generate_circuit_library_visualization
Expand Down Expand Up @@ -124,6 +125,7 @@ def fourier_checking(f: Sequence[int], g: Sequence[int]) -> QuantumCircuit:
**Reference Circuit:**

.. plot::
:alt: Circuit diagram output by the previous code.
:include-source:

from qiskit.circuit.library import fourier_checking
Expand Down
1 change: 1 addition & 0 deletions qiskit/circuit/library/generalized_gates/gms.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ class GMS(QuantumCircuit):
**Expanded Circuit:**

.. plot::
:alt: Diagram illustrating the previously described circuit.

from qiskit.circuit.library import GMS
from qiskit.visualization.library import _generate_circuit_library_visualization
Expand Down
4 changes: 4 additions & 0 deletions qiskit/circuit/library/generalized_gates/gr.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ class GR(QuantumCircuit):
**Expanded Circuit:**

.. plot::
:alt: Diagram illustrating the previously described circuit.

from qiskit.circuit.library import GR
from qiskit.visualization.library import _generate_circuit_library_visualization
Expand Down Expand Up @@ -99,6 +100,7 @@ class GRX(GR):
**Expanded Circuit:**

.. plot::
:alt: Diagram illustrating the previously described circuit.

from qiskit.circuit.library import GRX
from qiskit.visualization.library import _generate_circuit_library_visualization
Expand Down Expand Up @@ -147,6 +149,7 @@ class GRY(GR):
**Expanded Circuit:**

.. plot::
:alt: Diagram illustrating the previously described circuit.

from qiskit.circuit.library import GRY
from qiskit.visualization.library import _generate_circuit_library_visualization
Expand Down Expand Up @@ -195,6 +198,7 @@ class GRZ(QuantumCircuit):
**Expanded Circuit:**

.. plot::
:alt: Diagram illustrating the previously described circuit.

from qiskit.circuit.library import GRZ
from qiskit.visualization.library import _generate_circuit_library_visualization
Expand Down
1 change: 1 addition & 0 deletions qiskit/circuit/library/generalized_gates/mcmt.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ class MCMTVChain(MCMT):
**Expanded Circuit:**

.. plot::
:alt: Diagram illustrating the previously described circuit.

from qiskit.circuit.library import MCMTVChain, ZGate
from qiskit.visualization.library import _generate_circuit_library_visualization
Expand Down
4 changes: 4 additions & 0 deletions qiskit/circuit/library/generalized_gates/permutation.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ def __init__(

Reference Circuit:
.. plot::
:alt: Diagram illustrating the previously described circuit.

from qiskit.circuit.library import Permutation
A = [2,4,3,0,1]
Expand All @@ -62,6 +63,7 @@ def __init__(

Expanded Circuit:
.. plot::
:alt: Diagram illustrating the previously described circuit.

from qiskit.circuit.library import Permutation
from qiskit.visualization.library import _generate_circuit_library_visualization
Expand Down Expand Up @@ -116,6 +118,7 @@ def __init__(

Reference Circuit:
.. plot::
:alt: Diagram illustrating the previously described circuit.

from qiskit.circuit.quantumcircuit import QuantumCircuit
from qiskit.circuit.library import PermutationGate
Expand All @@ -127,6 +130,7 @@ def __init__(

Expanded Circuit:
.. plot::
:alt: Diagram illustrating the previously described circuit.

from qiskit.circuit.quantumcircuit import QuantumCircuit
from qiskit.circuit.library import PermutationGate
Expand Down
2 changes: 2 additions & 0 deletions qiskit/circuit/library/graph_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ class GraphState(QuantumCircuit):
**Reference Circuit:**

.. plot::
:alt: Diagram illustrating the previously described circuit.

from qiskit.circuit.library import GraphState
from qiskit.visualization.library import _generate_circuit_library_visualization
Expand Down Expand Up @@ -105,6 +106,7 @@ class GraphStateGate(Gate):
**Reference Circuit:**

.. plot::
:alt: Circuit diagram output by the previous code.
:include-source:

from qiskit.circuit import QuantumCircuit
Expand Down
4 changes: 4 additions & 0 deletions qiskit/circuit/library/grover_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ def grover_operator(
We can construct a Grover operator just from the phase oracle:

.. plot::
:alt: Circuit diagram output by the previous code.
:include-source:
:context:

Expand All @@ -117,6 +118,7 @@ def grover_operator(
We can also modify the state preparation:

.. plot::
:alt: Circuit diagram output by the previous code.
:include-source:
:context:

Expand All @@ -132,6 +134,7 @@ def grover_operator(
the oracle:

.. plot::
:alt: Circuit diagram output by the previous code.
:include-source:
:context:

Expand All @@ -149,6 +152,7 @@ def grover_operator(
objects:

.. plot::
:alt: Circuit diagram output by the previous code.
:include-source:
:context:

Expand Down
2 changes: 2 additions & 0 deletions qiskit/circuit/library/hidden_linear_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ class HiddenLinearFunction(QuantumCircuit):
**Reference Circuit:**

.. plot::
:alt: Diagram illustrating the previously described circuit.

from qiskit.circuit.library import HiddenLinearFunction
from qiskit.visualization.library import _generate_circuit_library_visualization
Expand Down Expand Up @@ -123,6 +124,7 @@ def hidden_linear_function(adjacency_matrix: list | np.ndarray) -> QuantumCircui
**Reference Circuit:**

.. plot::
:alt: Circuit diagram output by the previous code.
:include-source:

from qiskit.circuit.library import hidden_linear_function
Expand Down
5 changes: 5 additions & 0 deletions qiskit/circuit/library/iqp.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class IQP(QuantumCircuit):
**Reference Circuit:**

.. plot::
:alt: Diagram illustrating the previously described circuit.

from qiskit.circuit.library import IQP
A = [[6, 5, 3], [5, 4, 5], [3, 5, 1]]
Expand All @@ -47,6 +48,7 @@ class IQP(QuantumCircuit):
**Expanded Circuit:**

.. plot::
:alt: Diagram illustrating the previously described circuit.

from qiskit.circuit.library import IQP
from qiskit.visualization.library import _generate_circuit_library_visualization
Expand Down Expand Up @@ -97,6 +99,7 @@ def iqp(
**Reference Circuit:**

.. plot::
:alt: Diagram illustrating the previously described circuit.

from qiskit.circuit.library import iqp
A = [[6, 5, 3], [5, 4, 5], [3, 5, 1]]
Expand All @@ -106,6 +109,7 @@ def iqp(
**Expanded Circuit:**

.. plot::
:alt: Diagram illustrating the previously described circuit.

from qiskit.circuit.library import iqp
from qiskit.visualization.library import _generate_circuit_library_visualization
Expand Down Expand Up @@ -154,6 +158,7 @@ def random_iqp(
Example:

.. plot::
:alt: Circuit diagram output by the previous code.
:include-source:

from qiskit.circuit.library import random_iqp
Expand Down
2 changes: 2 additions & 0 deletions qiskit/circuit/library/n_local/efficient_su2.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ def efficient_su2(
CX gates, is equivalent to an all-to-all entanglement:

.. plot::
:alt: Circuit diagram output by the previous code.
:include-source:
:context:

Expand All @@ -84,6 +85,7 @@ def efficient_su2(
For example:

.. plot::
:alt: Circuit diagram output by the previous code.
:include-source:
:context:

Expand Down
Loading
Loading