qiskit/releasenotes/notes/0.25/add-abs-to-parameterexpress...

15 lines
377 B
YAML

issues:
- |
Added support for taking absolute values of :class:`.ParameterExpression`\s. For example,
the following is now possible::
from qiskit.circuit import QuantumCircuit, Parameter
x = Parameter("x")
circuit = QuantumCircuit(1)
circuit.rx(abs(x), 0)
bound = circuit.bind_parameters({x: -1})