831be1dc40528bf85d45995a9ba0acaf25c0c1aa,test/test_qsvm_variational.py,TestQSVMVariational,test_qsvm_variational_directly,#TestQSVMVariational#,64

Before Change



    def test_qsvm_variational_directly(self):
        np.random.seed(self.random_seed)
        svm = get_algorithm_instance("QSVM.Variational")
        svm.random_seed = self.random_seed
        svm.setup_quantum_backend(backend="qasm_simulator", shots=1024)

        optimizer = get_optimizer_instance("SPSA")

After Change



    def test_qsvm_variational_directly(self):
        np.random.seed(self.random_seed)
        svm = get_pluggable_instance(PluggableType.ALGORITHM,"QSVM.Variational")
        svm.random_seed = self.random_seed
        svm.setup_quantum_backend(backend="qasm_simulator", shots=1024)

        optimizer = get_pluggable_instance(PluggableType.OPTIMIZER,"SPSA")
        optimizer.init_args(max_trials=10, c0=4.0, skip_calibration=True)
        optimizer.set_options(save_steps=1)
        num_qubits = 2

        feature_map = get_pluggable_instance(PluggableType.FEATURE_MAP,"SecondOrderExpansion")
        feature_map.init_args(num_qubits=num_qubits, depth=2)

        var_form = get_pluggable_instance(PluggableType.VARIATIONAL_FORM,"RYRZ")
        var_form.init_args(num_qubits=num_qubits, depth=3)

        svm.init_args(self.training_data, self.testing_data, None, optimizer, feature_map, var_form)
        result = svm.run()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 10

Instances


Project Name: Qiskit/qiskit-aqua
Commit Name: 831be1dc40528bf85d45995a9ba0acaf25c0c1aa
Time: 2018-11-19
Author: manoel@us.ibm.com
File Name: test/test_qsvm_variational.py
Class Name: TestQSVMVariational
Method Name: test_qsvm_variational_directly


Project Name: Qiskit/qiskit-aqua
Commit Name: 831be1dc40528bf85d45995a9ba0acaf25c0c1aa
Time: 2018-11-19
Author: manoel@us.ibm.com
File Name: test/test_vqe2iqpe.py
Class Name: TestVQE2IQPE
Method Name: test_vqe_2_iqpe


Project Name: Qiskit/qiskit-aqua
Commit Name: 831be1dc40528bf85d45995a9ba0acaf25c0c1aa
Time: 2018-11-19
Author: manoel@us.ibm.com
File Name: test/test_qsvm_variational.py
Class Name: TestQSVMVariational
Method Name: test_qsvm_variational_directly


Project Name: Qiskit/qiskit-aqua
Commit Name: 831be1dc40528bf85d45995a9ba0acaf25c0c1aa
Time: 2018-11-19
Author: manoel@us.ibm.com
File Name: test/test_vqe.py
Class Name: TestVQE
Method Name: test_vqe_direct