b51789878359e051338c91b8f1f0a916a1e6e65b,qiskit/aqua/algorithms/adaptive/vqe_adapt/vqe_adapt.py,VQEAdapt,_run,#VQEAdapt#,119

Before Change


                                                self._var_form_base, self._operator,
                                                self._optimizer)
            // pick maximum gradients and choose that excitation
            max_grad = max(cur_grads, key=lambda item: np.abs(item[0]))
            if prev_max != () and prev_max[1] == max_grad[1]:
                cur_grads_red = [g for g in cur_grads if g[1] != prev_max[1]]
                max_grad = max(cur_grads_red, key=lambda item: np.abs(item[0]))
            if prev_prev_max != () and prev_prev_max[1] == max_grad[1]:

After Change


            and isinstance(self._operator, (WeightedPauliOperator, TPBGroupedWeightedPauliOperator))
        self._quantum_instance.circuit_summary = True

        cycle_regex = re.compile(r"(.+)( \1)+")
        // regex explanation:
        // 1. (.+) will match at least one number and try to match as many as possible
        // 2. the match of this part is placed into capture group 1
        // 3. ( \1)+ will amtch a space followed by the contents of capture group 1
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: Qiskit/qiskit-aqua
Commit Name: b51789878359e051338c91b8f1f0a916a1e6e65b
Time: 2019-09-22
Author: rmax@ethz.ch
File Name: qiskit/aqua/algorithms/adaptive/vqe_adapt/vqe_adapt.py
Class Name: VQEAdapt
Method Name: _run


Project Name: samuelclay/NewsBlur
Commit Name: bd334ef20fdccb74d310ca00b1134388645ba0a5
Time: 2014-07-21
Author: samuel@ofbrooklyn.com
File Name: vendor/readability/encoding.py
Class Name:
Method Name: get_encoding


Project Name: etal/cnvkit
Commit Name: d1a2f9b0cf32711d372352b735354202819a1eaf
Time: 2016-02-09
Author: eric.talevich@gmail.com
File Name: cnvlib/antitarget.py
Class Name:
Method Name: get_background