-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Labels
type: feature requestNew feature or requestNew feature or request
Description
What should we add?
I sometime want to check sign of parameter value, but this is not currently supported.
from qiskit.circuit import Parameter
import numpy as np
v = Parameter("value")
np.sign(v)
(temporary hack)
from qiskit.circuit import ParameterExpression
import symengine as sym
sign_of_v = ParameterExpression(
symbol_map={v: v._symbol_expr},
expr=sym.sign(v._symbol_expr),
)
It would be great if Qiskit can support this without above ugly hack.
Metadata
Metadata
Assignees
Labels
type: feature requestNew feature or requestNew feature or request