py_alqorithms.create_hadamard_test_circuit
- py_alqorithms.create_hadamard_test_circuit(circuit, nb_trottersteps_i, nb_trottersteps_j, config=None)
Creates the Hadamard test circuit for a circuit.
- Parameters:
circuit (Circuit) -- The Circuit.
number_trottersteps_i (int) -- The number of trotter steps for the i circuit.
number_trottersteps_j (int) -- The number of trotter steps for the j circuit.
config (Optional[str]) -- Beginning to have the control qubit at the beginning of the circuit or End to have the control qubit at the end of the circuit. Beginning by default.
- Returns:
The Hadamard test circuit corresponding the the program's constant_circuit.
- Return type:
Circuit
- Raises:
PyValueError -- If the constant_circuit contains operations that cannot be controlled or if the config is not Beginning or End.