Direct support of different problems¶
In addition to the algebraic rules, more domain specific knowledge can be added
to drudge subclasses for the convenience of working on specific problems. In
these Drudge
subclasses, we have not only the general mathematical
knowledge like commutation rules, but more detailed information about the
problem as well, like some commonly used ranges, dummies.
-
class
drudge.
GenMBDrudge
(*args, exch=-1, op_label='c', orb=((Range('L'), 'abcdefghijklmnopq'), ), spin=(), one_body=t, two_body=u, dbbar=False, **kwargs)[source]¶ Drudge for general many-body problems.
In a general many-body problem, a state for the particle is given by a symbolic orbital quantum numbers for the external degrees of freedom and optionally a concrete spin quantum numbers for the internal states of the particles. Normally, there is just one orbital quantum number and one or no spin quantum number.
In this model, a default Hamiltonian of the model is constructed from a one-body and two-body interaction, both of them are assumed to be spin conserving.
-
op
¶ The vector base for the field operators.
-
cr
¶ The base for the creation operator.
-
an
¶ The base for the annihilation operator.
-
orb_ranges
¶ A list of all the ranges for the orbital quantum number.
-
spin_vals
¶ A list of all the explicit spin values.
-
orig_ham
¶ The original form of the Hamiltonian without any simplification.
-
ham
¶ The simplified form of the Hamiltonian.
-
__init__
(*args, exch=-1, op_label='c', orb=((Range('L'), 'abcdefghijklmnopq'), ), spin=(), one_body=t, two_body=u, dbbar=False, **kwargs)[source]¶ Initialize the drudge object.
Parameters: - exch – The exchange symmetry of the identical particle.
- op_label – The label for the field operators. The creation operator will be
registered in the names archive by name of this label with
_dag
appended. And the annihilation operator will be registered with a single trailing underscore. - orb – An iterable of range and dummies pairs for the orbital quantum
number, which is considered to be over the direct sum of all the
ranges given. All the ranges and dummies will be registered to the
names archive by
Drudge.set_dumms()
. - spin – The values for the explicit spin quantum number.
- one_body – The indexed base for the amplitude in the one-body part of the Hamiltonian. It will also be added to the name archive.
- two_body – The indexed base for the two-body part of the Hamiltonian. It will also be added to the name archive.
- dbbar (bool) – If the two-body part of the Hamiltonian is double-bared.
-
-
class
drudge.
PartHoleDrudge
(*args, op_label='c', part_orb=(Range('V', 0, nv), (a, b, c, d, e, f, g, h, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20, a21, a22, a23, a24, a25, a26, a27, a28, a29, a30, a31, a32, a33, a34, a35, a36, a37, a38, a39, a40, a41, a42, a43, a44, a45, a46, a47, a48, a49)), hole_orb=(Range('O', 0, no), (i, j, k, l, m, n, p, q, i0, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24, i25, i26, i27, i28, i29, i30, i31, i32, i33, i34, i35, i36, i37, i38, i39, i40, i41, i42, i43, i44, i45, i46, i47, i48, i49)), spin=(), one_body=t, two_body=u, fock=f, dbbar=True, **kwargs)[source]¶ Drudge for the particle-hole problems.
This is a shallow subclass of
GenMBDrudge
for the particle-hole problems. It contains different forms of the Hamiltonian.-
orig_ham
¶ The original form of the Hamiltonian, written in terms of bare one-body and two-body interaction tensors without normal-ordering with respect to the Fermion vacuum.
-
full_ham
¶ The full form of the Hamiltonian in terms of the bare interaction tensors, normal-ordered with respect to the Fermi vacuum.
-
ham_energy
¶ The zero energy inside the full Hamiltonian.
-
one_body_ham
¶ The one-body part of the full Hamiltonian, written in terms of the bare interaction tensors.
-
ham
¶ The most frequently used form of the Hamiltonian, written in terms of Fock matrix and the two-body interaction tensor.
-
__init__
(*args, op_label='c', part_orb=(Range('V', 0, nv), (a, b, c, d, e, f, g, h, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20, a21, a22, a23, a24, a25, a26, a27, a28, a29, a30, a31, a32, a33, a34, a35, a36, a37, a38, a39, a40, a41, a42, a43, a44, a45, a46, a47, a48, a49)), hole_orb=(Range('O', 0, no), (i, j, k, l, m, n, p, q, i0, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24, i25, i26, i27, i28, i29, i30, i31, i32, i33, i34, i35, i36, i37, i38, i39, i40, i41, i42, i43, i44, i45, i46, i47, i48, i49)), spin=(), one_body=t, two_body=u, fock=f, dbbar=True, **kwargs)[source]¶ Initialize the particle-hole drudge.
-
op_parser
¶ Get the special operator parser for particle-hole problems.
Here when the first index to the operator is resolved to be a hole state, the creation/annihilation character of the operator will be flipped.
-
eval_fermi_vev
(tensor: drudge.drudge.Tensor)[source]¶ Evaluate expectation value with respect to Fermi vacuum.
This is just an alias to the actual
FockDrudge.eval_phys_vev()
method to avoid confusion about the terminology in particle-hole problems. And it is set as a tensor method by the same name.
-
-
drudge.
UP
¶ The symbol for spin up.
-
drudge.
DOWN
¶ The symbolic value for spin down.
-
class
drudge.
SpinOneHalfGenDrudge
(*args, **kwargs)[source]¶ Drudge for many-body problems of particles with explicit 1/2 spin.
This is just a shallow subclass of the drudge for general many-body problems, with exchange set to fermi and has explicit spin values of
UP
andDOWN
.
-
class
drudge.
SpinOneHalfPartHoleDrudge
(*args, part_orb=(Range('V', 0, nv), (a, b, c, d, e, f, g, h, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20, a21, a22, a23, a24, a25, a26, a27, a28, a29, a30, a31, a32, a33, a34, a35, a36, a37, a38, a39, a40, a41, a42, a43, a44, a45, a46, a47, a48, a49, beta, gamma)), hole_orb=(Range('O', 0, no), (i, j, k, l, m, n, p, q, i0, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24, i25, i26, i27, i28, i29, i30, i31, i32, i33, i34, i35, i36, i37, i38, i39, i40, i41, i42, i43, i44, i45, i46, i47, i48, i49, u, v)), **kwargs)[source]¶ Drudge for the particle-hole problems with explicit one-half spin.
This is a shallow subclass over the general particle-hole drudge without explicit spin. The spin values are given explicitly to be
UP
andDOWN
and the double-bar of the two-body interaction is disabled. And some additional dummies traditional in the field are also added.-
__init__
(*args, part_orb=(Range('V', 0, nv), (a, b, c, d, e, f, g, h, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20, a21, a22, a23, a24, a25, a26, a27, a28, a29, a30, a31, a32, a33, a34, a35, a36, a37, a38, a39, a40, a41, a42, a43, a44, a45, a46, a47, a48, a49, beta, gamma)), hole_orb=(Range('O', 0, no), (i, j, k, l, m, n, p, q, i0, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24, i25, i26, i27, i28, i29, i30, i31, i32, i33, i34, i35, i36, i37, i38, i39, i40, i41, i42, i43, i44, i45, i46, i47, i48, i49, u, v)), **kwargs)[source]¶ Initialize the particle-hole drudge.
-