6b2a79fd202567f1869518efe8b4b68b9d3a3bbf,qiskit/aqua/translators/ising/exact_cover.py,,random_number_list,#Any#Any#Any#,27
Before Change
Returns:
numpy.ndarray: the list of integer numbers.
number_list = np.random.randint(low=1, high=(weight_range+1), size=n)
if savefile:
with open(savefile, "w") as outfile:
for i in range(n):
outfile.write("{}\n".format(number_list[i]))
return number_list
def get_exact_cover_qubitops(list_of_subsets):
Construct the Hamiltonian for the exact solver problem.
After Change
def random_number_list(n, weight_range=100, savefile=None):
from .common import random_number_list as redirect_func
warnings.warn("random_number_list function has been moved to "
"qiskit.aqua.translators.ising.common, "
"the method here will be removed after Aqua 0.7+",
DeprecationWarning)
return redirect_func(n=n, weight_range=weight_range, savefile=savefile)
def read_numbers_from_file(filename):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 16
Instances
Project Name: Qiskit/qiskit-aqua
Commit Name: 6b2a79fd202567f1869518efe8b4b68b9d3a3bbf
Time: 2019-08-26
Author: chenrich@us.ibm.com
File Name: qiskit/aqua/translators/ising/exact_cover.py
Class Name:
Method Name: random_number_list
Project Name: Qiskit/qiskit-aqua
Commit Name: 6b2a79fd202567f1869518efe8b4b68b9d3a3bbf
Time: 2019-08-26
Author: chenrich@us.ibm.com
File Name: qiskit/aqua/translators/ising/partition.py
Class Name:
Method Name: random_number_list
Project Name: Qiskit/qiskit-aqua
Commit Name: 6b2a79fd202567f1869518efe8b4b68b9d3a3bbf
Time: 2019-08-26
Author: chenrich@us.ibm.com
File Name: qiskit/aqua/translators/ising/set_packing.py
Class Name:
Method Name: random_number_list