Skip to content

Commit

Permalink
Consolidate transpiler pass port related release notes
Browse files Browse the repository at this point in the history
  • Loading branch information
raynelfss committed Nov 27, 2024
1 parent d3d3085 commit eae5da2
Show file tree
Hide file tree
Showing 9 changed files with 55 additions and 56 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,3 @@ features_transpiler:
contain a :class:`.ControlFlowOp`. This was possible before using the
:meth:`.DAGCircuit.op_nodes` method and passing the :class:`.ControlFlowOp` class
as a filter, but this new function will perform the operation faster.
- |
Ported the entirety of the :class:`.Optimize1qGatesDecomposition` transpiler
pass to Rust. This improves the runtime performance of the pass between 5x
to 10x.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
features_transpiler:
- |
Most of the transpiler passes required by the preset pass manager have
been ported into Rust.
* The :class:`.ConsolidateBlocks` pass will now run the equivalent of the
:class:`.Collect2qBlocks` pass internally if it was not run in a pass
manager prior to the pass. Previously,
:class:`.Collect2qBlocks` or :class:`.Collect1qRuns` had to be run before
:class:`.ConsolidateBlocks` for :class:`.ConsolidateBlocks` to do
anything. By doing the collection internally, the overhead from the pass
is reduced. If :class:`.Collect2qBlocks` or :class:`.Collect1qRuns` are
run prior to :class:`.ConsolidateBlocks,` the collected runs by those
passes from the property set are used and there is no change in behavior
for the pass. The pass now runs up to 3x faster than it did with Python.
* The :class:`.BasisTranslator` transpiler pass has been reimplemented
to work purely from Rust, taking advantage of all the other structures
that currently exist there, such as the :class:`.Target`, :class:`.EquivalenceLibrary`,
and the :class:`.DAGCircuit`. The pass itself now runs
3x to 5x faster than it did in Python.
* Added a Rust implementation of :class:`.CommutationAnalysis` in :func:`.analyze_commutations`.
Testing on ASV benchmarks reveals increased performance of up to 3x compared to Python.
* Port most of the logic of the transpiler pass :class:`~.ElidePermutations`
to Rust. On certain tests the demostrated speedup is between 5x and 10x from
its previous Python implementation.
* Ported the entirety of the :class:`.Optimize1qGatesDecomposition` transpiler
pass to Rust. This improves the runtime performance of the pass between 5x
to 10x.
* The :class:`.CommutationChecker` class has been reimplemented in
Rust. This retains the same functionality as before but is now
significantly faster in most cases. Depending on the circuit type
we can observe a speedup of 5x.
* Added circuit library functions :func:`.pauli_feature_map`, :func:`.z_feature_map`,
:func:`.zz_feature_map` to construct Pauli feature map circuits. These functions
are approximately 8x faster than the current circuit library objects,
:class:`.PauliFeatureMap`, :class:`.ZFeatureMap`, and :class:`.ZZFeatureMap`,
and will replace them in the future. Note, that the new functions return a plain
:class:`.QuantumCircuit` instead of a :class:`.BlueprintCircuit`. From multiple benchmarks
a speedup of up to 8x was observed, in comparison to Python.
The functions can be used as drop-in replacement::
from qiskit.circuit.library import pauli_feature_map, PauliFeatureMap
fm = pauli_feature_map(20, paulis=["z", "xx", "yyy"])
also_fm = PauliFeatureMap(20, paulis=["z", "xx", "yyy"]).decompose()

This file was deleted.

3 changes: 2 additions & 1 deletion releasenotes/notes/1.3/prepare-1.3.0-7c45598775fc2bbf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,5 @@ prelude: >
improvements to the :class:`.HighLevelSynthesis` transpiler pass, which can now take
into account idle auxiliary qubits to find the best available decomposition for a given gate.
* The minimum supported Python version is now 3.9 as Python 3.8 went end of life in 2024-10. Official support for Python 3.13 support was also added in this release.
* The minimum supported Python version is now 3.9 as Python 3.8 went end of life in 2024-10.
Official support for Python 3.13 support was also added in this release.

This file was deleted.

13 changes: 0 additions & 13 deletions releasenotes/notes/1.3/rust-consolidation-a791a00380fc78b8.yaml

This file was deleted.

16 changes: 0 additions & 16 deletions releasenotes/notes/1.3/rust-paulifm-1dc7b1c2dc756614.yaml

This file was deleted.

0 comments on commit eae5da2

Please sign in to comment.