pyqpanda.Visualization.parameterexpression ========================================== .. py:module:: pyqpanda.Visualization.parameterexpression .. autoapi-nested-parse:: ParameterExpression Class to enable creating simple expressions of Parameters. Classes ------- .. autoapisummary:: pyqpanda.Visualization.parameterexpression.ParameterExpression Module Contents --------------- .. py:class:: ParameterExpression(symbol_map, expr) ParameterExpression class to enable creating expressions of Parameters. .. py:property:: parameters Returns a set of the unbound Parameters in the expression. .. py:method:: bind(parameter_values) Binds the provided set of parameters to their corresponding values. Args: 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: ParameterExpression: a new expression parameterized by any parameters which were not bound by parameter_values. .. py:method:: subs(parameter_map) Returns a new Expression with replacement Parameters. Args: 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: ParameterExpression: a new expression with the specified parameters replaced.