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

Update Qiskit 1.0 dev docs #805

Merged
merged 1 commit into from
Feb 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions docs/api/qiskit/dev/_toc.json
Original file line number Diff line number Diff line change
Expand Up @@ -798,6 +798,10 @@
"title": "BackendSampler",
"url": "/api/qiskit/dev/qiskit.primitives.BackendSampler"
},
{
"title": "BaseEstimatorV2",
"url": "/api/qiskit/dev/qiskit.primitives.BaseEstimatorV2"
},
{
"title": "BaseSamplerV2",
"url": "/api/qiskit/dev/qiskit.primitives.BaseSamplerV2"
Expand Down
2 changes: 1 addition & 1 deletion docs/api/qiskit/dev/circuit_classical.md
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@ A typical consumer of the expression tree wants to recursively walk through the

<span id="qiskit.circuit.classical.expr.ExprVisitor" />

`qiskit.circuit.classical.expr.ExprVisitor`[GitHub](https://github.com/qiskit/qiskit/tree/stable/1.0/qiskit/circuit/classical/expr/visitors.py "view source code")
`qiskit.circuit.classical.expr.ExprVisitor(*args, **kwds)`[GitHub](https://github.com/qiskit/qiskit/tree/stable/1.0/qiskit/circuit/classical/expr/visitors.py "view source code")

Base class for visitors to the [`Expr`](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.Expr") tree. Subclasses should override whichever of the `visit_*` methods that they are able to handle, and should be organised such that non-existent methods will never be called.

Expand Down
22 changes: 14 additions & 8 deletions docs/api/qiskit/dev/primitives.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ python_api_name: qiskit.primitives

## Overview of EstimatorV2

`BaseEstimatorV2` is a primitive that estimates expectation values for provided quantum circuit and observable combinations.
[`BaseEstimatorV2`](qiskit.primitives.BaseEstimatorV2 "qiskit.primitives.base.base_estimator.BaseEstimatorV2") is a primitive that estimates expectation values for provided quantum circuit and observable combinations.

Following construction, an estimator is used by calling its `run()` method with a list of pubs (Primitive Unified Blocs). Each pub contains three values that, together, define a computation unit of work for the estimator to complete:
Following construction, an estimator is used by calling its [`run()`](qiskit.primitives.BaseEstimatorV2#run "qiskit.primitives.BaseEstimatorV2.run") method with a list of pubs (Primitive Unified Blocs). Each pub contains three values that, together, define a computation unit of work for the estimator to complete:

* a single [`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit"), possibly parametrized, whose final state we define as $\psi(\theta)$,
* one or more observables (specified as any `ObservablesArrayLike`, including [`Pauli`](qiskit.quantum_info.Pauli "qiskit.quantum_info.Pauli"), [`SparsePauliOp`](qiskit.quantum_info.SparsePauliOp "qiskit.quantum_info.SparsePauliOp"), `str`) that specify which expectation values to estimate, denoted $H_j$, and
Expand Down Expand Up @@ -232,17 +232,23 @@ print([q.binary_probabilities() for q in job_result.quasi_dists])

## EstimatorV2

| | |
| ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
| [`StatevectorEstimator`](qiskit.primitives.StatevectorEstimator "qiskit.primitives.StatevectorEstimator")(\*\[, default\_precision, ...]) | Simple implementation of `BaseEstimatorV2` with full state vector simulation. |
| | |
| ----------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [`BaseEstimatorV2`](qiskit.primitives.BaseEstimatorV2 "qiskit.primitives.BaseEstimatorV2")() | Estimator base class version 2. |
| [`StatevectorEstimator`](qiskit.primitives.StatevectorEstimator "qiskit.primitives.StatevectorEstimator")(\*\[, default\_precision, ...]) | Simple implementation of [`BaseEstimatorV2`](qiskit.primitives.BaseEstimatorV2 "qiskit.primitives.BaseEstimatorV2") with full state vector simulation. |

## Sampler

| | |
| ----------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| [`BaseSampler`](qiskit.primitives.BaseSampler#qiskit.primitives.BaseSampler "qiskit.primitives.BaseSampler") | alias of `BaseSamplerV1` |
| [`Sampler`](qiskit.primitives.Sampler "qiskit.primitives.Sampler")(\*\[, options]) | Sampler class. |
| [`BackendSampler`](qiskit.primitives.BackendSampler "qiskit.primitives.BackendSampler")(backend\[, options, ...]) | A `BaseSampler` implementation that provides an interface for leveraging the sampler interface from any backend. |

## SamplerV2

| | |
| -------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| [`BaseSampler`](qiskit.primitives.BaseSampler#qiskit.primitives.BaseSampler "qiskit.primitives.BaseSampler") | alias of `BaseSamplerV1` |
| [`Sampler`](qiskit.primitives.Sampler "qiskit.primitives.Sampler")(\*\[, options]) | Sampler class. |
| [`BackendSampler`](qiskit.primitives.BackendSampler "qiskit.primitives.BackendSampler")(backend\[, options, ...]) | A `BaseSampler` implementation that provides an interface for leveraging the sampler interface from any backend. |
| [`BaseSamplerV2`](qiskit.primitives.BaseSamplerV2 "qiskit.primitives.BaseSamplerV2")() | Sampler base class version 2. |
| [`StatevectorSampler`](qiskit.primitives.StatevectorSampler "qiskit.primitives.StatevectorSampler")(\*\[, default\_shots, seed]) | Simple implementation of [`BaseSamplerV2`](qiskit.primitives.BaseSamplerV2 "qiskit.primitives.BaseSamplerV2") using full state vector simulation. |

Expand Down
2 changes: 1 addition & 1 deletion docs/api/qiskit/dev/providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Each minor version release of qiskit-terra **may** increment the version of any

To enable providers to have time to adjust to changes in this interface Terra will support multiple versions of each class at once. Given the nature of one version per release the version deprecation policy is a bit more conservative than the standard deprecation policy. Terra will support a provider interface version for a minimum of 3 minor releases or the first release after 6 months from the release that introduced a version, whichever is longer, prior to a potential deprecation. After that the standard deprecation policy will apply to that interface version. This will give providers and users sufficient time to adapt to potential breaking changes in the interface. So for example lets say in 0.19.0 `BackendV2` is introduced and in the 3 months after the release of 0.19.0 we release 0.20.0, 0.21.0, and 0.22.0, then 7 months after 0.19.0 we release 0.23.0. In 0.23.0 we can deprecate BackendV2, and it needs to still be supported and can’t be removed until the deprecation policy completes.

It’s worth pointing out that Terra’s version support policy doesn’t mean providers themselves will have the same support story, they can (and arguably should) update to newer versions as soon as they can, the support window is just for Terra’s supported versions. Part of this lengthy window prior to deprecation is to give providers enough time to do their own deprecation of a potential end user impacting change in a user facing part of the interface prior to bumping their version. For example, let’s say we changed the signature to `Backend.run()` in `BackendV34` in a backwards incompatible way. Before Aer could update its [`AerSimulator`](https://qiskit.org/ecosystem/aer/stubs/qiskit_aer.AerSimulator.html#qiskit_aer.AerSimulator "(in Qiskit Aer v0.13.1)") class to be based on version 34 they’d need to deprecate the old signature prior to switching over. The changeover for Aer is not guaranteed to be lockstep with Terra so we need to ensure there is a sufficient amount of time for Aer to complete its deprecation cycle prior to removing version 33 (ie making version 34 mandatory/the minimum version).
It’s worth pointing out that Terra’s version support policy doesn’t mean providers themselves will have the same support story, they can (and arguably should) update to newer versions as soon as they can, the support window is just for Terra’s supported versions. Part of this lengthy window prior to deprecation is to give providers enough time to do their own deprecation of a potential end user impacting change in a user facing part of the interface prior to bumping their version. For example, let’s say we changed the signature to `Backend.run()` in `BackendV34` in a backwards incompatible way. Before Aer could update its [`AerSimulator`](https://qiskit.github.io/qiskit-aer/stubs/qiskit_aer.AerSimulator.html#qiskit_aer.AerSimulator "(in Qiskit Aer v0.13.3)") class to be based on version 34 they’d need to deprecate the old signature prior to switching over. The changeover for Aer is not guaranteed to be lockstep with Terra so we need to ensure there is a sufficient amount of time for Aer to complete its deprecation cycle prior to removing version 33 (ie making version 34 mandatory/the minimum version).

## Abstract Classes

Expand Down
34 changes: 17 additions & 17 deletions docs/api/qiskit/dev/pulse.md
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ Return a new schedule with implicit acquires from the measurement mapping replac

**Parameters**

* **schedule** ([*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule") *|*[*Instruction*](#qiskit.pulse.instructions.Instruction "qiskit.pulse.instructions.instruction.Instruction")) – Schedule to be aligned.
* **schedule** (*ScheduleComponent*) – Schedule to be aligned.
* **meas\_map** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")*\[*[*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")*]]*) – List of lists of qubits that are measured together.

**Returns**
Expand All @@ -255,7 +255,7 @@ A `Schedule` with the additional acquisition instructions.

**Return type**

[*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule")
[Schedule](qiskit.pulse.Schedule "qiskit.pulse.Schedule")

### align\_measures

Expand Down Expand Up @@ -365,15 +365,15 @@ Optimization pass to replace identical pulses.

**Parameters**

**schedules** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")*\[*[*qiskit.pulse.schedule.Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule")*]*) – Schedules to compress.
**schedules** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")*\[*[*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.Schedule")*]*) – Schedules to compress.

**Returns**

Compressed schedules.

**Return type**

[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")\[[qiskit.pulse.schedule.Schedule](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule")]
[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")\[[Schedule](qiskit.pulse.Schedule "qiskit.pulse.Schedule")]

### flatten

Expand Down Expand Up @@ -895,15 +895,15 @@ with pulse.build(backend):

**Parameters**

**qubits** ([*Iterable*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Iterable "(in Python v3.12)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")*]*) – Tuple or list of ordered qubits of the form (control\_qubit, target\_qubit).
**qubits** (*Iterable\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")*]*) – Tuple or list of ordered qubits of the form (control\_qubit, target\_qubit).

**Returns**

List of control channels associated with the supplied ordered list of qubits.

**Return type**

[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")\[[qiskit.pulse.channels.ControlChannel](qiskit.pulse.channels.ControlChannel "qiskit.pulse.channels.ControlChannel")]
[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")\[chans.ControlChannel]

### drive\_channel

Expand Down Expand Up @@ -1540,7 +1540,7 @@ None

**Return type**

Generator\[None, None, None]
Generator\[(None, None, None)]

**Notes**

Expand Down Expand Up @@ -1594,7 +1594,7 @@ None

**Return type**

Generator\[None, None, None]
Generator\[(None, None, None)]

**Notes**

Expand Down Expand Up @@ -1635,7 +1635,7 @@ None

**Return type**

[*Generator*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Generator "(in Python v3.12)")\[None, None, None]
Generator\[(None, None, None)]

### align\_right

Expand Down Expand Up @@ -1672,7 +1672,7 @@ None

**Return type**

[*Generator*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Generator "(in Python v3.12)")\[None, None, None]
Generator\[(None, None, None)]

### align\_sequential

Expand Down Expand Up @@ -1709,7 +1709,7 @@ None

**Return type**

[*Generator*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Generator "(in Python v3.12)")\[None, None, None]
Generator\[(None, None, None)]

### frequency\_offset

Expand Down Expand Up @@ -1746,7 +1746,7 @@ assert len(pulse_prog.instructions) == 4
**Parameters**

* **frequency** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")) – Amount of frequency offset in Hz.
* **channels** (*PulseChannel*) – Channels to offset frequency of.
* **channels** (*chans.PulseChannel*) – Channels to offset frequency of.
* **compensate\_phase** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) – Compensate for accumulated phase accumulated with respect to the channels’ frame at its initial frequency.

**Yields**
Expand All @@ -1755,7 +1755,7 @@ None

**Return type**

[*Generator*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Generator "(in Python v3.12)")\[None, None, None]
Generator\[(None, None, None)]

### phase\_offset

Expand Down Expand Up @@ -1784,15 +1784,15 @@ assert len(pulse_prog.instructions) == 3
**Parameters**

* **phase** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")) – Amount of phase offset in radians.
* **channels** (*PulseChannel*) – Channels to offset phase of.
* **channels** (*chans.PulseChannel*) – Channels to offset phase of.

**Yields**

None

**Return type**

[*Generator*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Generator "(in Python v3.12)")\[None, None, None]
Generator\[(None, None, None)]

### Macros

Expand Down Expand Up @@ -1903,7 +1903,7 @@ The `register`s the qubit measurement results will be stored in.

**Return type**

[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")\[[qiskit.pulse.channels.MemorySlot](qiskit.pulse.channels.MemorySlot "qiskit.pulse.channels.MemorySlot")]
[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")\[chans.MemorySlot]

### delay\_qubits

Expand Down Expand Up @@ -2052,7 +2052,7 @@ with pulse.build(backend):

**Return type**

[set](https://docs.python.org/3/library/stdtypes.html#set "(in Python v3.12)")\[[qiskit.pulse.channels.Channel](#qiskit.pulse.channels.Channel "qiskit.pulse.channels.Channel")]
[set](https://docs.python.org/3/library/stdtypes.html#set "(in Python v3.12)")\[chans.Channel]

### samples\_to\_seconds

Expand Down
2 changes: 1 addition & 1 deletion docs/api/qiskit/dev/qiskit.circuit.ClassicalRegister.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Either the `size` or the `bits` argument must be provided. If `size` is not None

### instances\_counter

`= count(0)`
`= count(2)`

<span id="qiskit.circuit.ClassicalRegister.name" />

Expand Down
2 changes: 1 addition & 1 deletion docs/api/qiskit/dev/qiskit.circuit.ControlledGate.md
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ A tuple with single arguments.

**Return type**

[*Iterable*](https://docs.python.org/3/library/typing.html#typing.Iterable "(in Python v3.12)")\[[tuple](https://docs.python.org/3/library/stdtypes.html#tuple "(in Python v3.12)")\[[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)"), [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")]]
Iterable\[[tuple](https://docs.python.org/3/library/stdtypes.html#tuple "(in Python v3.12)")\[[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)"), [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")]]

### c\_if

Expand Down
2 changes: 1 addition & 1 deletion docs/api/qiskit/dev/qiskit.circuit.Delay.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ A tuple with single arguments.

**Return type**

[*Iterable*](https://docs.python.org/3/library/typing.html#typing.Iterable "(in Python v3.12)")\[[tuple](https://docs.python.org/3/library/stdtypes.html#tuple "(in Python v3.12)")\[[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)"), [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")]]
Iterable\[[tuple](https://docs.python.org/3/library/stdtypes.html#tuple "(in Python v3.12)")\[[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)"), [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")]]

### c\_if

Expand Down
2 changes: 1 addition & 1 deletion docs/api/qiskit/dev/qiskit.circuit.Gate.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ A tuple with single arguments.

**Return type**

[*Iterable*](https://docs.python.org/3/library/typing.html#typing.Iterable "(in Python v3.12)")\[[tuple](https://docs.python.org/3/library/stdtypes.html#tuple "(in Python v3.12)")\[[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)"), [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")]]
Iterable\[[tuple](https://docs.python.org/3/library/stdtypes.html#tuple "(in Python v3.12)")\[[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)"), [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")]]

### c\_if

Expand Down
Loading
Loading