Skip to content

Commit

Permalink
Merge branch 'main' into serverless-fct-template
Browse files Browse the repository at this point in the history
  • Loading branch information
beckykd authored Nov 12, 2024
2 parents 0432abb + b5dbc23 commit de77952
Show file tree
Hide file tree
Showing 275 changed files with 1,865 additions and 508 deletions.
6 changes: 6 additions & 0 deletions docs/api/qiskit-addon-cutting/qiskit-addon-cutting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,8 @@ Circuit cutting.
### PartitionedCuttingProblem

<Class id="qiskit_addon_cutting.PartitionedCuttingProblem" github="https://github.com/Qiskit/qiskit-addon-cutting/tree/stable/0.9/qiskit_addon_cutting/cutting_decomposition.py" signature="PartitionedCuttingProblem(subcircuits, bases, subobservables=None)" modifiers="class">
Bases: [`NamedTuple`](https://docs.python.org/3/library/typing.html#typing.NamedTuple "(in Python v3.13)")

The result of decomposing and separating a circuit and observable(s).

Create new instance of PartitionedCuttingProblem(subcircuits, bases, subobservables)
Expand Down Expand Up @@ -309,6 +311,8 @@ Circuit cutting.
### OptimizationParameters

<Class id="qiskit_addon_cutting.OptimizationParameters" github="https://github.com/Qiskit/qiskit-addon-cutting/tree/stable/0.9/qiskit_addon_cutting/automated_cut_finding.py" signature="OptimizationParameters(seed=None, max_gamma=1024, max_backjumps=10000, gate_lo=True, wire_lo=True)" modifiers="class">
Bases: [`object`](https://docs.python.org/3/library/functions.html#object "(in Python v3.13)")

Specify parameters that control the optimization.

If either of the constraints specified by `max_backjumps` or `max_gamma` are exceeded, the search terminates but nevertheless returns the result of a greedy best first search, which gives an *upper-bound* on gamma.
Expand Down Expand Up @@ -355,6 +359,8 @@ Circuit cutting.
### DeviceConstraints

<Class id="qiskit_addon_cutting.DeviceConstraints" github="https://github.com/Qiskit/qiskit-addon-cutting/tree/stable/0.9/qiskit_addon_cutting/automated_cut_finding.py" signature="DeviceConstraints(qubits_per_subcircuit)" modifiers="class">
Bases: [`object`](https://docs.python.org/3/library/functions.html#object "(in Python v3.13)")

Specify the constraints (qubits per subcircuit) that must be respected.

**Parameters**
Expand Down
2 changes: 2 additions & 0 deletions docs/api/qiskit-addon-cutting/qpd.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ Main quasiprobability decomposition functionality.
### WeightType

<Class id="qiskit_addon_cutting.qpd.WeightType" github="https://github.com/Qiskit/qiskit-addon-cutting/tree/stable/0.9/qiskit_addon_cutting/qpd/weights.py" signature="WeightType(value)" modifiers="class">
Bases: [`Enum`](https://docs.python.org/3/library/enum.html#enum.Enum "(in Python v3.13)")

Type of weight associated with a QPD sample.

#### EXACT
Expand Down
4 changes: 4 additions & 0 deletions docs/api/qiskit-addon-cutting/utils-observable-grouping.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ Module for conducting Pauli observable grouping.
### CommutingObservableGroup

<Class id="qiskit_addon_cutting.utils.observable_grouping.CommutingObservableGroup" github="https://github.com/Qiskit/qiskit-addon-cutting/tree/stable/0.9/qiskit_addon_cutting/utils/observable_grouping.py" signature="CommutingObservableGroup(general_observable, commuting_observables)" modifiers="class">
Bases: [`object`](https://docs.python.org/3/library/functions.html#object "(in Python v3.13)")

Set of mutually qubit-wise commuting observables.

**Parameters**
Expand Down Expand Up @@ -82,6 +84,8 @@ Module for conducting Pauli observable grouping.
### ObservableCollection

<Class id="qiskit_addon_cutting.utils.observable_grouping.ObservableCollection" github="https://github.com/Qiskit/qiskit-addon-cutting/tree/stable/0.9/qiskit_addon_cutting/utils/observable_grouping.py" signature="ObservableCollection(observables, /)" modifiers="class">
Bases: [`object`](https://docs.python.org/3/library/functions.html#object "(in Python v3.13)")

Collection of observables organized for efficient taking of measurements.

The observables are automatically organized into sets of mutually qubit-wise commuting observables, each represented by a [`CommutingObservableGroup`](#qiskit_addon_cutting.utils.observable_grouping.CommutingObservableGroup "qiskit_addon_cutting.utils.observable_grouping.CommutingObservableGroup").
Expand Down
2 changes: 2 additions & 0 deletions docs/api/qiskit-addon-cutting/utils-simulation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ Simulation of precise measurement outcome probabilities.
### ExactSampler

<Class id="qiskit_addon_cutting.utils.simulation.ExactSampler" github="https://github.com/Qiskit/qiskit-addon-cutting/tree/stable/0.9/qiskit_addon_cutting/utils/simulation.py" signature="ExactSampler(*, options=None)" modifiers="class">
Bases: [`BaseSamplerV1`](/api/qiskit/qiskit.primitives.BaseSamplerV1 "(in Qiskit v1.2)")

Sampler which returns exact probabilities for each possible outcome.

This sampler supports:
Expand Down
2 changes: 2 additions & 0 deletions docs/api/qiskit-addon-cutting/utils-transforms.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ Functions for manipulating quantum circuits.
### SeparatedCircuits

<Class id="qiskit_addon_cutting.utils.transforms.SeparatedCircuits" github="https://github.com/Qiskit/qiskit-addon-cutting/tree/stable/0.9/qiskit_addon_cutting/utils/transforms.py" signature="SeparatedCircuits(subcircuits, qubit_map)" modifiers="class">
Bases: [`NamedTuple`](https://docs.python.org/3/library/typing.html#typing.NamedTuple "(in Python v3.13)")

Named tuple for result of [`separate_circuit()`](#qiskit_addon_cutting.utils.transforms.separate_circuit "qiskit_addon_cutting.utils.transforms.separate_circuit").

`subcircuits` is a dict of circuits, keyed by each partition label. `qubit_map` is a list with length equal to the number of qubits in the original circuit. Each element of that list is a 2-tuple which includes the partition label of that qubit, together with the index of that qubit in the corresponding subcircuit. If the original qubit is unused and has been removed from the separated circuits, then that tuple will be equal to `(None, None)`.
Expand Down
6 changes: 1 addition & 5 deletions docs/api/qiskit-addon-mpf/_toc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"title": "Multi-product formulas",
"title": "Multi-product formulas (MPF)",
"children": [
{
"title": "API index",
Expand All @@ -8,10 +8,6 @@
{
"title": "qiskit_addon_mpf.static",
"url": "/api/qiskit-addon-mpf/static"
},
{
"title": "Release notes",
"url": "/api/qiskit-addon-mpf/release-notes"
}
],
"collapsed": true
Expand Down
2 changes: 1 addition & 1 deletion docs/api/qiskit-addon-mpf/index.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Multi-product formulas API documentation (latest version)
title: Multi-product formulas (MPF) API documentation (latest version)
description: Index of all the modules in the latest version of qiskit-addon-mpf.
---

Expand Down
6 changes: 3 additions & 3 deletions docs/api/qiskit-addon-mpf/release-notes.mdx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
title: Multi-product formulas release notes
description: Changes made to Multi-product formulas
title: Multi-product formulas (MPF) release notes
description: Changes made to Multi-product formulas (MPF)
in_page_toc_max_heading_level: 2
---

<span id="release-notes" />

<span id="id1" />

# Multi-product formulas release notes
# Multi-product formulas (MPF) release notes

10 changes: 5 additions & 5 deletions docs/api/qiskit-addon-mpf/static.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Static MPFs.

### LSE

<Class id="qiskit_addon_mpf.static.LSE" github="https://github.com/Qiskit/qiskit-addon-mpf/tree/main/qiskit_addon_mpf/static/lse.py#L23-L60" signature="LSE(A, b)" modifiers="class">
<Class id="qiskit_addon_mpf.static.LSE" github="https://github.com/Qiskit/qiskit-addon-mpf/tree/stable/0.1/qiskit_addon_mpf/static/lse.py#L23-L60" signature="LSE(A, b)" modifiers="class">
A `namedtuple` representing a linear system of equations.

$$
Expand Down Expand Up @@ -62,7 +62,7 @@ $$

#### solve

<Function id="qiskit_addon_mpf.static.LSE.solve" github="https://github.com/Qiskit/qiskit-addon-mpf/tree/main/qiskit_addon_mpf/static/lse.py#L41-L60" signature="solve()">
<Function id="qiskit_addon_mpf.static.LSE.solve" github="https://github.com/Qiskit/qiskit-addon-mpf/tree/stable/0.1/qiskit_addon_mpf/static/lse.py#L41-L60" signature="solve()">
Return the solution to this LSE: $x=A^{-1}b$.

**Returns**
Expand All @@ -87,7 +87,7 @@ $$

### setup\_lse

<Function id="qiskit_addon_mpf.static.setup_lse" github="https://github.com/Qiskit/qiskit-addon-mpf/tree/main/qiskit_addon_mpf/static/lse.py#L63-L131" signature="setup_lse(trotter_steps, *, order=1, symmetric=False)">
<Function id="qiskit_addon_mpf.static.setup_lse" github="https://github.com/Qiskit/qiskit-addon-mpf/tree/stable/0.1/qiskit_addon_mpf/static/lse.py#L63-L131" signature="setup_lse(trotter_steps, *, order=1, symmetric=False)">
Return the linear system of equations for computing the static MPF coefficients.

This function constructs the following linear system of equations:
Expand Down Expand Up @@ -139,7 +139,7 @@ $$

### setup\_exact\_model

<Function id="qiskit_addon_mpf.static.setup_exact_model" github="https://github.com/Qiskit/qiskit-addon-mpf/tree/main/qiskit_addon_mpf/static/exact.py#L22-L73" signature="setup_exact_model(lse)">
<Function id="qiskit_addon_mpf.static.setup_exact_model" github="https://github.com/Qiskit/qiskit-addon-mpf/tree/stable/0.1/qiskit_addon_mpf/static/exact.py#L22-L73" signature="setup_exact_model(lse)">
Construct a [`cvxpy.Problem`](https://www.cvxpy.org/api_reference/cvxpy.problems.html#cvxpy.Problem "(in CVXPY v1.5)") for finding exact static MPF coefficients.

<Admonition title="Note" type="note">
Expand Down Expand Up @@ -200,7 +200,7 @@ $$

### setup\_approximate\_model

<Function id="qiskit_addon_mpf.static.setup_approximate_model" github="https://github.com/Qiskit/qiskit-addon-mpf/tree/main/qiskit_addon_mpf/static/approximate.py#L22-L76" signature="setup_approximate_model(lse, *, max_l1_norm=10.0)">
<Function id="qiskit_addon_mpf.static.setup_approximate_model" github="https://github.com/Qiskit/qiskit-addon-mpf/tree/stable/0.1/qiskit_addon_mpf/static/approximate.py#L22-L76" signature="setup_approximate_model(lse, *, max_l1_norm=10.0)">
Construct a [`cvxpy.Problem`](https://www.cvxpy.org/api_reference/cvxpy.problems.html#cvxpy.Problem "(in CVXPY v1.5)") for finding approximate static MPF coefficients.

The optimization problem constructed by this class is defined as follows:
Expand Down
2 changes: 1 addition & 1 deletion docs/api/qiskit-addon-obp/_toc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"title": "Operator backpropagation",
"title": "Operator backpropagation (OBP)",
"children": [
{
"title": "API index",
Expand Down
2 changes: 1 addition & 1 deletion docs/api/qiskit-addon-obp/index.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Operator backpropagation API documentation (latest version)
title: Operator backpropagation (OBP) API documentation (latest version)
description: Index of all the modules in the latest version of qiskit-addon-obp.
---

Expand Down
2 changes: 1 addition & 1 deletion docs/api/qiskit-addon-obp/qiskit-addon-obp.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Main operator backpropagation functionality.

### backpropagate

<Function id="qiskit_addon_obp.backpropagate" github="https://github.com/Qiskit/qiskit-addon-obp/tree/main/qiskit_addon_obp/backpropagation.py#L47-L288" signature="backpropagate(observables, slices, *, truncation_error_budget=None, operator_budget=None, max_seconds=None)">
<Function id="qiskit_addon_obp.backpropagate" github="https://github.com/Qiskit/qiskit-addon-obp/tree/stable/0.1/qiskit_addon_obp/backpropagation.py#L47-L288" signature="backpropagate(observables, slices, *, truncation_error_budget=None, operator_budget=None, max_seconds=None)">
Backpropagate slices of quantum circuit operations onto the provided observables.

This function takes a (list of) observable(s) and backpropagates the provided quantum circuit slices **in reverse order** onto the observable(s) until one of the stopping criteria is reached.
Expand Down
6 changes: 3 additions & 3 deletions docs/api/qiskit-addon-obp/release-notes.mdx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
title: Operator backpropagation release notes
description: Changes made to Operator backpropagation
title: Operator backpropagation (OBP) release notes
description: Changes made to Operator backpropagation (OBP)
in_page_toc_max_heading_level: 2
---

<span id="release-notes" />

<span id="id1" />

# Operator backpropagation release notes
# Operator backpropagation (OBP) release notes

<span id="release-notes-0-1-0" />

Expand Down
10 changes: 5 additions & 5 deletions docs/api/qiskit-addon-obp/utils-metadata-obp-metadata.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ python_api_name: qiskit_addon_obp.utils.metadata.OBPMetadata

# OBPMetadata

<Class id="qiskit_addon_obp.utils.metadata.OBPMetadata" isDedicatedPage={true} github="https://github.com/Qiskit/qiskit-addon-obp/tree/main/qiskit_addon_obp/utils/metadata.py#L93-L259" signature="OBPMetadata(truncation_error_budget, num_slices, operator_budget, backpropagation_history, num_backpropagated_slices)" modifiers="class">
<Class id="qiskit_addon_obp.utils.metadata.OBPMetadata" isDedicatedPage={true} github="https://github.com/Qiskit/qiskit-addon-obp/tree/stable/0.1/qiskit_addon_obp/utils/metadata.py#L93-L259" signature="OBPMetadata(truncation_error_budget, num_slices, operator_budget, backpropagation_history, num_backpropagated_slices)" modifiers="class">
Bases: [`object`](https://docs.python.org/3/library/functions.html#object "(in Python v3.13)")

A container for metadata generated during the `backpropagate()` method.
Expand Down Expand Up @@ -61,7 +61,7 @@ python_api_name: qiskit_addon_obp.utils.metadata.OBPMetadata

### accumulated\_error

<Function id="qiskit_addon_obp.utils.metadata.OBPMetadata.accumulated_error" github="https://github.com/Qiskit/qiskit-addon-obp/tree/main/qiskit_addon_obp/utils/metadata.py#L121-L159" signature="accumulated_error(observable_idx, slice_idx=None)">
<Function id="qiskit_addon_obp.utils.metadata.OBPMetadata.accumulated_error" github="https://github.com/Qiskit/qiskit-addon-obp/tree/stable/0.1/qiskit_addon_obp/utils/metadata.py#L121-L159" signature="accumulated_error(observable_idx, slice_idx=None)">
Compute the accumulated error for a given observable at a given “time”.

This method computes the accumulated error for a given observable index at a given “time” during the course of the backpropagation. In this context, “time” is to be understood as the discrete steps of already backpropagated slices.
Expand All @@ -88,7 +88,7 @@ python_api_name: qiskit_addon_obp.utils.metadata.OBPMetadata

### from\_json

<Function id="qiskit_addon_obp.utils.metadata.OBPMetadata.from_json" github="https://github.com/Qiskit/qiskit-addon-obp/tree/main/qiskit_addon_obp/utils/metadata.py#L224-L248" signature="from_json(json_file)" modifiers="classmethod">
<Function id="qiskit_addon_obp.utils.metadata.OBPMetadata.from_json" github="https://github.com/Qiskit/qiskit-addon-obp/tree/stable/0.1/qiskit_addon_obp/utils/metadata.py#L224-L248" signature="from_json(json_file)" modifiers="classmethod">
Load a metadata from a json file.

**Parameters**
Expand All @@ -106,7 +106,7 @@ python_api_name: qiskit_addon_obp.utils.metadata.OBPMetadata

### left\_over\_error\_budget

<Function id="qiskit_addon_obp.utils.metadata.OBPMetadata.left_over_error_budget" github="https://github.com/Qiskit/qiskit-addon-obp/tree/main/qiskit_addon_obp/utils/metadata.py#L161-L222" signature="left_over_error_budget(observable_idx, slice_idx=None)">
<Function id="qiskit_addon_obp.utils.metadata.OBPMetadata.left_over_error_budget" github="https://github.com/Qiskit/qiskit-addon-obp/tree/stable/0.1/qiskit_addon_obp/utils/metadata.py#L161-L222" signature="left_over_error_budget(observable_idx, slice_idx=None)">
Compute the left-over error budget for a given observable at a given “time”.

This method computes the left-over error budget for a given observable index at a given “time” during the course of the backpropagation. In this context, “time” is to be understood as the discrete steps of already backpropagated slices.
Expand Down Expand Up @@ -137,7 +137,7 @@ python_api_name: qiskit_addon_obp.utils.metadata.OBPMetadata

### to\_json

<Function id="qiskit_addon_obp.utils.metadata.OBPMetadata.to_json" github="https://github.com/Qiskit/qiskit-addon-obp/tree/main/qiskit_addon_obp/utils/metadata.py#L250-L259" signature="to_json(json_file, **kwargs)">
<Function id="qiskit_addon_obp.utils.metadata.OBPMetadata.to_json" github="https://github.com/Qiskit/qiskit-addon-obp/tree/stable/0.1/qiskit_addon_obp/utils/metadata.py#L250-L259" signature="to_json(json_file, **kwargs)">
Dump this metadata to a json file.

**Parameters**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ python_api_name: qiskit_addon_obp.utils.metadata.SliceMetadata

# SliceMetadata

<Class id="qiskit_addon_obp.utils.metadata.SliceMetadata" isDedicatedPage={true} github="https://github.com/Qiskit/qiskit-addon-obp/tree/main/qiskit_addon_obp/utils/metadata.py#L25-L90" signature="SliceMetadata(slice_errors, raw_num_paulis, num_unique_paulis, num_duplicate_paulis, num_trimmed_paulis, sum_trimmed_coeffs, num_truncated_paulis, num_paulis, sum_paulis, num_qwc_groups)" modifiers="class">
<Class id="qiskit_addon_obp.utils.metadata.SliceMetadata" isDedicatedPage={true} github="https://github.com/Qiskit/qiskit-addon-obp/tree/stable/0.1/qiskit_addon_obp/utils/metadata.py#L25-L90" signature="SliceMetadata(slice_errors, raw_num_paulis, num_unique_paulis, num_duplicate_paulis, num_trimmed_paulis, sum_trimmed_coeffs, num_truncated_paulis, num_paulis, sum_paulis, num_qwc_groups)" modifiers="class">
Bases: [`object`](https://docs.python.org/3/library/functions.html#object "(in Python v3.13)")

A container for metadata generated during the backpropagation of a single slice.
Expand Down
8 changes: 4 additions & 4 deletions docs/api/qiskit-addon-obp/utils-operations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Utility functions for operator backpropagation.

### apply\_op\_to

<Function id="qiskit_addon_obp.utils.operations.apply_op_to" github="https://github.com/Qiskit/qiskit-addon-obp/tree/main/qiskit_addon_obp/utils/operations.py#L21-L90" signature="apply_op_to(op1, op1_qargs, op2, op2_qargs, *, apply_as_transform=False)">
<Function id="qiskit_addon_obp.utils.operations.apply_op_to" github="https://github.com/Qiskit/qiskit-addon-obp/tree/stable/0.1/qiskit_addon_obp/utils/operations.py#L21-L90" signature="apply_op_to(op1, op1_qargs, op2, op2_qargs, *, apply_as_transform=False)">
Apply the operator `op2` to the operator `op1`.

These operators do not necessarily need to act on the same number of qubits, as they are assumed to act on a larger system. The position in the system of each operator is defined by the corresponding `qargs`. The output operator will be defined on `union(op1_qargs, op2_qargs)`.
Expand Down Expand Up @@ -56,7 +56,7 @@ Utility functions for operator backpropagation.

### apply\_reset\_to

<Function id="qiskit_addon_obp.utils.operations.apply_reset_to" github="https://github.com/Qiskit/qiskit-addon-obp/tree/main/qiskit_addon_obp/utils/operations.py#L175-L206" signature="apply_reset_to(op, qubit_id, inplace=False)">
<Function id="qiskit_addon_obp.utils.operations.apply_reset_to" github="https://github.com/Qiskit/qiskit-addon-obp/tree/stable/0.1/qiskit_addon_obp/utils/operations.py#L175-L206" signature="apply_reset_to(op, qubit_id, inplace=False)">
Apply a reset operation to a Pauli operator.

This function applies a reset operation to `op` in the following way:
Expand All @@ -82,7 +82,7 @@ Utility functions for operator backpropagation.

### to\_global\_op

<Function id="qiskit_addon_obp.utils.operations.to_global_op" github="https://github.com/Qiskit/qiskit-addon-obp/tree/main/qiskit_addon_obp/utils/operations.py#L93-L117" signature="to_global_op(op, qargs, n_qubits)">
<Function id="qiskit_addon_obp.utils.operations.to_global_op" github="https://github.com/Qiskit/qiskit-addon-obp/tree/stable/0.1/qiskit_addon_obp/utils/operations.py#L93-L117" signature="to_global_op(op, qargs, n_qubits)">
Convert a local operator to a global operator by inserting identities on qubits which aren’t used.

**Parameters**
Expand All @@ -106,7 +106,7 @@ Utility functions for operator backpropagation.

### reduce\_op

<Function id="qiskit_addon_obp.utils.operations.reduce_op" github="https://github.com/Qiskit/qiskit-addon-obp/tree/main/qiskit_addon_obp/utils/operations.py#L128-L172" signature="reduce_op(global_op)">
<Function id="qiskit_addon_obp.utils.operations.reduce_op" github="https://github.com/Qiskit/qiskit-addon-obp/tree/stable/0.1/qiskit_addon_obp/utils/operations.py#L128-L172" signature="reduce_op(global_op)">
Create a lean representation of a global Pauli operator.

This function returns a lean representation of the input operator such that all of the qubits associated solely with Pauli-I terms have been removed. A list of indices is also returned indicating on which qubits the lean operator acts.
Expand Down
Loading

0 comments on commit de77952

Please sign in to comment.