94af8c77906e893487672e0141bbdc0eee619277,qiskit/aqua/algorithms/adaptive/vqalgorithm.py,VQAlgorithm,get_optimal_vector,#VQAlgorithm#,68

Before Change


        return self._var_form.construct_circuit(self._ret["opt_params"])

    def get_optimal_vector(self):
        if "opt_params" not in self._ret:
            raise AquaError("Cannot find optimal vector before running VQAlgorithm to find optimal params.")
        qc = self.get_optimal_circuit()
        if self._quantum_instance.is_statevector:
            ret = self._quantum_instance.execute(qc)
            self._ret["min_vector"] = ret.get_statevector(qc, decimals=16)
        else:
            c = ClassicalRegister(qc.width(), name="c")
            q = find_regs_by_name(qc, "q")

After Change



    @abstractmethod
    def get_optimal_vector(self):
        raise NotImplementedError()

    def find_minimum(self, initial_point=None, var_form=None, cost_fn=None, optimizer=None):
        Optimize to find the minimum cost value.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 9

Instances


Project Name: Qiskit/qiskit-aqua
Commit Name: 94af8c77906e893487672e0141bbdc0eee619277
Time: 2019-03-07
Author: dongreenberg2@gmail.com
File Name: qiskit/aqua/algorithms/adaptive/vqalgorithm.py
Class Name: VQAlgorithm
Method Name: get_optimal_vector


Project Name: Qiskit/qiskit-aqua
Commit Name: 94af8c77906e893487672e0141bbdc0eee619277
Time: 2019-03-07
Author: dongreenberg2@gmail.com
File Name: qiskit/aqua/algorithms/adaptive/vqalgorithm.py
Class Name: VQAlgorithm
Method Name: get_optimal_vector


Project Name: Qiskit/qiskit-aqua
Commit Name: 94af8c77906e893487672e0141bbdc0eee619277
Time: 2019-03-07
Author: dongreenberg2@gmail.com
File Name: qiskit/aqua/algorithms/adaptive/vqalgorithm.py
Class Name: VQAlgorithm
Method Name: get_optimal_cost


Project Name: Qiskit/qiskit-aqua
Commit Name: 94af8c77906e893487672e0141bbdc0eee619277
Time: 2019-03-07
Author: dongreenberg2@gmail.com
File Name: qiskit/aqua/algorithms/adaptive/vqalgorithm.py
Class Name: VQAlgorithm
Method Name: get_optimal_circuit