Skip to content

Commit

Permalink
Merge branch 'Qiskit:main' into docs-updates2
Browse files Browse the repository at this point in the history
  • Loading branch information
assafb authored Jan 22, 2025
2 parents 81dbfbb + 12a981b commit 894a79e
Show file tree
Hide file tree
Showing 220 changed files with 670 additions and 609 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ graphviz`.
```
- To only execute specific notebooks, pass them as arguments.
```sh
tox -- path/to/notebook.ipynb path/to/another-notbook.ipynb
tox -- <path/to/notebook.ipynb> <path/to/another-notebook.ipynb>
```
- To write the execution results to the file, pass the `--write` argument.
```sh
Expand Down Expand Up @@ -230,7 +230,7 @@ Some problems can be fixed automatically. To fix these problems, run:
tox -e fix

# Fix problems in a specific notebook
tox -e fix -- path/to/notebook
tox -e fix -- <path/to/notebook>
```

If you use the Jupyter notebook editor, consider adding squeaky as a [pre-save
Expand Down
2 changes: 1 addition & 1 deletion docs/api/qiskit/_package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"name": "qiskit",
"version": "1.3.1"
"version": "1.3.2"
}
2 changes: 1 addition & 1 deletion docs/api/qiskit/qiskit.synthesis.LieTrotter.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ $$
For example, the Hamiltonian `H = IX + ZZ` for an evolution time `t` and 1 repetition for an order 2 formula would get decomposed into a list of 3-tuples containing `(pauli, indices, rz_rotation_angle)`, that is:

```text
("X", [0], t), ("ZZ", [0, 1], 2t), ("X", [0], 2)
("X", [0], t), ("ZZ", [0, 1], 2t), ("X", [0], t)
```

Note that the rotation angle contains a factor of 2, such that that evolution of a Pauli $P$ over time $t$, which is $e^{itP}$, is represented by `(P, indices, 2 * t)`.
Expand Down
2 changes: 1 addition & 1 deletion docs/api/qiskit/qiskit.synthesis.SuzukiTrotter.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ $$
For example, the Hamiltonian `H = IX + ZZ` for an evolution time `t` and 1 repetition for an order 2 formula would get decomposed into a list of 3-tuples containing `(pauli, indices, rz_rotation_angle)`, that is:

```text
("X", [0], t), ("ZZ", [0, 1], 2t), ("X", [0], 2)
("X", [0], t), ("ZZ", [0, 1], 2t), ("X", [0], t)
```

Note that the rotation angle contains a factor of 2, such that that evolution of a Pauli $P$ over time $t$, which is $e^{itP}$, is represented by `(P, indices, 2 * t)`.
Expand Down
60 changes: 55 additions & 5 deletions docs/api/qiskit/release-notes/1.3.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,60 @@ in_page_toc_max_heading_level: 3

<span id="id1" />

## 1.3.2

<span id="relnotes-1-3-2-prelude" />

### Prelude

Qiskit 1.3.2 is a minor bugfix release for the 1.3 series.

<span id="relnotes-1-3-2-synthesis-upgrade-notes" />

### Synthesis Upgrade Notes

* The high-level synthesis plugins for [`LinearFunction`](/api/qiskit/qiskit.circuit.library.LinearFunction "qiskit.circuit.library.LinearFunction") no longer raise an error when an object other than [`LinearFunction`](/api/qiskit/qiskit.circuit.library.LinearFunction "qiskit.circuit.library.LinearFunction") is passed into the `run` method. Instead, they now return `None`, which is consistent with other plugins. If you relied on this error being raised, you can manually perform an instance-check.

<span id="relnotes-1-3-2-bug-fixes" />

### Bug Fixes

