c7042ae38552e58476c048237cd80d3fe087cdd7,qiskit/aqua/utils/entangler_map.py,,validate_entangler_map,#Any#Any#Any#,41
Before Change
if not isinstance(v, list):
raise TypeError("Entangle index list expected but got {}".format(type(v)))
ret_map = {}
for k, v in entangler_map.items():
ret_map[int(k)] = [int(x) for x in v]
for k, v in ret_map.items():
if k < 0 or k >= num_qubits:
raise ValueError("Qubit value {} invalid for {} qubits".format(k, num_qubits))
for i in v:
After Change
raise ValueError("Qubit entangle source value {} invalid for {} qubits".format(src, num_qubits))
if targ < 0 or targ >= num_qubits:
raise ValueError("Qubit entangle target value {} invalid for {} qubits".format(targ, num_qubits))
if not allow_double_entanglement and [targ, src] in ret_map:
raise ValueError("Qubit {} and {} cross-entangled.".format(src, targ))
return ret_map
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 9
Instances Project Name: Qiskit/qiskit-aqua
Commit Name: c7042ae38552e58476c048237cd80d3fe087cdd7
Time: 2019-02-13
Author: chenrich@us.ibm.com
File Name: qiskit/aqua/utils/entangler_map.py
Class Name:
Method Name: validate_entangler_map
Project Name: Qiskit/qiskit-aqua
Commit Name: c7042ae38552e58476c048237cd80d3fe087cdd7
Time: 2019-02-13
Author: chenrich@us.ibm.com
File Name: qiskit/aqua/utils/entangler_map.py
Class Name:
Method Name: validate_entangler_map
Project Name: dmlc/dgl
Commit Name: 18a26fcfb1983af7fba69db9bdce7ba5e6a9945f
Time: 2020-06-29
Author: VoVAllen@users.noreply.github.com
File Name: python/dgl/data/graph_serialize.py
Class Name:
Method Name: load_labels
Project Name: dmlc/dgl
Commit Name: 18a26fcfb1983af7fba69db9bdce7ba5e6a9945f
Time: 2020-06-29
Author: VoVAllen@users.noreply.github.com
File Name: python/dgl/data/graph_serialize.py
Class Name:
Method Name: load_graphs