ParameterExpression.subs

ParameterExpression.subs(parameter_map)[source]

Returns a new Expression with replacement Parameters.

Parameters

parameter_map (dict) – Mapping from Parameters in self to the Parameter instances with which they should be replaced.

Raises

CircuitError

  • If parameter_map contains Parameters outside those in self. - If the replacement Parameters in parameter_map would result in a name conflict in the generated expression.

Returns

a new expression with the specified parameters

replaced.

Return type

ParameterExpression