Skip to content

Commit

Permalink
Regenerate circuit cutting and runtime with images with alt text (#2532)
Browse files Browse the repository at this point in the history
This PR regenerates `qiskit-addon-cutting`, and `qiskit-ibm-runtime`
after adding the alt text in all their images.

Commands ran:
```bash
npm run gen-api -- -p qiskit-addon-cutting -v 0.9.0
npm run gen-api -- -p qiskit-ibm-runtime -v 0.34.0
```
  • Loading branch information
arnaucasau authored Dec 23, 2024
1 parent 33a35b5 commit be6687b
Show file tree
Hide file tree
Showing 45 changed files with 312 additions and 200 deletions.
30 changes: 25 additions & 5 deletions docs/api/qiskit-addon-cutting/instructions-cut-wire.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ python_api_name: qiskit_addon_cutting.instructions.CutWire
# CutWire

<Class id="qiskit_addon_cutting.instructions.CutWire" isDedicatedPage={true} github="https://github.com/Qiskit/qiskit-addon-cutting/tree/stable/0.9/qiskit_addon_cutting/instructions/cut_wire.py" signature="CutWire(label=None)" modifiers="class">
Bases: [`Gate`](/api/qiskit/qiskit.circuit.Gate "(in Qiskit v1.2)")
Bases: [`Gate`](/api/qiskit/qiskit.circuit.Gate "(in Qiskit v1.3)")

An instruction for denoting a wire cut location.

Expand Down Expand Up @@ -46,12 +46,20 @@ python_api_name: qiskit_addon_cutting.instructions.CutWire

<Attribute id="qiskit_addon_cutting.instructions.CutWire.condition">
The classical condition on the instruction.

<Admonition title="Deprecated since version 1.3.0" type="danger">
The property `qiskit.circuit.instruction.Instruction.condition` is deprecated as of qiskit 1.3.0. It will be removed in 2.0.0.
</Admonition>
</Attribute>

### condition\_bits

<Attribute id="qiskit_addon_cutting.instructions.CutWire.condition_bits">
Get Clbits in condition.

<Admonition title="Deprecated since version 1.3.0" type="danger">
The property `qiskit.circuit.instruction.Instruction.condition_bits` is deprecated as of qiskit 1.3.0. It will be removed in 2.0.0.
</Admonition>
</Attribute>

### decompositions
Expand All @@ -70,6 +78,10 @@ python_api_name: qiskit_addon_cutting.instructions.CutWire

<Attribute id="qiskit_addon_cutting.instructions.CutWire.duration">
Get the duration.

<Admonition title="Deprecated since version 1.3.0" type="danger">
The property `qiskit.circuit.instruction.Instruction.duration` is deprecated as of qiskit 1.3.0. It will be removed in Qiskit 2.0.0.
</Admonition>
</Attribute>

### label
Expand Down Expand Up @@ -114,6 +126,10 @@ python_api_name: qiskit_addon_cutting.instructions.CutWire

<Attribute id="qiskit_addon_cutting.instructions.CutWire.unit">
Get the time unit of duration.

<Admonition title="Deprecated since version 1.3.0" type="danger">
The property `qiskit.circuit.instruction.Instruction.unit` is deprecated as of qiskit 1.3.0. It will be removed in Qiskit 2.0.0.
</Admonition>
</Attribute>

## Methods
Expand Down Expand Up @@ -195,6 +211,10 @@ python_api_name: qiskit_addon_cutting.instructions.CutWire
<Admonition title="Note" type="note">
This is a setter method, not an additive one. Calling this multiple times will silently override any previously set condition; it does not stack.
</Admonition>
<Admonition title="Deprecated since version 1.3.0" type="danger">
The method `qiskit.circuit.instruction.Instruction.c_if()` is deprecated as of qiskit 1.3.0. It will be removed in 2.0.0.
</Admonition>
</Function>
### control
Expand Down Expand Up @@ -235,7 +255,7 @@ python_api_name: qiskit_addon_cutting.instructions.CutWire
**Return type**
[qiskit.circuit.Instruction](/api/qiskit/qiskit.circuit.Instruction "(in Qiskit v1.2)")
[qiskit.circuit.Instruction](/api/qiskit/qiskit.circuit.Instruction "(in Qiskit v1.3)")
</Function>
### inverse
Expand Down Expand Up @@ -265,7 +285,7 @@ python_api_name: qiskit_addon_cutting.instructions.CutWire
### is\_parameterized
<Function id="qiskit_addon_cutting.instructions.CutWire.is_parameterized" signature="is_parameterized()">
Return whether the `Instruction` contains [compile-time parameters](/api/qiskit/circuit#circuit-compile-time-parameters "(in Qiskit v1.2)").
Return whether the `Instruction` contains [compile-time parameters](/api/qiskit/circuit#circuit-compile-time-parameters "(in Qiskit v1.3)").
</Function>
### power
Expand Down Expand Up @@ -306,7 +326,7 @@ python_api_name: qiskit_addon_cutting.instructions.CutWire
**Return type**
[qiskit.circuit.Instruction](/api/qiskit/qiskit.circuit.Instruction "(in Qiskit v1.2)")
[qiskit.circuit.Instruction](/api/qiskit/qiskit.circuit.Instruction "(in Qiskit v1.3)")
**Raises**
Expand All @@ -328,7 +348,7 @@ python_api_name: qiskit_addon_cutting.instructions.CutWire
**Return type**
[qiskit.circuit.Instruction](/api/qiskit/qiskit.circuit.Instruction "(in Qiskit v1.2)")
[qiskit.circuit.Instruction](/api/qiskit/qiskit.circuit.Instruction "(in Qiskit v1.3)")
</Function>
### soft\_compare
Expand Down
32 changes: 26 additions & 6 deletions docs/api/qiskit-addon-cutting/instructions-move.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ python_api_name: qiskit_addon_cutting.instructions.Move
# Move

<Class id="qiskit_addon_cutting.instructions.Move" isDedicatedPage={true} github="https://github.com/Qiskit/qiskit-addon-cutting/tree/stable/0.9/qiskit_addon_cutting/instructions/move.py" signature="Move(label=None)" modifiers="class">
Bases: [`Instruction`](/api/qiskit/qiskit.circuit.Instruction "(in Qiskit v1.2)")
Bases: [`Instruction`](/api/qiskit/qiskit.circuit.Instruction "(in Qiskit v1.3)")

A two-qubit instruction representing a reset of the second qubit followed by a swap.

Expand Down Expand Up @@ -48,7 +48,7 @@ python_api_name: qiskit_addon_cutting.instructions.Move
qc.draw("mpl")
```

![../\_images/qiskit\_addon\_cutting-instructions-Move-1.svg](/images/api/qiskit-addon-cutting/qiskit_addon_cutting-instructions-Move-1.svg)
![Output from the previous code.](/images/api/qiskit-addon-cutting/qiskit_addon_cutting-instructions-Move-1.svg)

A full demonstration of the [`Move`](#qiskit_addon_cutting.instructions.Move "qiskit_addon_cutting.instructions.Move") instruction is available in [the introductory tutorial on wire cutting](https://qiskit.github.io/qiskit-addon-cutting/tutorials/03_wire_cutting_via_move_instruction.html).

Expand Down Expand Up @@ -85,12 +85,20 @@ python_api_name: qiskit_addon_cutting.instructions.Move

<Attribute id="qiskit_addon_cutting.instructions.Move.condition">
The classical condition on the instruction.

<Admonition title="Deprecated since version 1.3.0" type="danger">
The property `qiskit.circuit.instruction.Instruction.condition` is deprecated as of qiskit 1.3.0. It will be removed in 2.0.0.
</Admonition>
</Attribute>

### condition\_bits

<Attribute id="qiskit_addon_cutting.instructions.Move.condition_bits">
Get Clbits in condition.

<Admonition title="Deprecated since version 1.3.0" type="danger">
The property `qiskit.circuit.instruction.Instruction.condition_bits` is deprecated as of qiskit 1.3.0. It will be removed in 2.0.0.
</Admonition>
</Attribute>

### decompositions
Expand All @@ -109,6 +117,10 @@ python_api_name: qiskit_addon_cutting.instructions.Move

<Attribute id="qiskit_addon_cutting.instructions.Move.duration">
Get the duration.

<Admonition title="Deprecated since version 1.3.0" type="danger">
The property `qiskit.circuit.instruction.Instruction.duration` is deprecated as of qiskit 1.3.0. It will be removed in Qiskit 2.0.0.
</Admonition>
</Attribute>

### label
Expand Down Expand Up @@ -153,6 +165,10 @@ python_api_name: qiskit_addon_cutting.instructions.Move

<Attribute id="qiskit_addon_cutting.instructions.Move.unit">
Get the time unit of duration.

<Admonition title="Deprecated since version 1.3.0" type="danger">
The property `qiskit.circuit.instruction.Instruction.unit` is deprecated as of qiskit 1.3.0. It will be removed in Qiskit 2.0.0.
</Admonition>
</Attribute>

## Methods
Expand Down Expand Up @@ -200,6 +216,10 @@ python_api_name: qiskit_addon_cutting.instructions.Move
<Admonition title="Note" type="note">
This is a setter method, not an additive one. Calling this multiple times will silently override any previously set condition; it does not stack.
</Admonition>

<Admonition title="Deprecated since version 1.3.0" type="danger">
The method `qiskit.circuit.instruction.Instruction.c_if()` is deprecated as of qiskit 1.3.0. It will be removed in 2.0.0.
</Admonition>
</Function>

### copy
Expand All @@ -217,7 +237,7 @@ python_api_name: qiskit_addon_cutting.instructions.Move

**Return type**

[qiskit.circuit.Instruction](/api/qiskit/qiskit.circuit.Instruction "(in Qiskit v1.2)")
[qiskit.circuit.Instruction](/api/qiskit/qiskit.circuit.Instruction "(in Qiskit v1.3)")
</Function>

### inverse
Expand Down Expand Up @@ -247,7 +267,7 @@ python_api_name: qiskit_addon_cutting.instructions.Move
### is\_parameterized

<Function id="qiskit_addon_cutting.instructions.Move.is_parameterized" signature="is_parameterized()">
Return whether the `Instruction` contains [compile-time parameters](/api/qiskit/circuit#circuit-compile-time-parameters "(in Qiskit v1.2)").
Return whether the `Instruction` contains [compile-time parameters](/api/qiskit/circuit#circuit-compile-time-parameters "(in Qiskit v1.3)").
</Function>

### repeat
Expand All @@ -267,7 +287,7 @@ python_api_name: qiskit_addon_cutting.instructions.Move

**Return type**

[qiskit.circuit.Instruction](/api/qiskit/qiskit.circuit.Instruction "(in Qiskit v1.2)")
[qiskit.circuit.Instruction](/api/qiskit/qiskit.circuit.Instruction "(in Qiskit v1.3)")

**Raises**

Expand All @@ -289,7 +309,7 @@ python_api_name: qiskit_addon_cutting.instructions.Move

**Return type**

[qiskit.circuit.Instruction](/api/qiskit/qiskit.circuit.Instruction "(in Qiskit v1.2)")
[qiskit.circuit.Instruction](/api/qiskit/qiskit.circuit.Instruction "(in Qiskit v1.3)")
</Function>

### soft\_compare
Expand Down
26 changes: 13 additions & 13 deletions docs/api/qiskit-addon-cutting/qiskit-addon-cutting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Circuit cutting.

**Parameters**

**circuit** ([`QuantumCircuit`](/api/qiskit/qiskit.circuit.QuantumCircuit "(in Qiskit v1.2)")) – Original circuit with [`CutWire`](instructions-cut-wire "qiskit_addon_cutting.instructions.CutWire") instructions
**circuit** ([`QuantumCircuit`](/api/qiskit/qiskit.circuit.QuantumCircuit "(in Qiskit v1.3)")) – Original circuit with [`CutWire`](instructions-cut-wire "qiskit_addon_cutting.instructions.CutWire") instructions

**Returns**

Expand All @@ -53,13 +53,13 @@ Circuit cutting.

**Parameters**

* **observables** ([`PauliList`](/api/qiskit/qiskit.quantum_info.PauliList "(in Qiskit v1.2)")) – Observables corresponding to `original_circuit`
* **original\_circuit** ([`QuantumCircuit`](/api/qiskit/qiskit.circuit.QuantumCircuit "(in Qiskit v1.2)")) – Original circuit
* **final\_circuit** ([`QuantumCircuit`](/api/qiskit/qiskit.circuit.QuantumCircuit "(in Qiskit v1.2)")) – Final circuit, whose qubits the original `observables` should be expanded to
* **observables** ([`PauliList`](/api/qiskit/qiskit.quantum_info.PauliList "(in Qiskit v1.3)")) – Observables corresponding to `original_circuit`
* **original\_circuit** ([`QuantumCircuit`](/api/qiskit/qiskit.circuit.QuantumCircuit "(in Qiskit v1.3)")) – Original circuit
* **final\_circuit** ([`QuantumCircuit`](/api/qiskit/qiskit.circuit.QuantumCircuit "(in Qiskit v1.3)")) – Final circuit, whose qubits the original `observables` should be expanded to

**Return type**

[`PauliList`](/api/qiskit/qiskit.quantum_info.PauliList "(in Qiskit v1.2)")
[`PauliList`](/api/qiskit/qiskit.quantum_info.PauliList "(in Qiskit v1.3)")

**Returns**

Expand All @@ -80,13 +80,13 @@ Circuit cutting.

**Parameters**

* **circuit** ([`QuantumCircuit`](/api/qiskit/qiskit.circuit.QuantumCircuit "(in Qiskit v1.2)")) – The circuit to partition
* **circuit** ([`QuantumCircuit`](/api/qiskit/qiskit.circuit.QuantumCircuit "(in Qiskit v1.3)")) – The circuit to partition
* **partition\_labels** ([`Sequence`](https://docs.python.org/3/library/collections.abc.html#collections.abc.Sequence "(in Python v3.13)")\[[`Hashable`](https://docs.python.org/3/library/collections.abc.html#collections.abc.Hashable "(in Python v3.13)")]) – A sequence containing a partition label for each qubit in the input circuit. Nonlocal gates belonging to more than one partition will be replaced with [`TwoQubitQPDGate`](qpd-two-qubit-qpd-gate "qiskit_addon_cutting.qpd.TwoQubitQPDGate")s.
* **inplace** ([`bool`](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) – Flag denoting whether to copy the input circuit before acting on it

**Return type**

[`QuantumCircuit`](/api/qiskit/qiskit.circuit.QuantumCircuit "(in Qiskit v1.2)")
[`QuantumCircuit`](/api/qiskit/qiskit.circuit.QuantumCircuit "(in Qiskit v1.3)")

**Returns**

Expand Down Expand Up @@ -141,13 +141,13 @@ Circuit cutting.

**Parameters**

* **circuit** ([`QuantumCircuit`](/api/qiskit/qiskit.circuit.QuantumCircuit "(in Qiskit v1.2)")) – The circuit containing gates to be decomposed
* **circuit** ([`QuantumCircuit`](/api/qiskit/qiskit.circuit.QuantumCircuit "(in Qiskit v1.3)")) – The circuit containing gates to be decomposed
* **gate\_ids** ([`Sequence`](https://docs.python.org/3/library/collections.abc.html#collections.abc.Sequence "(in Python v3.13)")\[[`int`](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")]) – The indices of the gates to decompose
* **inplace** ([`bool`](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) – Flag denoting whether to copy the input circuit before acting on it

**Return type**

[`tuple`](https://docs.python.org/3/library/stdtypes.html#tuple "(in Python v3.13)")\[[`QuantumCircuit`](/api/qiskit/qiskit.circuit.QuantumCircuit "(in Qiskit v1.2)"), [`list`](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")\[[`QPDBasis`](qpd-qpd-basis "qiskit_addon_cutting.qpd.qpd_basis.QPDBasis")]]
[`tuple`](https://docs.python.org/3/library/stdtypes.html#tuple "(in Python v3.13)")\[[`QuantumCircuit`](/api/qiskit/qiskit.circuit.QuantumCircuit "(in Qiskit v1.3)"), [`list`](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")\[[`QPDBasis`](qpd-qpd-basis "qiskit_addon_cutting.qpd.qpd_basis.QPDBasis")]]

**Returns**

Expand Down Expand Up @@ -204,15 +204,15 @@ Circuit cutting.

* **results** (SamplerResult | PrimitiveResult | dict\[Hashable, SamplerResult | PrimitiveResult]) –

The results from running the cutting subexperiments. If the cut circuit was not partitioned between qubits and run separately, this argument should be a [`SamplerResult`](/api/qiskit/qiskit.primitives.SamplerResult "(in Qiskit v1.2)") instance or a dictionary mapping a single partition to the results. If the circuit was partitioned and its pieces were run separately, this argument should be a dictionary mapping partition labels to the results from each partition’s subexperiments.
The results from running the cutting subexperiments. If the cut circuit was not partitioned between qubits and run separately, this argument should be a [`SamplerResult`](/api/qiskit/qiskit.primitives.SamplerResult "(in Qiskit v1.3)") instance or a dictionary mapping a single partition to the results. If the circuit was partitioned and its pieces were run separately, this argument should be a dictionary mapping partition labels to the results from each partition’s subexperiments.

The subexperiment results are expected to be ordered in the same way the subexperiments are ordered in the output of [`generate_cutting_experiments()`](#qiskit_addon_cutting.generate_cutting_experiments "qiskit_addon_cutting.generate_cutting_experiments") – one result for every sample and observable, as shown below. The Qiskit Sampler primitive will return the results in the same order the experiments are submitted, so users who do not use [`generate_cutting_experiments()`](#qiskit_addon_cutting.generate_cutting_experiments "qiskit_addon_cutting.generate_cutting_experiments") to generate their experiments should take care to order their subexperiments as follows before submitting them to the sampler primitive:

$[sample_{0}observable_{0}, \ldots, sample_{0}observable_{N-1}, sample_{1}observable_{0}, \ldots, sample_{M-1}observable_{N-1}]$

* **coefficients** (Sequence\[tuple\[float, WeightType]]) – A sequence containing the coefficient associated with each unique subexperiment. Each element is a tuple containing the coefficient (a `float`) together with its [`WeightType`](qpd#weighttype "qiskit_addon_cutting.qpd.WeightType"), which denotes how the value was generated. The contribution from each subexperiment will be multiplied by its corresponding coefficient, and the resulting terms will be summed to obtain the reconstructed expectation value.

* **observables** (PauliList | dict\[Hashable, PauliList]) – The observable(s) for which the expectation values will be calculated. This should be a [`PauliList`](/api/qiskit/qiskit.quantum_info.PauliList "(in Qiskit v1.2)") if `results` is a [`SamplerResult`](/api/qiskit/qiskit.primitives.SamplerResult "(in Qiskit v1.2)") instance. Otherwise, it should be a dictionary mapping partition labels to the observables associated with that partition.
* **observables** (PauliList | dict\[Hashable, PauliList]) – The observable(s) for which the expectation values will be calculated. This should be a [`PauliList`](/api/qiskit/qiskit.quantum_info.PauliList "(in Qiskit v1.3)") if `results` is a [`SamplerResult`](/api/qiskit/qiskit.primitives.SamplerResult "(in Qiskit v1.3)") instance. Otherwise, it should be a dictionary mapping partition labels to the observables associated with that partition.

**Return type**

Expand Down Expand Up @@ -285,13 +285,13 @@ Circuit cutting.

**Parameters**

* **circuit** ([`QuantumCircuit`](/api/qiskit/qiskit.circuit.QuantumCircuit "(in Qiskit v1.2)")) – The circuit to cut. The input circuit may not contain gates acting on more than two qubits.
* **circuit** ([`QuantumCircuit`](/api/qiskit/qiskit.circuit.QuantumCircuit "(in Qiskit v1.3)")) – The circuit to cut. The input circuit may not contain gates acting on more than two qubits.
* **optimization** ([`OptimizationParameters`](#qiskit_addon_cutting.OptimizationParameters "qiskit_addon_cutting.automated_cut_finding.OptimizationParameters")) – Options for controlling optimizer behavior. Currently, the optimal cuts are chosen using Dijkstra’s best-first search algorithm.
* **constraints** ([`DeviceConstraints`](#qiskit_addon_cutting.DeviceConstraints "qiskit_addon_cutting.automated_cut_finding.DeviceConstraints")) – Constraints on how the circuit may be partitioned

**Return type**

[`tuple`](https://docs.python.org/3/library/stdtypes.html#tuple "(in Python v3.13)")\[[`QuantumCircuit`](/api/qiskit/qiskit.circuit.QuantumCircuit "(in Qiskit v1.2)"), [`dict`](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.13)")\[[`str`](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)"), [`float`](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")]]
[`tuple`](https://docs.python.org/3/library/stdtypes.html#tuple "(in Python v3.13)")\[[`QuantumCircuit`](/api/qiskit/qiskit.circuit.QuantumCircuit "(in Qiskit v1.3)"), [`dict`](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.13)")\[[`str`](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)"), [`float`](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")]]

**Returns**

Expand Down
Loading

0 comments on commit be6687b

Please sign in to comment.