f21c42779f76d58a7a120fa0bc51c3545cd4486f,qiskit_aqua/algorithms/adaptive/vqe/vqe.py,VQE,init_params,#VQE#Any#Any#,98

Before Change


        // Set up optimizer
        opt_params = params.get(QuantumAlgorithm.SECTION_KEY_OPTIMIZER)
        optimizer = get_pluggable_class(PluggableType.OPTIMIZER,opt_params["name"])
        optimizer = optimizer()
        optimizer.init_params(opt_params)

        self.init_args(operator, operator_mode, var_form, optimizer,
                       opt_init_point=initial_point, batch_mode=batch_mode,
                       aux_operators=algo_input.aux_ops)
        logger.info(self.print_setting())

    def init_args(self, operator, operator_mode, var_form, optimizer,
                  opt_init_point=None, batch_mode=False, aux_operators=[]):

After Change


        // Set up optimizer
        opt_params = params.get(QuantumAlgorithm.SECTION_KEY_OPTIMIZER)
        optimizer_cls = get_pluggable_class(PluggableType.OPTIMIZER, opt_params["name"])
        optimizer = optimizer_cls.init_params(opt_params)

        return cls(operator, operator_mode, var_form, optimizer,
                   initial_point=initial_point, batch_mode=batch_mode,
                   aux_operators=algo_input.aux_ops)

    @property
    def setting(self):
        Prepare the setting of VQE as a string.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: Qiskit/qiskit-aqua
Commit Name: f21c42779f76d58a7a120fa0bc51c3545cd4486f
Time: 2018-11-19
Author: chenrich@us.ibm.com
File Name: qiskit_aqua/algorithms/adaptive/vqe/vqe.py
Class Name: VQE
Method Name: init_params


Project Name: Qiskit/qiskit-aqua
Commit Name: f21c42779f76d58a7a120fa0bc51c3545cd4486f
Time: 2018-11-19
Author: chenrich@us.ibm.com
File Name: qiskit_aqua/algorithms/adaptive/qsvm/qsvm_variational.py
Class Name: QSVMVariational
Method Name: init_params


Project Name: Qiskit/qiskit-aqua
Commit Name: ef750aa0c262b42247b77361bd1d47806b6dc8ab
Time: 2018-11-20
Author: chenrich@us.ibm.com
File Name: qiskit_aqua/algorithms/adaptive/qaoa/qaoa.py
Class Name: QAOA
Method Name: init_params