Source code for qugradlab.systems.skeletons.fermionic._fermionic_system
1"""
2:class:`~qugradlab.systems.skeletons.SkeletalSystem` s of fermions.
3"""
4
5import numpy as np
6
7from . import fermionic_fock_skeleton
8from .. import SkeletalSystem
9from ....hilbert_spaces import fermionic
10
[docs]
11class FermionicSystem(SkeletalSystem):
12 r"""A :class:`qugrad.QuantumSystem` for a system of fermions.
13 The Hamiltonian is constructed in the form:
14 $$
15 H(t) = \sum_{i,j}t_{ij}c_i^\dagger c_j
16 +\sum_{i,j,k,l}U_{ijkl}c_i^\dagger c_j^\dagger c_k c_l
17 +\sum_{m,i,j}a_m(t)h_{mij}c_i^\dagger c_j
18 $$
19 where $c_i^\dagger$ and $c_i$ are the fermionic creation and anhilation
20 operators acting on the $i$th orbital, $t_{ij}$ are the hoppings for the
21 drift Hamiltonian, $U_{ijkl}$ corresponds to the Coulomb integrals for the
22 drift Hamiltonian, $h_{mij}$ corresponds to hoppings for the $m$th control
23 Hamiltonian, and $a_m(t)$ are the time-dependent control amplitdues that
24 modulate the $m$th control Hamiltonian.
25 """
[docs]
26 def __init__(self,
27 hilbert_space: fermionic.FermionSpace,
28 drift_hoppings: np.ndarray[complex],
29 coulomb_integrals: np.ndarray[complex],
30 ctrl_hoppings: np.ndarray[complex],
31 use_graph: bool = True):
32 r"""Creates an instance of a `FermionicSystem`. The Hamiltonian is
33 constructed in the form:
34 $$
35 H(t) = \sum_{i,j}t_{ij}c_i^\dagger c_j
36 +\sum_{i,j,k,l}U_{ijkl}c_i^\dagger c_j^\dagger c_k c_l
37 +\sum_{m,i,j}a_m(t)h_{mij}c_i^\dagger c_j
38 $$
39 where $c_i^\dagger$ and $c_i$ are the fermionic creation and anhilation
40 operators acting on the $i$th orbital, $t_{ij}$ corresponds to
41 `drift_hoppings`, $U_{ijkl}$ corresponds to `coulomb_integrals`,
42 $h_{mij}$ corresponds to `ctrl_hoppings`, and $a_m(t)$ are the
43 time-dependent control amplitdues.
44
45 Parameters
46 ----------
47 hilbert_space : FermionSpace
48 The Hilbert space of the system of fermions
49 drift_hoppings : NDArray[Shape[``hilbert_space.n_single_particle_states``, ``hilbert_space.n_single_particle_states``"], complex]
50 The hopping coefficients for the drift Hamiltonian
51 coulomb_integrals : NDArray[Shape[``hilbert_space.n_single_particle_states``, ``hilbert_space.n_single_particle_states``, ``hilbert_space.n_single_particle_states``, ``hilbert_space.n_single_particle_states``], complex]
52 The Coulomb integrals for the drift Hamiltonian
53 ctrl_hoppings : NDArray[Shape[:attr:`n_ctrl`, ``hilbert_space.n_single_particle_states``, ``hilbert_space.n_single_particle_states``], complex]
54 An array of hopping coefficients for the control Hamiltonians
55 use_graph : bool
56 Whether to use `TensorFlow <https://www.tensorflow.org>`__ graphs
57 during computation, by default ``True``
58 """
59 t = fermionic_fock_skeleton.second_order_tensor(hilbert_space)
60 u = fermionic_fock_skeleton.fourth_order_tensor(hilbert_space)
61 super().__init__(drift_coefficients=[drift_hoppings, coulomb_integrals],
62 drift_skeletons =[t, u],
63 ctrl_coefficients =[ctrl_hoppings],
64 ctrl_skeletons =[t],
65 hilbert_space =hilbert_space,
66 use_graph =use_graph)
67 del u
68 del t