Parameter¶
- class Parameter(name, uuid=None)[source]¶
Bases :
ParameterExpression
Parameter Class for variable parameters.
A parameter is a variable value that is not required to be fixed at circuit definition.
Exemples
Construct a variable-rotation X gate using circuit parameters.
from qiskit.circuit import QuantumCircuit, Parameter # create the parameter phi = Parameter('phi') qc = QuantumCircuit(1) # parameterize the rotation qc.rx(phi, 0) qc.draw('mpl') # bind the parameters after circuit to create a bound circuit bc = qc.bind_parameters({phi: 3.14}) bc.measure_all() bc.draw('mpl')
Create a new named
Parameter
.- Paramètres
name – name of the
Parameter
, used for visual representation. This can be any unicode string, e.g. « ϕ ».
Methods
Arccos of a ParameterExpression
Arcsin of a ParameterExpression
Arctan of a ParameterExpression
Assign one parameter to a value, which can either be numeric or another parameter expression.
Binds the provided set of parameters to their corresponding values.
Return the conjugate.
Cosine of a ParameterExpression
Exponential of a ParameterExpression
Get the derivative of a parameter expression w.r.t.
Return whether the expression is real
Logarithm of a ParameterExpression
Sine of a ParameterExpression
Substitute self with the corresponding parameter in
parameter_map
.Return symbolic expression as a raw Sympy or Symengine object.
Tangent of a ParameterExpression
Attributes
- parameters¶
Returns a set of the unbound Parameters in the expression.