mirror of https://github.com/Qiskit/qiskit.git
21 lines
631 B
YAML
21 lines
631 B
YAML
---
|
|
features:
|
|
- |
|
|
Added ``ctrl_state`` parameter to :func:`QuantumCircuit.mcp()` and
|
|
:class:`MCPhaseGate()`.
|
|
|
|
|
|
The :func:`QuantumCircuit.mcp()` function and :class:`MCPhaseGate()` have
|
|
been updated to include a ``ctrl_state`` parameter. This enhancement allows
|
|
users to specify the control state of the multi-controlled phase gate. The
|
|
parameter can accept either a decimal value or a bitstring and defaults to
|
|
controlling the '1' state if not provided.
|
|
|
|
|
|
.. code-block:: python
|
|
|
|
from qiskit import QuantumCircuit
|
|
|
|
qc = QuantumCircuit(4)
|
|
qc.mcp(0.2,[0,1,2],3,ctrl_state=2)
|