Skip to content

Commit

Permalink
Prepare 1.1.0 release (#12371)
Browse files Browse the repository at this point in the history
This commit prepares the repo for the 1.1.0 release. It updates the version numbers to indicate it is the final 1.1.0 release, and updates the release notes to prepare them for publishing. Once this merges this commit should be used to tag the 1.1.0 release.

* draft 1.1.0

* fixes text/typos

* .

* .

* Update releasenotes/notes/1.1/add-annotated-arg-to-power-4afe90e89fa50f5a.yaml

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>

* Update releasenotes/notes/1.1/prepare-1.1.0-732e167b70ab4d01.yaml

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>

* Update releasenotes/notes/1.1/prepare-1.1.0-732e167b70ab4d01.yaml

Co-authored-by: Ian Hincks <ian.hincks@gmail.com>

* up

* up

* Update releasenotes/notes/1.1/star-prerouting-0998b59880c20cef.yaml

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>

* Update releasenotes/notes/1.1/star-prerouting-0998b59880c20cef.yaml

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>

* Update releasenotes/notes/1.1/star-prerouting-0998b59880c20cef.yaml

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>

* prelude - add platform support

* prelude update

* Update releasenotes/notes/1.1/prepare-1.1.0-732e167b70ab4d01.yaml

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>

* Update releasenotes/notes/1.1/added-parameter-ctrl_state-mcx-816dcd80e459a5ed.yaml

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>

* Update releasenotes/notes/1.1/add-annotated-arg-to-power-4afe90e89fa50f5a.yaml

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>

* Update releasenotes/notes/1.1/add-annotated-arg-to-power-4afe90e89fa50f5a.yaml

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>

* Update releasenotes/notes/1.1/add-annotated-arg-to-power-4afe90e89fa50f5a.yaml

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>

* Update releasenotes/notes/1.1/add-ctrl_state-mcp-parameter-b23562aa7047665a.yaml

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>

* Update releasenotes/notes/1.1/prepare-1.1.0-732e167b70ab4d01.yaml

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>

* Update releasenotes/notes/1.1/prepare-1.1.0-732e167b70ab4d01.yaml

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>

* Update releasenotes/notes/1.1/prepare-1.1.0-732e167b70ab4d01.yaml

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>

* comments from code review

* Apply suggestions from code review

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>

* Update releasenotes/notes/1.1/abstract-commutation-analysis-3518129e91a33599.yaml

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>

* Update qiskit/primitives/containers/shape.py

Co-authored-by: Ian Hincks <ian.hincks@gmail.com>

* Update shape.py

* Apply suggestions from code review

Co-authored-by: Luciano Bello <bel@zurich.ibm.com>

* Update releasenotes/notes/1.1/prepare-1.1.0-732e167b70ab4d01.yaml

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>

* Update releasenotes/notes/1.1/prepare-1.1.0-732e167b70ab4d01.yaml

Co-authored-by: Luciano Bello <bel@zurich.ibm.com>

* .

* .

* Move and update new fix release notes

* Small tweaks

* Remove fix note for private API

* Add release notes for manual `Var` and `Store` (#12421)

* Add release notes for manual `Var` and `Store`

This adds the release notes and updates some small portions of
documentation that were previously missed surrounding the new manual
`Var` storage locations.

This includes documenting all new keyword arguments to methods, upgrade
instructions for providers, and adding the `Var.new` method to the
documentation, which was previously erroneously omitted.

* Fix Sphinx typo

* Fix another Sphinx typo

* Move QPY version bump to upgrade

* Unify base release note

* Reword providers upgrade note

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>

---------

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
(cherry picked from commit 554e661)

---------

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
Co-authored-by: Ian Hincks <ian.hincks@gmail.com>
Co-authored-by: Luciano Bello <bel@zurich.ibm.com>
Co-authored-by: Jake Lishman <jake.lishman@ibm.com>
  • Loading branch information
5 people committed May 16, 2024
1 parent 3f0b5e3 commit 7d29dc1
Show file tree
Hide file tree
Showing 60 changed files with 457 additions and 382 deletions.
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
# The short X.Y version
version = "1.1"
# The full version, including alpha/beta/rc tags
release = "1.1.0rc1"
release = "1.1.0"

language = "en"

Expand Down
2 changes: 1 addition & 1 deletion docs/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ Qiskit |version| release notes
`:earliest-version:` should be set to the rc1 release for the current minor release series. For example, the stable/1.1 branch should set it to 1.1.0rc1. If on `main`, set to the prior minor version's rc1, like `1.0.0rc1`.

.. release-notes::
:earliest-version: 1.0.0rc1
:earliest-version: 1.1.0rc1
2 changes: 1 addition & 1 deletion qiskit/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.1.0rc1
1.1.0
2 changes: 1 addition & 1 deletion qiskit/circuit/classical/expr/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
real-time variable, or a wrapper around a :class:`.Clbit` or :class:`.ClassicalRegister`.
.. autoclass:: Var
:members: var, name
:members: var, name, new
Similarly, literals used in expressions (such as integers) should be lifted to :class:`Value` nodes
with associated types.
Expand Down
16 changes: 11 additions & 5 deletions qiskit/primitives/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
* a collection parameter value sets to bind the circuit against, :math:`\theta_k`.
Running an estimator returns a :class:`~qiskit.primitives.BasePrimitiveJob` object, where calling
the method :meth:`~qiskit.primitives.BasePrimitiveJob.result` results in expectation value estimates
the method :meth:`~qiskit.primitives.BasePrimitiveJob.result` results in expectation value estimates
and metadata for each pub:
.. math::
Expand Down Expand Up @@ -95,15 +95,15 @@
# [<psi2(theta2)|H2|psi2(theta2)>] ]
job2 = estimator.run(
[
(psi1, [H1, H3], [theta1, theta3]),
(psi1, [H1, H3], [theta1, theta3]),
(psi2, H2, theta2)
],
precision=0.01
)
job_result = job2.result()
print(f"The primitive-job finished with result {job_result}")
Overview of SamplerV2
=====================
Expand Down Expand Up @@ -220,8 +220,8 @@
# <psi2(theta2)|H2|psi2(theta2)>,
# <psi1(theta3)|H3|psi1(theta3)> ]
job2 = estimator.run(
[psi1, psi2, psi1],
[H1, H2, H3],
[psi1, psi2, psi1],
[H1, H2, H3],
[theta1, theta2, theta3]
)
job_result = job2.result()
Expand Down Expand Up @@ -417,8 +417,10 @@
DataBin
PrimitiveResult
PubResult
SamplerPubResult
BasePrimitiveJob
PrimitiveJob
Shaped
Estimator V1
------------
Expand Down Expand Up @@ -464,12 +466,16 @@
DataBin,
PrimitiveResult,
PubResult,
SamplerPubResult,
EstimatorPubLike,
SamplerPubLike,
BindingsArrayLike,
ObservableLike,
ObservablesArrayLike,
Shaped,
)


from .estimator import Estimator
from .primitive_job import BasePrimitiveJob, PrimitiveJob
from .sampler import Sampler
Expand Down
1 change: 1 addition & 0 deletions qiskit/primitives/containers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@
from .pub_result import PubResult
from .sampler_pub import SamplerPubLike
from .sampler_pub_result import SamplerPubResult
from .shape import Shaped
1 change: 1 addition & 0 deletions qiskit/primitives/containers/bit_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ def __repr__(self):
return f"BitArray({desc})"

def __getitem__(self, indices):
"""Slices the array along an existing axis of the array."""
if isinstance(indices, tuple) and len(indices) >= self.ndim + 2:
raise ValueError(
"BitArrays cannot be sliced along the bits axis, see slice_bits() instead."
Expand Down
6 changes: 3 additions & 3 deletions qiskit/primitives/containers/shape.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,15 @@ def __repr__(self):
return f"{type(self).__name__}(<{self.shape}>)"

@property
def shape(self):
def shape(self) -> tuple[int, ...]:
return self._shape

@property
def ndim(self):
def ndim(self) -> int:
return len(self._shape)

@property
def size(self):
def size(self) -> int:
return int(np.prod(self._shape, dtype=int))


Expand Down
39 changes: 38 additions & 1 deletion qiskit/providers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,8 +452,45 @@ def get_translation_stage_plugin(self):
efficient output on ``Mybackend`` the transpiler will be able to perform these
custom steps without any manual user input.
.. _providers-guide-real-time-variables:
Real-time variables
^^^^^^^^^^^^^^^^^^^
The transpiler will automatically handle real-time typed classical variables (see
:mod:`qiskit.circuit.classical`) and treat the :class:`.Store` instruction as a built-in
"directive", similar to :class:`.Barrier`. No special handling from backends is necessary to permit
this.
If your backend is *unable* to handle classical variables and storage, we recommend that you comment
on this in your documentation, and insert a check into your :meth:`~.BackendV2.run` method (see
:ref:`providers-guide-backend-run`) to eagerly reject circuits containing them. You can examine
:attr:`.QuantumCircuit.num_vars` for the presence of variables at the top level. If you accept
:ref:`control-flow operations <circuit-control-flow-repr>`, you might need to recursively search the
internal :attr:`~.ControlFlowOp.blocks` of each for scope-local variables with
:attr:`.QuantumCircuit.num_declared_vars`.
For example, a function to check for the presence of any manual storage locations, or manual stores
to memory::
from qiskit.circuit import Store, ControlFlowOp, QuantumCircuit
def has_realtime_logic(circuit: QuantumCircuit) -> bool:
if circuit.num_vars:
return True
for instruction in circuit.data:
if isinstance(instruction.operation, Store):
return True
elif isinstance(instruction.operation, ControlFlowOp):
for block in instruction.operation.blocks:
if has_realtime_logic(block):
return True
return False
.. _providers-guide-backend-run:
Backend.run Method
--------------------
------------------
Of key importance is the :meth:`~qiskit.providers.BackendV2.run` method, which
is used to actually submit circuits to a device or simulator. The run method
Expand Down
177 changes: 0 additions & 177 deletions releasenotes/notes/1.0/primitives-v2-df871c0c6ac0b94a.yaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
features:
features_transpiler:
- |
Extended the commutation analysis performed by :class:`.CommutationChecker` to only operate on
hardware circuits to also work with abstract circuits, i.e. each operation in
the input quantum circuit is now checked for its matrix representation before proceeding to the
analysis. In addition, the operation is now checked for its ability to be cached in the session
commutation library. For example, this now enables computing whether :class:`.AnnotatedOperation`
commute. This enables transpiler passes that rely on :class:`.CommutationChecker` internally,
such as :class:`.CommutativeCancellation`, during earlier stages of a default transpilation pipeline
Extended the commutation analysis performed by :class:`~.CommutationChecker` to also work with
abstract circuits, i.e. each operation in the input quantum circuit is now checked for its matrix
representation before proceeding to the analysis step. Previously, the commutation analysis was only
performed on physical circuits. In addition, each operation is now checked for its ability to be
cached in the session commutation library. For example, this now enables computing
whether :class:`.AnnotatedOperation` commute. This enables transpiler passes that rely on :class:`~.CommutationChecker` internally,
such as :class:`.CommutativeCancellation`, to run during earlier stages of a default transpilation pipeline
(prior to basis translation).
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
---
features:
features_circuits:
- |
The methods :meth:`~qiskit.circuit.QuantumCircuit.power`,
:meth:`~qiskit.circuit.Gate.power`, as well as the similar methods
The methods :meth:`.QuantumCircuit.power`,
:meth:`.Gate.power`, as well as the similar methods on subclasses
of subclasses of :class:`~qiskit.circuit.Gate`
(such as of :class:`~qiskit.circuit.library.SGate`) all have an additional
argument ``annotated``.
have a new argument ``annotated`` which is used to return an :class:`.AnnotatedOperation`
object when applying a power to a gate or circuit.
The default value of ``False`` corresponds to the existing behavior.
Furthermore, for standard gates with an explicitly defined ``power`` method,
the argument ``annotated`` has no effect, for example both
the argument ``annotated`` has no effect.
For example, both
``SGate().power(1.5, annotated=False)`` and ``SGate().power(1.5, annotated=True)``
return a ``PhaseGate``.
The difference manifests for gates without an explicitly defined
A difference in the value of ``annotated`` manifests for gates without an explicitly defined
power method. The value of ``False`` returns a
:class:`~.library.UnitaryGate`, just as before, while the value of ``True``
returns an :class:`~.AnnotatedOperation` that represents the instruction
Expand Down

0 comments on commit 7d29dc1

Please sign in to comment.