py_alqorithms.apply_symmetrization_system_bath

py_alqorithms.apply_symmetrization_system_bath(algorithm, hamiltonian, number_trottersteps, trotter_timestep, use_bath_as_control, system_bath_physical_definition=None)

Symmetrize a system-bath Hamiltonian.

The input hamiltonian is multiplied from left and right by PauliX on each of the system qubits. The circuit is then generated with this symmetrised hamiltonian, and before we append it to the input circuit we flip the system qubits (which are the symmetrised ones) using PauliX gates.

Parameters:
  • algorithm (string) -- Choice of algorithm

  • hamiltonian (MixedHamiltonian) -- The input mixed hamiltonian

  • number_trottersteps (int) -- The number of times to apply the Hamiltonian, which has been trotterised by the user

  • trotter_timestep (float) -- The time interval over which Hamiltonian is applied

  • use_bath_as_control (bool) -- In the CNOT part of the algorithm, a CNOT gate is applied for the coupling between system and bath. We can choose to use the bath qubit as the control qubit for the CNOT (True) or the system qubit as the control qubit for the CNOT (False).

  • system_bath_physical_defintion (Optional[Union[List[int], List[int], Optional[Dict[int, List[int]]]]]) -- An optional custom specification for system and bath logical_to_physical mappings and device connectivity.

Returns:

symmetrized circuit obtained from the input hamiltonian

Return type:

Circuit

Raises:
  • ValueError -- Error occured in the conversion of SpinAlgorithm

  • RuntimeError -- Error occured in symmetrization of hamiltonian