Skip to content

Commit

Permalink
Shorten and use kebab-case for Addon URLs (#2177)
Browse files Browse the repository at this point in the history
Closes #2174. We now
convert URLs like `qiskit_addon_obp.MyClass` to `my-class`.

This is safe to change because the Addons are not yet public. We may
eventually want to do this for Qiskit, Runtime, and Transpiler Service -
for now, they stay the same.
  • Loading branch information
Eric-Arellano authored Oct 25, 2024
1 parent 59e4162 commit 3b58c42
Show file tree
Hide file tree
Showing 148 changed files with 836 additions and 654 deletions.
66 changes: 33 additions & 33 deletions docs/api/qiskit-addon-cutting/_toc.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,135 +14,135 @@
},
{
"title": "BaseQPDGate",
"url": "/api/qiskit-addon-cutting/qiskit_addon_cutting.qpd.BaseQPDGate"
"url": "/api/qiskit-addon-cutting/qpd-base-qpd-gate"
},
{
"title": "bit_count",
"url": "/api/qiskit-addon-cutting/qiskit_addon_cutting.utils.bitwise.bit_count"
"url": "/api/qiskit-addon-cutting/utils-bitwise-bit-count"
},
{
"title": "CommutingObservableGroup",
"url": "/api/qiskit-addon-cutting/qiskit_addon_cutting.utils.observable_grouping.CommutingObservableGroup"
"url": "/api/qiskit-addon-cutting/utils-observable-grouping-commuting-observable-group"
},
{
"title": "ConsolidateResets",
"url": "/api/qiskit-addon-cutting/qiskit_addon_cutting.utils.transpiler_passes.ConsolidateResets"
"url": "/api/qiskit-addon-cutting/utils-transpiler-passes-consolidate-resets"
},
{
"title": "cut_gates",
"url": "/api/qiskit-addon-cutting/qiskit_addon_cutting.cut_gates"
"url": "/api/qiskit-addon-cutting/cut-gates"
},
{
"title": "cut_wires",
"url": "/api/qiskit-addon-cutting/qiskit_addon_cutting.cut_wires"
"url": "/api/qiskit-addon-cutting/cut-wires"
},
{
"title": "CutWire",
"url": "/api/qiskit-addon-cutting/qiskit_addon_cutting.instructions.CutWire"
"url": "/api/qiskit-addon-cutting/instructions-cut-wire"
},
{
"title": "decompose_qpd_instructions",
"url": "/api/qiskit-addon-cutting/qiskit_addon_cutting.qpd.decompose_qpd_instructions"
"url": "/api/qiskit-addon-cutting/qpd-decompose-qpd-instructions"
},
{
"title": "DeviceConstraints",
"url": "/api/qiskit-addon-cutting/qiskit_addon_cutting.DeviceConstraints"
"url": "/api/qiskit-addon-cutting/device-constraints"
},
{
"title": "ExactSampler",
"url": "/api/qiskit-addon-cutting/qiskit_addon_cutting.utils.simulation.ExactSampler"
"url": "/api/qiskit-addon-cutting/utils-simulation-exact-sampler"
},
{
"title": "expand_observables",
"url": "/api/qiskit-addon-cutting/qiskit_addon_cutting.expand_observables"
"url": "/api/qiskit-addon-cutting/expand-observables"
},
{
"title": "find_cuts",
"url": "/api/qiskit-addon-cutting/qiskit_addon_cutting.find_cuts"
"url": "/api/qiskit-addon-cutting/find-cuts"
},
{
"title": "generate_cutting_experiments",
"url": "/api/qiskit-addon-cutting/qiskit_addon_cutting.generate_cutting_experiments"
"url": "/api/qiskit-addon-cutting/generate-cutting-experiments"
},
{
"title": "generate_qpd_weights",
"url": "/api/qiskit-addon-cutting/qiskit_addon_cutting.qpd.generate_qpd_weights"
"url": "/api/qiskit-addon-cutting/qpd-generate-qpd-weights"
},
{
"title": "Move",
"url": "/api/qiskit-addon-cutting/qiskit_addon_cutting.instructions.Move"
"url": "/api/qiskit-addon-cutting/instructions-move"
},
{
"title": "ObservableCollection",
"url": "/api/qiskit-addon-cutting/qiskit_addon_cutting.utils.observable_grouping.ObservableCollection"
"url": "/api/qiskit-addon-cutting/utils-observable-grouping-observable-collection"
},
{
"title": "observables_restricted_to_subsystem",
"url": "/api/qiskit-addon-cutting/qiskit_addon_cutting.utils.observable_grouping.observables_restricted_to_subsystem"
"url": "/api/qiskit-addon-cutting/utils-observable-grouping-observables-restricted-to-subsystem"
},
{
"title": "OptimizationParameters",
"url": "/api/qiskit-addon-cutting/qiskit_addon_cutting.OptimizationParameters"
"url": "/api/qiskit-addon-cutting/optimization-parameters"
},
{
"title": "partition_circuit_qubits",
"url": "/api/qiskit-addon-cutting/qiskit_addon_cutting.partition_circuit_qubits"
"url": "/api/qiskit-addon-cutting/partition-circuit-qubits"
},
{
"title": "partition_problem",
"url": "/api/qiskit-addon-cutting/qiskit_addon_cutting.partition_problem"
"url": "/api/qiskit-addon-cutting/partition-problem"
},
{
"title": "PartitionedCuttingProblem",
"url": "/api/qiskit-addon-cutting/qiskit_addon_cutting.PartitionedCuttingProblem"
"url": "/api/qiskit-addon-cutting/partitioned-cutting-problem"
},
{
"title": "QPDBasis",
"url": "/api/qiskit-addon-cutting/qiskit_addon_cutting.qpd.QPDBasis"
"url": "/api/qiskit-addon-cutting/qpd-qpd-basis"
},
{
"title": "qpdbasis_from_instruction",
"url": "/api/qiskit-addon-cutting/qiskit_addon_cutting.qpd.qpdbasis_from_instruction"
"url": "/api/qiskit-addon-cutting/qpd-qpdbasis-from-instruction"
},
{
"title": "reconstruct_expectation_values",
"url": "/api/qiskit-addon-cutting/qiskit_addon_cutting.reconstruct_expectation_values"
"url": "/api/qiskit-addon-cutting/reconstruct-expectation-values"
},
{
"title": "RemoveFinalReset",
"url": "/api/qiskit-addon-cutting/qiskit_addon_cutting.utils.transpiler_passes.RemoveFinalReset"
"url": "/api/qiskit-addon-cutting/utils-transpiler-passes-remove-final-reset"
},
{
"title": "separate_circuit",
"url": "/api/qiskit-addon-cutting/qiskit_addon_cutting.utils.transforms.separate_circuit"
"url": "/api/qiskit-addon-cutting/utils-transforms-separate-circuit"
},
{
"title": "SeparatedCircuits",
"url": "/api/qiskit-addon-cutting/qiskit_addon_cutting.utils.transforms.SeparatedCircuits"
"url": "/api/qiskit-addon-cutting/utils-transforms-separated-circuits"
},
{
"title": "simulate_statevector_outcomes",
"url": "/api/qiskit-addon-cutting/qiskit_addon_cutting.utils.simulation.simulate_statevector_outcomes"
"url": "/api/qiskit-addon-cutting/utils-simulation-simulate-statevector-outcomes"
},
{
"title": "SingleQubitQPDGate",
"url": "/api/qiskit-addon-cutting/qiskit_addon_cutting.qpd.SingleQubitQPDGate"
"url": "/api/qiskit-addon-cutting/qpd-single-qubit-qpd-gate"
},
{
"title": "TwoQubitQPDGate",
"url": "/api/qiskit-addon-cutting/qiskit_addon_cutting.qpd.TwoQubitQPDGate"
"url": "/api/qiskit-addon-cutting/qpd-two-qubit-qpd-gate"
},
{
"title": "unique_by_eq",
"url": "/api/qiskit-addon-cutting/qiskit_addon_cutting.utils.iteration.unique_by_eq"
"url": "/api/qiskit-addon-cutting/utils-iteration-unique-by-eq"
},
{
"title": "unique_by_id",
"url": "/api/qiskit-addon-cutting/qiskit_addon_cutting.utils.iteration.unique_by_id"
"url": "/api/qiskit-addon-cutting/utils-iteration-unique-by-id"
},
{
"title": "WeightType",
"url": "/api/qiskit-addon-cutting/qiskit_addon_cutting.qpd.WeightType"
"url": "/api/qiskit-addon-cutting/qpd-weight-type"
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ python_api_name: qiskit_addon_cutting.cut_gates
# qiskit\_addon\_cutting.cut\_gates

<Function id="qiskit_addon_cutting.cut_gates" isDedicatedPage={true} github="https://github.com/Qiskit/qiskit-addon-cutting/tree/stable/0.9/qiskit_addon_cutting/cutting_decomposition.py" signature="cut_gates(circuit, gate_ids, inplace=False)">
Transform specified gates into [`TwoQubitQPDGate`](qiskit_addon_cutting.qpd.TwoQubitQPDGate "qiskit_addon_cutting.qpd.TwoQubitQPDGate")s.
Transform specified gates into [`TwoQubitQPDGate`](qpd-two-qubit-qpd-gate "qiskit_addon_cutting.qpd.TwoQubitQPDGate")s.

**Parameters**

Expand All @@ -21,11 +21,11 @@ python_api_name: qiskit_addon_cutting.cut_gates

**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`](qiskit_addon_cutting.qpd.QPDBasis "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.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")]]

**Returns**

A copy of the input circuit with the specified gates replaced with [`TwoQubitQPDGate`](qiskit_addon_cutting.qpd.TwoQubitQPDGate "qiskit_addon_cutting.qpd.TwoQubitQPDGate")s and a list of [`QPDBasis`](qiskit_addon_cutting.qpd.QPDBasis "qiskit_addon_cutting.qpd.QPDBasis") instances – one for each decomposed gate.
A copy of the input circuit with the specified gates replaced with [`TwoQubitQPDGate`](qpd-two-qubit-qpd-gate "qiskit_addon_cutting.qpd.TwoQubitQPDGate")s and a list of [`QPDBasis`](qpd-qpd-basis "qiskit_addon_cutting.qpd.QPDBasis") instances – one for each decomposed gate.

**Raises**

Expand Down
32 changes: 32 additions & 0 deletions docs/api/qiskit-addon-cutting/cut-wires.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
title: cut_wires
description: API reference for qiskit_addon_cutting.cut_wires
in_page_toc_min_heading_level: 1
python_api_type: function
python_api_name: qiskit_addon_cutting.cut_wires
---

<span id="qiskit-addon-cutting-cut-wires" />

# qiskit\_addon\_cutting.cut\_wires

<Function id="qiskit_addon_cutting.cut_wires" isDedicatedPage={true} github="https://github.com/Qiskit/qiskit-addon-cutting/tree/stable/0.9/qiskit_addon_cutting/wire_cutting_transforms.py" signature="cut_wires(circuit, /)">
Transform all [`CutWire`](instructions-cut-wire "qiskit_addon_cutting.instructions.CutWire") instructions in a circuit to [`Move`](instructions-move "qiskit_addon_cutting.instructions.Move") instructions marked for cutting.

The returned circuit will have one newly allocated qubit for every [`CutWire`](instructions-cut-wire "qiskit_addon_cutting.instructions.CutWire") instruction.

See Sec. 3 and Appendix A of [2302.03366v1](https://arxiv.org/abs/2302.03366v1) for more information about the two different representations of wire cuts: single-qubit ([`CutWire`](instructions-cut-wire "qiskit_addon_cutting.instructions.CutWire")) vs. two-qubit ([`Move`](instructions-move "qiskit_addon_cutting.instructions.Move")).

**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

**Returns**

New circuit with [`CutWire`](instructions-cut-wire "qiskit_addon_cutting.instructions.CutWire") instructions replaced by [`Move`](instructions-move "qiskit_addon_cutting.instructions.Move") instructions wrapped in `TwoQubitQPDGate`s

**Return type**

circuit
</Function>

Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ python_api_name: qiskit_addon_cutting.find_cuts
**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.
* **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
* **optimization** ([`OptimizationParameters`](optimization-parameters "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`](device-constraints "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)")]]

**Returns**

A circuit containing [`BaseQPDGate`](qiskit_addon_cutting.qpd.BaseQPDGate "qiskit_addon_cutting.qpd.BaseQPDGate") instances. The subcircuits resulting from cutting these gates will be runnable on the devices meeting the `constraints`.
A circuit containing [`BaseQPDGate`](qpd-base-qpd-gate "qiskit_addon_cutting.qpd.BaseQPDGate") instances. The subcircuits resulting from cutting these gates will be runnable on the devices meeting the `constraints`.

**A metadata dictionary:**

Expand Down
Loading

0 comments on commit 3b58c42

Please sign in to comment.