mirror of https://github.com/Qiskit/qiskit.git
19 lines
649 B
YAML
19 lines
649 B
YAML
---
|
|
features:
|
|
- |
|
|
A new kwarg, ``wrap``, has been added to the
|
|
:meth:`~qiskit.circuit.QuantumCircuit.compose` method of
|
|
:class:`~qiskit.circuit.QuantumCircuit`. This enables choosing whether
|
|
composed circuits should be wrapped into an instruction or not. By
|
|
default this is ``False``, i.e. no wrapping. For example:
|
|
|
|
.. code-block::
|
|
|
|
from qiskit import QuantumCircuit
|
|
circuit = QuantumCircuit(2)
|
|
circuit.h([0, 1])
|
|
other = QuantumCircuit(2)
|
|
other.x([0, 1])
|
|
print(circuit.compose(other, wrap=True)) # wrapped
|
|
print(circuit.compose(other, wrap=False)) # not wrapped
|