Skip to main contentIBM Quantum Documentation
This page is from an old version of Qiskit SDK. Go to the latest version

Parameter

class Parameter(_, uuid=None)

GitHub

Parameter Class for variable parameters.

Create a new ParameterExpression.

Not intended to be called directly, but to be instantiated via operations on other Parameter or ParameterExpression objects.

Parameters

  • symbol_map (dict) – Mapping of Parameter instances to the sympy.Symbol serving as their placeholder in expr.
  • expr (sympy.Expr) – Expression of sympy.Symbols.

Attributes

name

Returns the name of the Parameter.

parameters

Returns a set of the unbound Parameters in the expression.


Methods

__mul__

Parameter.__mul__(other)

bind

Parameter.bind(parameter_values)

Binds the provided set of parameters to their corresponding values.

Parameters

parameter_values (dict) – Mapping of Parameter instances to the numeric value to which they will be bound.

Raises

  • CircuitError

    • If parameter_values contains Parameters outside those in self. - If a non-numeric value is passed in parameter_values.
  • ZeroDivisionError

    • If binding the provided values requires division by zero.

Returns

a new expression parameterized by any parameters

which were not bound by parameter_values.

Return type

ParameterExpression

subs

Parameter.subs(parameter_map)

Substitute self with the corresponding parameter in parameter_map.

Was this page helpful?
Report a bug or request content on GitHub.