Getting trotterized exponential of a Hamiltonian #227
-
Hello,
As an exmaple, I use the molecule below.
The problem is that it is not obvious to me how to go from step 1 to step 2. Step 3 is also very non-obvious. P.S. note that the resulting circuit will have multi-gates like |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @einarG-1qbit! Thanks for your question: here is a more in-depth explanation (than yesterday's answer in slack):
from tangelo.toolboxes.qubit_mappings.mapping_transform import fermion_to_qubit_mapping
...
qH = fermion_to_qubit_mapping(mol_H2.fermionic_hamiltonian, "JW", mol_H2.n_active_sos, mol_H2.n_active_electrons, up_then_down=True) After, it is indeed the function from tangelo.toolboxes.ansatz_generator.ansatz_utils import get_exponentiated_qubit_operator_circuit
exp_circ = get_exponentiated_qubit_operator_circuit(qH, time=1., trotter_order=1)
|
Beta Was this translation helpful? Give feedback.
Hi @einarG-1qbit! Thanks for your question: here is a more in-depth explanation (than yesterday's answer in slack):
This can be done with the
fermion_to_qubit_mapping
function (here an example where we want the JW mapping with the spin-up then spin-down orbital ordering).