![]() |
kdotpy
|
Classes | |
class | MagneticHamiltonian |
class | SymbolicHamiltonian |
class | SymbolicMatrix |
class | SymbolicObject |
Functions | |
polar (z, fmt=None, degfmt=None) | |
reciprocal_energies (em1, em2, el) | |
ismatrix (x) | |
ismatrixlist (x) | |
spmatrix_broadcast (inputmat, opmat) | |
op_eval (op, k, eB) | |
op_eval_ll (op, n, eB) | |
_apply_kp (c, alpha, beta, gamma) | |
_apply_km (c, alpha, beta, gamma) | |
_count_pm (op) | |
opsum_kx_ky_reduce (opsum) | |
kp_km_to_kx_ky (opsum) | |
op_kx_ky_eB (opsum, kx="kx", ky="ky", eB="eB", fmt=None, degfmt=None) | |
opsum_times_opsum (opsum1, opsum2, const=1) | |
op_kshift (op, delta_kp, delta_km) | |
opsum_evaluate (opsum, k, magn) | |
str_to_op (opstr) | |
Variables | |
bool | _op_degree_warning = False |
|
protected |
Apply k- to the term c kx^alpha ky^beta (eB)^gamma. Arguments: c, alpha, beta, gamma Numerical values that encodes the term described above. Returns: List of 4-tuples (ci, alphai, betai, gammai). This encodes a sum of terms as described above.
|
protected |
Apply k+ to the term c kx^alpha ky^beta (eB)^gamma. Arguments: c, alpha, beta, gamma Numerical values that encodes the term described above. Returns: List of 4-tuples (ci, alphai, betai, gammai). This encodes a sum of terms as described above.
|
protected |
Count number of + and number of - in operator.
kdotpy.symbolic.ismatrix | ( | x | ) |
Test if object is a 2d numpy array or a scipy sparse object
kdotpy.symbolic.ismatrixlist | ( | x | ) |
Test is a list represents a matrix. All sublists must be of equal length.
kdotpy.symbolic.kp_km_to_kx_ky | ( | opsum | ) |
Convert operator sum in terms of k+ and k- into kx and ky.
kdotpy.symbolic.op_eval | ( | op, | |
k, | |||
eB ) |
Evaluate an abstract operator product. Take into account nonzero commutator between k+ and k-. Arguments: op String of + and -, where + stands for k+ and - for k-. k Vector instance or 2-tuple. The vector value (kx, ky). For Vector instances, nonzero kz values are ignored. eB Vector or float. Magnetic field in z direction, times e / hbar. Returns: A number (float or complex).
kdotpy.symbolic.op_eval_ll | ( | op, | |
n, | |||
eB ) |
Evaluate an abstract operator product at Landau level n. Only consider terms up to quadratic order. Arguments: op String of + and -, where + stands for k+ and - for k-. n Integer. The LL index. The result is 0 for n < 0. eB Vector or float. Magnetic field in z direction, times e / hbar. Returns: Float.
kdotpy.symbolic.op_kshift | ( | op, | |
delta_kp, | |||
delta_km ) |
Apply shift (k+, k-) --> (k+ + Δa, k- + Δb) to operator
kdotpy.symbolic.op_kx_ky_eB | ( | opsum, | |
kx = "kx", | |||
ky = "ky", | |||
eB = "eB", | |||
fmt = None, | |||
degfmt = None ) |
String formatter for operator sum in terms of kx, ky, and eB Arguments: opsum Operator sum, i.e., dict whose elements are operator strings and whose values are numbers, arrays, matrices, etc. kx String for kx. ky String for ky. eB String for eB (magnetic field times e / hbar). fmt String. Format for a numeric (float) value. Default '%s'. degfmt String. Format for angular value in degrees. Default '%s'. Returns: String.
kdotpy.symbolic.opsum_evaluate | ( | opsum, | |
k, | |||
magn ) |
Evaluate operator sum at momentum and magnetic field. Arguments: opsum Operator sum, i.e., dict whose elements are operator strings and whose values are numbers, arrays, matrices, etc. k Vector instance or 2-tuple. Momentum value. For a Vector instance, the kz component is ignored. magn Vector instance or float. Magnetic field in tesla, not yet multiplied by e / hbar. Only the out-of-plane component is considered. Returns: Number (float or complex), array, matrix, etc. The evaluated operator sum.
kdotpy.symbolic.opsum_kx_ky_reduce | ( | opsum | ) |
Reduce operator sum of kx and ky Returns: kx_ky_eB_sum A dict instance of the form {(alpha, beta, gamma): c, ...}. This dict encodes the sum of terms c kx^alpha ky^beta (eB)^gamma.
kdotpy.symbolic.opsum_times_opsum | ( | opsum1, | |
opsum2, | |||
const = 1 ) |
Calculate the product of two operator sums. Arguments: opsum1 Operator sum, i.e., dict whose elements are operator strings and whose values are numbers, arrays, matrices, etc. opsum2 Operator sum. Note: This product is non-commutative. Returns: opsump Operator sum. The product opsum1 times opsum2.
kdotpy.symbolic.polar | ( | z, | |
fmt = None, | |||
degfmt = None ) |
Format function for displaying complex numbers in polar form. z Complex number. fmt String. Format for a numeric (float) value. Default '%s'. degfmt String. Format for angular value in degrees. Default '%s'. Returns: String.
kdotpy.symbolic.reciprocal_energies | ( | em1, | |
em2, | |||
el ) |
Calculate 1 / (e_1 - e) + 1 / (e_2 - e), iterating over e.
kdotpy.symbolic.spmatrix_broadcast | ( | inputmat, | |
opmat ) |
Multiply the value (matrix M_op) with an operator matrix. 'Broadcast' the operator matrix over the full matrix M_op, which has size (N norbitals) x (N norbitals).
kdotpy.symbolic.str_to_op | ( | opstr | ) |
Get operator string from generic string.
|
protected |