qiskit_optimization/converters/inequality_to_equality.py
def interpret(self, x: Union[np.ndarray, List[float]]) -> np.ndarray:
        """Convert a result of a converted problem into that of the original problem.

        Args:
            x: The result of the converted problem or the given result in case of FAILURE.

        Returns:
            The result of the original problem.
        """
        # convert back the optimization result into that of the original problem
        names = [var.name for var in self._dst.variables]

        # interpret slack variables
        sol = {name: x[i] for i, name in enumerate(names)}
        new_x = np.zeros(self._src.get_num_vars())
        for i, var in enumerate(self._src.variables):
            new_x[i] = sol[var.name]
        return new_x
Convert a result of a converted problem into that of the original problem.

        Args:
            x: The result of the converted problem or the given result in case of FAILURE.

        Returns:
            The result of the original problem.
        
Convert a result of a converted problem into that of the original problem.
Convert a result of a converted problem into that of the original problem .
def interpret(self, x: Union[np.ndarray, List[float]]) -> np.ndarray:
        names = [var.name for var in self._dst.variables]
        sol = {name: x[i] for i, name in enumerate(names)}
        new_x = np.zeros(self._src.get_num_vars())
        for i, var in enumerate(self._src.variables):
            new_x[i] = sol[var.name]
        return new_x
def interpret ( self , x : Union [ np . ndarray , List [ float ] ] ) -> np . ndarray : names = [ var . name for var in self . _dst . variables ] sol = { name : x [ i ] for i , name in enumerate ( names ) } new_x = np . zeros ( self . _src . get_num_vars ( ) ) for i , var in enumerate ( self . _src . variables ) : new_x [ i ] = sol [ var . name ] return new_x
Convert a result of a converted problem into that of the original problem.
Convert a result of a converted problem into that of the original problem .
"""Convert a result of a converted problem into that of the original problem.

        Args:
            x: The result of the converted problem or the given result in case of FAILURE.

        Returns:
            The result of the original problem.
        """ # convert back the optimization result into that of the original problem # interpret slack variables
The result of the original problem.
The result of the original problem .
self
x
Union[np.ndarray, List[float]]
The result of the converted problem or the given result in case of FAILURE.
The result of the converted problem or the given result in case of FAILURE .