forked from Qiskit/qiskit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
100 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 16 additions & 12 deletions
28
releasenotes/notes/1.0/add-annotated-arg-to-control-d9a188fe66f037ad.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,20 @@ | ||
--- | ||
features: | ||
- | | ||
The methods :meth:`~qiskit.circuit.QuantumCircuit.control`, | ||
:meth:`~qiskit.circuit.Gate.control`, as well as the similar methods | ||
of subclasses of :class:`~qiskit.circuit.Gate` | ||
(such as :class:`~qiskit.circuit.library.UnitaryGate` or | ||
:class:`~qiskit.circuit.library.SwapGate`) all have an additional | ||
argument ``annotated``. The default value of ``False`` corresponds to | ||
the existing behavior, for example | ||
``SwapGate().control(1, annotated=False)`` returns a ``CSwapGate``, | ||
while | ||
``SwapGate().control(2, annotated=False)`` returns a ``ControlledGate``. | ||
The value of ``True`` returns an object of type | ||
:class:`~.AnnotatedOperation` instead, avoiding the eager construction | ||
Added a new argument, ``annotated``, to the methods: :meth:`.QuantumCircuit.control`, | ||
:meth:`Gate.control`, as well as the similar methods | ||
of subclasses of :class:`.Gate` | ||
(such as :class:`.UnitaryGate` or :class:`.SwapGate`) to optionally return | ||
an :class:`.AnnotatedOperation`. The default value of | ||
``annotated`` is ``False`` and corresponds to the existing behavior, for | ||
example:: | ||
SwapGate().control(1, annotated=False) | ||
returns a :class:`.CSwapGate` while:: | ||
SwapGate().control(2, annotated=False) | ||
returns a ``ControlledGate``. The value of ``True`` returns an object of | ||
type :class:`~.AnnotatedOperation` instead, avoiding the eager construction | ||
of the controlled gate's definition. |
24 changes: 11 additions & 13 deletions
24
releasenotes/notes/1.0/add-annotated-arg-to-inverse-2e577f33793c06b1.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,19 @@ | ||
--- | ||
features: | ||
- | | ||
The methods :meth:`~qiskit.circuit.QuantumCircuit.inverse`, | ||
:meth:`~qiskit.circuit.Instruction.inverse`, as well as the similar methods | ||
Added a new argument, ``annotated``, to the methods :meth:`.QuantumCircuit.inverse`, | ||
:meth:`.circuit.Instruction.inverse`, as well as the similar methods | ||
of subclasses of :class:`~qiskit.circuit.Instruction` | ||
(such as :class:`~qiskit.circuit.library.SwapGate` or | ||
:class:`~qiskit.circuit.library.SGate`) all have an additional | ||
argument ``annotated``. | ||
The default value of ``False`` corresponds to the existing behavior. | ||
Furthermore, for standard gates with an explicitly defined ``inverse`` method, | ||
(such as :class:`.SwapGate` or :class:`.SGate`) to optionally return | ||
an :class:`.AnnotatedOperation`. The default value of ``annotated`` is | ||
``False`` and corresponds to the existing behavior. Furthermore, for | ||
standard gates with an explicitly defined ``inverse`` method, | ||
the argument ``annotated`` has no effect, for example both | ||
``SwapGate().inverse(annotated=False)`` and ``SwapGate().inverse(annotated=True)`` | ||
return a ``SwapGate``, and both | ||
``SGate().inverse(annotated=False)`` and ``SGate().inverse(annotated=True)`` | ||
return an ``SdgGate``. | ||
return a :class:`.SwapGate`, and both ``SGate().inverse(annotated=False)`` and | ||
``SGate().inverse(annotated=True)`` return an :class:`.SdgGate`. | ||
The difference manifests for custom instructions without an explicitly defined | ||
inverse. The value of ``False`` returns a fresh instruction with the | ||
recursively inverted definition, just as before. The value of ``True`` | ||
inverse. With ``annotated=False`` returns a fresh instruction with the | ||
recursively inverted definition, just as before. While ``annotated=True`` | ||
returns an :class:`~.AnnotatedOperation` that represents the instruction | ||
modified with the "inverse modifier". | ||
modified with the :class:`.InverseModifier`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 10 additions & 9 deletions
19
releasenotes/notes/1.0/add-commutation-library-88b7ff65b3d35f9a.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
--- | ||
features: | ||
- | | ||
Adds a commutation library to the :class:`.CommutationChecker`. The commutation library stores all | ||
commutation relations of unparameterizable standard gates into a dictionary that allows for efficient | ||
lookup at runtime. Furthermore, the :class:`.CommutationChecker` was refactored and an upper limit was | ||
set to the number of cached commutation relations that are not in the commutation library. A session | ||
commutation checker was added, that can be used to cache commutations computed during one qiskit | ||
execution. Addresses `#8020 <https://github.com/Qiskit/qiskit-terra/issues/8020>`__ and | ||
Added a commutation library to the :class:`.CommutationChecker` which stores all the | ||
commutation relations of unparameterizable standard gates into a dictionary that allows | ||
for efficient lookup at runtime. This speeds up the execution of the :class:`.CommutationChecker` | ||
class and by extensions the :class:`.CommutationAnalysis` transpiler pass as instead of | ||
computing whether two unparameterizable standard gates commute it just has to look it up | ||
from the library. | ||
Additionally, the :class:`.CommutationChecker` was refactored and now has an upper limit | ||
set on the number of cached commutation relations that are not in the commutation library. | ||
This addressed: `#8020 <https://github.com/Qiskit/qiskit-terra/issues/8020>`__ and | ||
`#7101 <https://github.com/Qiskit/qiskit-terra/issues/7101>`__ | ||
- | | ||
Adds a `SessionCommutationChecker`, i.e. a commutation checker with commutations that are cached | ||
consistently during the runtime of a python execution. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 17 additions & 3 deletions
20
releasenotes/notes/1.0/add-num-processes-kwarg-to-transpiler-3cb7f3457b54a535.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,20 @@ | ||
--- | ||
features: | ||
- | | ||
Add new keyword argument ``num_processes`` to :func:`~qiskit.compiler.transpiler`. | ||
Allows for overriding user configurations file entry ``num_processes`` and | ||
the environment variable ``QISKIT_NUM_PROCS`` on a per transpile basis. | ||
Added a new keyword argument ``num_processes`` to :func:`.transpile` and | ||
the :meth:`PassManager.run` method. This allows for overriding the | ||
``QISKIT_NUM_PROCS`` and a user configuration file ``num_processes`` field | ||
on a per transpile basis. For example:: | ||
from qiskit import transpile, QuantumCircuit | ||
qc = QuantumCircuit(2) | ||
qc.h(0) | ||
qc.cx(0, 1) | ||
qc.measure_all() | ||
transpile([qc]*10, basis_gates=['u', 'cz'], num_processes=2) | ||
will run the transpile over the 10 input circuits using only 2 processes | ||
and will override the system default, environment variable, or user | ||
configuration file for that :func:`.transpile` call. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
releasenotes/notes/1.0/add-qpy-loading-depr-warning-8628b23ca63c3eb5.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
--- | ||
features: | ||
- | | ||
A new exception, :exc:`~.QPYLoadingDeprecatedFeatureWarning`, has been added to the QPY module. | ||
A new warning class, :exc:`~.QPYLoadingDeprecatedFeatureWarning`, has been added to the QPY module. | ||
This class allows for deprecation warnings to surface even if the depreacted feature | ||
is in a variable point in the call stack, as is the case for many QPY loading functions that | ||
are called recursively. |