* Previously, the [`CommutationChecker`](/api/qiskit/qiskit.circuit.CommutationChecker "qiskit.circuit.CommutationChecker") eagerly cached the commutation relations of [`Instruction`](/api/qiskit/qiskit.circuit.Instruction "qiskit.circuit.Instruction")s with float-only `params` as key to query the relation. This could lead to incorrect results if the instruction’s definition depended on additional information beyond just the [`params`](/api/qiskit/qiskit.circuit.Instruction#params "qiskit.circuit.Instruction.params") attribute, as, for example, in the case of [`PauliEvolutionGate`](/api/qiskit/qiskit.circuit.library.PauliEvolutionGate "qiskit.circuit.library.PauliEvolutionGate"). This behavior is now fixed, and the commutation checker eagerly caches commutations only for Qiskit-native standard gates. For custom gates, this change might incur a performance cost; however, guarantees correct results by avoiding unsafe caching.

* Fixed a bug in the [`CommutationChecker`](/api/qiskit/qiskit.circuit.CommutationChecker "qiskit.circuit.CommutationChecker"), where checking commutation relations of an instruction with non-numeric values in the [`params`](/api/qiskit/qiskit.circuit.Instruction#params "qiskit.circuit.Instruction.params") attribute (as in the case of [`PauliGate`](/api/qiskit/qiskit.circuit.library.PauliGate "qiskit.circuit.library.PauliGate")) could raise an error. Fixed [#13570](https://github.com/Qiskit/qiskit/issues/13570).

* The [`CommutationChecker`](/api/qiskit/qiskit.circuit.CommutationChecker "qiskit.circuit.CommutationChecker") did not correctly handle commutations of the [`CRXGate`](/api/qiskit/qiskit.circuit.library.CRXGate "qiskit.circuit.library.CRXGate"), [`CRYGate`](/api/qiskit/qiskit.circuit.library.CRYGate "qiskit.circuit.library.CRYGate") and [`CRZGate`](/api/qiskit/qiskit.circuit.library.CRZGate "qiskit.circuit.library.CRZGate") for rotation angles of the form $(4k + 2)\pi$, with $k \in \mathbb Z$. In these cases, these gates were incorrectly assumed to commute with any gate. This behavior is now fixed, and these gates correctly commute with any gate only when the rotation angle is a multiple of $4\pi$.

* Fixed a bug that caused the following circuit library functions to produce errors when called with `num_qubits=1`: [`efficient_su2()`](/api/qiskit/qiskit.circuit.library.efficient_su2 "qiskit.circuit.library.efficient_su2"), [`real_amplitudes()`](/api/qiskit/qiskit.circuit.library.real_amplitudes "qiskit.circuit.library.real_amplitudes"), [`excitation_preserving()`](/api/qiskit/qiskit.circuit.library.excitation_preserving "qiskit.circuit.library.excitation_preserving") and [`pauli_two_design()`](/api/qiskit/qiskit.circuit.library.pauli_two_design "qiskit.circuit.library.pauli_two_design") (for a single qubit, these circuits do not contain any 2-qubit gates). Fixed [#13480](https://github.com/Qiskit/qiskit/issues/13480).

* Fixed a bug where any instruction named `"mcmt"` was incorrectly passed to the high-level synthesis routine for a [`MCMTGate`](/api/qiskit/qiskit.circuit.library.MCMTGate "qiskit.circuit.library.MCMTGate"), leading to a failure or an invalid result. This issue could happen, for example, when handling the [`MCMT`](/api/qiskit/qiskit.circuit.library.MCMT "qiskit.circuit.library.MCMT") *circuit*, named `"mcmt"`, and implicitly converting it into an instruction (e.g., when appending it to another circuit). Fixed [#13563](https://github.com/Qiskit/qiskit/issues/13563).

* Fixed a bug where the default product formula synthesis for [`PauliEvolutionGate`](/api/qiskit/qiskit.circuit.library.PauliEvolutionGate "qiskit.circuit.library.PauliEvolutionGate") did not correctly handle all-identity terms in the operator. The all-identity term should introduce a global phase equal to `-evolution_time`, but was off by a factor of 2 and could break for parameterized times. Fixed [#13625](https://github.com/Qiskit/qiskit/issues/13625). Fixed [#13675](https://github.com/Qiskit/qiskit/issues/13675). Fixed [#13644](https://github.com/Qiskit/qiskit/issues/13644).

* Fixed an inconsistency in the circuit generated by Pauli evolution synthesis using [`SuzukiTrotter`](/api/qiskit/qiskit.synthesis.SuzukiTrotter "qiskit.synthesis.SuzukiTrotter") or [`LieTrotter`](/api/qiskit/qiskit.synthesis.LieTrotter "qiskit.synthesis.LieTrotter") (the default) method. For parameterized evolution times, the resulting circuits contained parameters with a spurious zero complex part, which affected the output of [`ParameterExpression.sympify()`](/api/qiskit/qiskit.circuit.ParameterExpression#sympify "qiskit.circuit.ParameterExpression.sympify"). The output now correctly contains only real values. Fixed [#13642](https://github.com/Qiskit/qiskit/pull/13642).

* Fixed a bug that caused [`PauliList.insert()`](/api/qiskit/qiskit.quantum_info.PauliList#insert "qiskit.quantum_info.PauliList.insert") with `qubit=True` to produce a phase attribute with the wrong shape when the original object was of length 1. Fixed [#13623](https://github.com/Qiskit/qiskit/issues/13623).

* Fixed a bug in [`qasm3.Exporter`](/api/qiskit/qasm3#qiskit.qasm3.Exporter "qiskit.qasm3.Exporter") that caused the exporter to crash when handling a unitary gate due to an incorrect processing of its `params` field. Fixed [#13362](https://github.com/Qiskit/qiskit/issues/13362).

* Fixed a bug in the [`Target.instruction_supported()`](/api/qiskit/qiskit.transpiler.Target#instruction_supported "qiskit.transpiler.Target.instruction_supported") method where targets with `self.num_qubits==None` would always return `False` independently of the supported basis set.

* Fixed a bug in the [`UnitarySynthesis`](/api/qiskit/qiskit.transpiler.passes.UnitarySynthesis "qiskit.transpiler.passes.UnitarySynthesis") transpiler pass, where blocks of [`UnitaryGate`](/api/qiskit/qiskit.circuit.library.UnitaryGate "qiskit.circuit.library.UnitaryGate")s on 3 qubits or more were not correctly synthesized. This led, e.g., to the circuit being overwritten with the last processed block or to internal panics when encountering measurements after such a block. Fixed [#13586](https://github.com/Qiskit/qiskit/issues/13586).

* Fixed a bug in the [`UnitarySynthesis`](/api/qiskit/qiskit.transpiler.passes.UnitarySynthesis "qiskit.transpiler.passes.UnitarySynthesis") transpiler pass where non-2-qubit gates would be included in the available 2 qubit basis, causing the `TwoQubitWeylDecomposition` to panic because of the dimension mismatch.

* Fixed a bug where initializing [`SparsePauliOp`](/api/qiskit/qiskit.quantum_info.SparsePauliOp "qiskit.quantum_info.SparsePauliOp") with a large number of Pauli-`Y` terms (typically $\geq 100$) and no explicit `coeffs` would result in a coefficient close to 1 but with a floating point error. The coefficient is now correctly 1 per default. Fixed [#13522](https://github.com/Qiskit/qiskit/issues/13522).

<span id="relnotes-1-3-1" />

<span id="id2" />

## 1.3.1

<span id="relnotes-1-3-1-prelude" />

<span id="id3" />

### Prelude

Qiskit 1.3.1 is a minor bugfix release for the 1.3 series.
Expand All @@ -30,7 +80,7 @@ Qiskit 1.3.1 is a minor bugfix release for the 1.3 series.

<span id="relnotes-1-3-1-bug-fixes" />

<span id="id2" />
<span id="id4" />

### Bug Fixes

Expand Down Expand Up @@ -60,13 +110,13 @@ Qiskit 1.3.1 is a minor bugfix release for the 1.3 series.

<span id="relnotes-1-3-0" />

<span id="id3" />
<span id="id5" />

## 1.3.0

<span id="relnotes-1-3-0-prelude" />

<span id="id4" />
<span id="id6" />

### Prelude

Expand Down Expand Up @@ -540,7 +590,7 @@ $$
<span id="relnotes-1-3-0-circuits-upgrade-notes" />
<span id="id5" />
<span id="id7" />
### Circuits Upgrade Notes
Expand Down Expand Up @@ -810,7 +860,7 @@ $$
<span id="relnotes-1-3-0-bug-fixes" />
<span id="id6" />
<span id="id8" />
### Bug Fixes
Expand Down
Loading

0 comments on commit 894a79e

Please sign in to comment.