qiskit/releasenotes/notes/0.25/flatten-nlocal-family-292b2...

23 lines
883 B
YAML

---
features:
- |
Added a new keyword argument ``flatten`` to the constructor for the
following classes:
* :class:`~.EfficientSU2`
* :class:`~.ExcitationPreserving`
* :class:`~.NLocal`
* :class:`~.RealAmplitudes`
* :class:`~.TwoLocal`
* :class:`~.EvolvedOperatorAnsatz`
* :class:`~.QAOAAnsatz`
If this argument is set to ``True`` the :class:`~.QuantumCircuit` subclass
generated will not wrap the implementation into :class:`~.Gate` or
:class:`~.circuit.Instruction` objects. While this isn't optimal for visualization
it typically results in much better runtime performance, especially with
:meth:`.QuantumCircuit.bind_parameters` and
:meth:`.QuantumCircuit.assign_parameters` which can see a substantial
runtime improvement with a flattened output compared to the nested
wrapped default output.