f826413f09e5a54ceb58939fc24351bef0fbd2e9,qiskit/optimization/converters/inequality_to_equality.py,InequalityToEquality,interpret,#InequalityToEquality#Any#,342

Before Change


        // convert back the optimization result into that of the original problem
        names = [x.name for x in self._dst.variables]
        vals = result.x
        new_result.x = self._interpret_var(names, vals)  // type: ignore
        return new_result

    def _interpret_var(self, names, vals) -> List[int]:

After Change


        // convert back the optimization result into that of the original problem
        names = [x.name for x in self._dst.variables]
        new_x = self._interpret_var(names, result.x)
        return OptimizationResult(x=new_x, fval=result.fval, variables=self._dst.variables,
                                  raw_results=result.raw_results, status=result.status)

    def _interpret_var(self, names, vals) -> List[int]:
        // interpret slack variables
        sol = {name: vals[i] for i, name in enumerate(names)}
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: Qiskit/qiskit-aqua
Commit Name: f826413f09e5a54ceb58939fc24351bef0fbd2e9
Time: 2020-08-04
Author: 31178928+t-imamichi@users.noreply.github.com
File Name: qiskit/optimization/converters/inequality_to_equality.py
Class Name: InequalityToEquality
Method Name: interpret


Project Name: Qiskit/qiskit-aqua
Commit Name: 6e9a58b20848646f37fcf24179fc29f28cabda3d
Time: 2020-11-25
Author: 31178928+t-imamichi@users.noreply.github.com
File Name: qiskit/optimization/converters/inequality_to_equality.py
Class Name: InequalityToEquality
Method Name: interpret


Project Name: Qiskit/qiskit-aqua
Commit Name: f826413f09e5a54ceb58939fc24351bef0fbd2e9
Time: 2020-08-04
Author: 31178928+t-imamichi@users.noreply.github.com
File Name: qiskit/optimization/converters/integer_to_binary.py
Class Name: IntegerToBinary
Method Name: interpret