Skip to content

Commit

Permalink
More code review comments
Browse files Browse the repository at this point in the history
Co-authored-by: Rebecca Dimock <[email protected]>
  • Loading branch information
raynelfss and beckykd committed Nov 25, 2024
1 parent 58191bb commit b1e08f8
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
14 changes: 7 additions & 7 deletions releasenotes/notes/1.3/pauli-evo-plugins-612850146c3f7d49.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ features_quantum_info:
features_synthesis:
- |
Added :meth:`.ProductFormula.expand` which allows to view the expansion of a product formula
Added :meth:`.ProductFormula.expand`, which lets you view the expansion of a product formula
in a sparse Pauli format.
- |
Added the plugin structure for the :class:`.PauliEvolutionGate`. The default plugin,
:class:`.PauliEvolutionSynthesisDefault`, constructs circuit as before, but faster as it
internally uses Rust. The larger the circuit (e.g. by the Hamiltonian size, the number
of timesteps, or the Suzuki-Trotter order), the higher the speedup. For example,
:class:`.PauliEvolutionSynthesisDefault`, constructs circuit as before, but faster, as it
internally uses Rust. The larger the circuit (for example. by the Hamiltonian size, the number
of timesteps, or the Suzuki-Trotter order), the greater the speedup. For example,
a 100-qubit Heisenberg Hamiltonian with 10 timesteps and a 4th-order Trotter formula is
now constructed ~9.4x faster.
The new plugin, :class:`.PauliEvolutionSynthesisRustiq`, uses
Expand All @@ -45,14 +45,14 @@ features_synthesis:
This code snippet uses the ``"rustiq"`` plugin to synthesize :class:`.PauliEvolutionGate`
objects in the quantum circuit `qc`. The plugin is called with the additional option
``"upto_phase" = False`` allowing to obtain smaller circuits at the expense of possibly
not preserving the global phase. For the full list of supported options, see
``"upto_phase" = False``, allowing you to obtain smaller circuits at the expense of possibly
not preserving the global phase. For the full list of supported options, see the
documentation for :class:`.PauliEvolutionSynthesisRustiq`.
upgrade:
- |
The following classes now use the :math:`\sqrt{X}` operation to diagonalize the Pauli-Y
operator: :class:`.PauliEvolutionGate`, :class:`.EvolvedOperatorAnsatz`,
operator: :class:`.PauliEvolutionGate`, :class:`.EvolvedOperatorAnsatz`, and
:class:`.PauliFeatureMap`. Previously, these classes used either :math:`H S` or
:math:`R_X(-\pi/2)` as basis transformation. Using the :math:`\sqrt{X}` operation,
represented by the :class:`.SXGate` is more efficient as it uses only a single gate
Expand Down
28 changes: 14 additions & 14 deletions releasenotes/notes/1.3/storage-var-a00a33fcf9a71f3f.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ features_circuits:
See :ref:`circuit-real-time-methods` for more in-depth discussion on all of these.
The new methods are:
The new methods are::
* :meth:`~.QuantumCircuit.add_var`
* :meth:`~.QuantumCircuit.add_input`
Expand All @@ -21,7 +21,7 @@ features_circuits:
* :meth:`~.QuantumCircuit.store`
In addition, there are several new dynamic attributes on :class:`.QuantumCircuit` surrounding
these variables:
these variables::
* :attr:`~.QuantumCircuit.num_vars`
* :attr:`~.QuantumCircuit.num_input_vars`
Expand All @@ -37,7 +37,7 @@ features_circuits:
that the :class:`.DAGCircuit` ones are optimized for programmatic access with already defined
objects, while the :class:`.QuantumCircuit` methods are more focussed on interactive human use.
The new methods are:
The new methods are::
* :meth:`~.DAGCircuit.add_input_var`
* :meth:`~.DAGCircuit.add_captured_var`
Expand All @@ -48,7 +48,7 @@ features_circuits:
* :meth:`~.DAGCircuit.iter_captured_vars`
* :meth:`~.DAGCircuit.iter_input_vars`
There are also new public attributes:
There are also new public attributes::
* :attr:`~.DAGCircuit.num_vars`
* :attr:`~.DAGCircuit.num_input_vars`
Expand All @@ -58,10 +58,10 @@ features_circuits:
:attr:`.DAGCircuit.wires` will now also contain any :class:`.Var` manual variables in the
circuit as well, as these are also classical data flow.
- |
A new method, :meth:`.Var.new`, is added to manually construct a real-time classical variable
A new method, :meth:`.Var.new`, was added to manually construct a real-time classical variable
that owns its memory.
- |
:meth:`.QuantumCircuit.compose` has two need keyword arguments, ``var_remap`` and ``inline_captures``
:meth:`.QuantumCircuit.compose` has two required keyword arguments, var_remap and inline_captures
to better support real-time classical variables.
``var_remap`` can be used to rewrite :class:`.Var` nodes in the circuit argument as its
Expand All @@ -74,8 +74,8 @@ features_circuits:
a circuit layer by layer, containing variables.
- |
:meth:`.DAGCircuit.compose` has a new keyword argument, ``inline_captures``, which can be set to
``True`` to inline "captured" :class:`.Var` nodes on the argument circuit onto the base circuit
without redeclaring them. In conjunction with the ``vars_mode="captures"`` option to several
``True`` to inline "capture" :class:`.Var` nodes on the argument circuit onto the base circuit
without redeclaring them. Combined with the ``vars_mode="captures"`` option available on several
:class:`.DAGCircuit` methods, this can be used to combine DAGs that operate on the same variables.
- |
:meth:`.QuantumCircuit.copy_empty_like` and :meth:`.DAGCircuit.copy_empty_like` have a new
Expand All @@ -85,7 +85,7 @@ features_circuits:
variables to captures (useful with :meth:`~.QuantumCircuit.compose`) or ``"drop"`` to remove
them.
- |
A new ``vars_mode`` keyword argument has been added to the :class:`.DAGCircuit` methods:
A new ``vars_mode`` keyword argument has been added to the :class:`.DAGCircuit` methods::
* :meth:`~.DAGCircuit.separable_circuits`
* :meth:`~.DAGCircuit.layers`
Expand All @@ -98,7 +98,7 @@ features_qasm:
features_qpy:
- |
QPY (:mod:`qiskit.qpy`) format version 12 has been added, which includes support for memory-owning
:class:`.Var` variables. See :ref:`qpy_version_12` for more detail on the format changes.
:class:`.Var` variables. See :ref:`qpy_version_12` for more details on the format changes.
features_visualization:
- |
The text and `Matplotlib <https://matplotlib.org>`__ circuit drawers (:meth:`.QuantumCircuit.draw`)
Expand All @@ -112,10 +112,10 @@ upgrade_qpy:
unchanged at 10.
upgrade_providers:
- |
Implementations of :class:`.BackendV2` (and :class:`.BackendV1`) may desire to update their
:meth:`~.BackendV2.run` methods to eagerly reject inputs containing typed
classical variables (see :mod:`qiskit.circuit.classical`) and the :class:`.Store` instruction,
if they do not have support for them. The new :class:`.Store` instruction is treated by the
Implementations of :class:`.BackendV2` (and :class:`.BackendV1`) should update their
:meth:`~.BackendV2.run` methods to reject inputs that contain typed
classical variables (see :mod:`qiskit.circuit.classical`) and the :class:`.Store` instruction
if such input is not supported. The new :class:`.Store` instruction is treated by the
transpiler as an always-available "directive" (like :class:`.Barrier`); if your backends do not
support it, this won't be caught by the :mod:`~qiskit.transpiler`.
Expand Down

0 comments on commit b1e08f8

Please sign in to comment.