ac6b297b39c548db783a3ba7d437517121f93989,qiskit/aqua/components/initial_states/custom.py,Custom,construct_circuit,#Custom#Any#Any#,104
Before Change
// loop over all qubits and add the required registers
for q in register:
if not circuit.has_register(q[0] ):
circuit.add_register(q[0])
else:
// if an actual register is given, add it
After Change
svc.construct_circuit(circuit=circuit, qubits=qubits)
elif self._state == "uniform":
// in case `qubits` is a list of Qubits
if isinstance(qubits, list):
// loop over all qubits and add the required registers
for q in qubits:
if not isinstance(q, Qubit):
raise AquaError("Unexpected element type {} in qubit list.".format(type(q)))
if not circuit.has_register(q.register):
circuit.add_register(q.register)
// otherwise, if it is a QuantumRegister
elif isinstance(qubits, QuantumRegister):
if not circuit.has_register(qubits):
circuit.add_register(qubits)
else:
raise AquaError("Unexpected qubits type {}.".format(type(qubits)))
for i in range(self._num_qubits):
circuit.u2(0.0, np.pi, qubits[i])
elif self._state == "zero":
pass
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 8
Instances Project Name: Qiskit/qiskit-aqua
Commit Name: ac6b297b39c548db783a3ba7d437517121f93989
Time: 2019-06-13
Author: shaohan.hu@ibm.com
File Name: qiskit/aqua/components/initial_states/custom.py
Class Name: Custom
Method Name: construct_circuit
Project Name: Qiskit/qiskit-aqua
Commit Name: ec2185f92eb3794e03e3b4e438befdc81f253cce
Time: 2019-05-21
Author: shaohan.hu@ibm.com
File Name: qiskit/aqua/circuits/gates/relative_phase_toffoli.py
Class Name:
Method Name: rcccx
Project Name: Qiskit/qiskit-aqua
Commit Name: ec2185f92eb3794e03e3b4e438befdc81f253cce
Time: 2019-05-21
Author: shaohan.hu@ibm.com
File Name: qiskit/aqua/circuits/fourier_transform_circuits.py
Class Name: FourierTransformCircuits
Method Name: construct_circuit