Internals
Index of Commands
ED_sectors.ABSTRACT_OPED_sectors.BASISED_sectors.BASISVECTORED_sectors.CONJCLASSED_sectors.EIGSYSED_sectors.ORBITED_sectors.SOPED_sectors.TERMED_sectors.TERM_INTERNALED_sectors.VECBase.:*Base.:*Base.:*Base.:+Base.:+ED_sectors.OperatorED_sectors.apply_S_minusED_sectors.apply_S_plusED_sectors.apply_S_xED_sectors.apply_S_yED_sectors.apply_S_zED_sectors.apply_operatorsED_sectors.autocorrelationED_sectors.check_same_basis_debugED_sectors.construct_matrix_fermion_bilinersED_sectors.construct_matrix_fullED_sectors.construct_matrix_symED_sectors.display_statesED_sectors.entanglement_entropyED_sectors.evolve_stateED_sectors.expectationED_sectors.expectation_timeED_sectors.export_dataED_sectors.get_pauli_matrixED_sectors.get_valid_state_functionED_sectors.ground_stateED_sectors.is_Null_VECED_sectors.k_eigsysED_sectors.k_eigvalsED_sectors.make_Inversion_functionED_sectors.make_Z2A_functionED_sectors.make_Z2B_functionED_sectors.make_basisED_sectors.make_easy_orbit_functionED_sectors.make_filenameED_sectors.make_spin_flip_functionED_sectors.make_translation_functionED_sectors.measure_EEED_sectors.measure_N_upED_sectors.measure_N_up_AED_sectors.measure_N_up_BED_sectors.parse_TERM_to_internalED_sectors.parse_termED_sectors.r_statisticED_sectors.reduce_density_matrixED_sectors.thermal_density_matrixED_sectors.timeseriesED_sectors.timeseriesED_sectors.timeseries2
abstract_operators.jl
ED_sectors.SOP — Type.SOP(name,site)A struct for storing a single-site operator. This is an internal method which users shouldn't have to access.
ED_sectors.TERM_INTERNAL — Type.TERM_INTERNAL(prefactor, operator)The internal representation of a term as a (generically complex) prefactor and an array of single-single operators called operator.
Base.:* — Method.*(x,TERM_INTERNAL)
x*TERMDefined scalar multiplication of TERM's: the scalar acts on the prefactor.
ED_sectors.parse_TERM_to_internal — Method.parse_term(op, term)Internal function to parse a TERM into an array of TERM_INTERNALs so they can be added onto an operator.
ED_sectors.parse_term — Method.parse_term(op, term)Internal function to parse the operators given in the TERM constructor into a Dictionary.
basis.jl
ED_sectors.BASISVECTOR — Type.BASISVECTOR(conj_class, phase_factor)A struct that links a basis vector to its conjugacy class `conjclass' and gives the phase factor 'phasefactor' between them due to the representation.
ED_sectors.CONJCLASS — Type.CONJCLASS(index,norm)A struct that describes the conjugacy class of a basis element. With symmetries, each conjugacy class is associated to a basis vector. The index is the index of the associated basis vector and the norm is the norm squared of that conjugacy class, so it can be properly normalized.
ED_sectors.ORBIT — Type.ORBIT(norm, representative, elements)A struct which stores the orbit of a single element under an Abelian group action.
ED_sectors.check_same_basis_debug — Method.check_same_basis_debug(basis1,basis2)Checks if two bases are the same. UNTESTED! Use for debugging only.
ED_sectors.get_valid_state_function — Method.get_valid_state_function(L, unitCellSize,, symmetries)Returns a function states -> Bool that determines if a state is valid, i.e. satisfies the constraint imposed by the symmetry sector.
Arguments
- 'L :: Int': length of the chain
- 'unitCellSize:: Int' - size of the unit cell, must divide L
- 'symmetries :: Dict{String,Int}': a dictionary of the symmetries and their sectors, e.g ["Sz"=> 2,"K"=>2]
ED_sectors.make_Inversion_function — Method.make_Inversion_function(L,Inv,a)Returns a function which computes the inversion (flip in the x-direction) of a state #Arguments
- 'L :: Int': the number of sites
- 'Inv :: Int': the Inversion sector, in {-1,1}
- 'a :: Int': the size of the unit cell, must divide L
ED_sectors.make_Z2A_function — Method.make_Z2A_function(L,Z2A)Returns a function which computes a version of a state flipped on the B sublattice. This only makes sense when unitCellSize = 2, of course. #Arguments
- 'L :: Int': the number of sites
- 'Z2A :: Int': the Z2A sector, in {-1,1}
ED_sectors.make_Z2B_function — Method.make_Z2B_function(L,Z2B)Returns a function which computes a version of a state flipped on the B sublattice. This only makes sense when unitCellSize = 2, of course. #Arguments
- 'L :: Int': the number of sites
- 'Z2B :: Int': the Z2B sector, in {-1,1}
ED_sectors.make_basis — Method.make_basis(L; [unitCellSize=a, syms=Symmetries_Dict, constraint=constraint_function])Internal function to produce a basis from its size, constraints, and symmetry information.
Arguments
- 'L :: Int': the number of sites
- 'unitCellSize :: Int': the number of sites per unit cell
- 'syms :: Dict{String,Int}': a dictionary of symmetries with their sector names, e.g. the translation sector 3 is "K" => 3
- 'constraint :: Function': a function (state, L) -> bool to determine if a given state satisfies a constraint
ED_sectors.make_easy_orbit_function — Method.make_easy_orbit_function(L,unitCellSize,symmetries)Given the symmetry information, returns a function which computes the orbit of an individual element. Works for valid basis elements only.
Arguments
- 'L :: Int': length of the chain
- 'unitCellSize:: Int' - size of the unit cell, must divide L
- 'symmetries :: Dict{String,Int}': a dictionary of the symmetries and their sectors, e.g ["Sz"=> 2,"K"=>2]
ED_sectors.make_spin_flip_function — Method.make_spin_flip_function(L,Z2)Returns a function which computes the spin flip of a state #Arguments
- 'L :: Int': the number of sites
- 'Z2 :: Int': the Z2 sector, in {-1,1}
ED_sectors.make_translation_function — Method.make_translation_function(L,a,K)Returns a function which, given a state x and phase factor pf, gives the translated state T.x and new phase factor.
#Arguments
- 'L :: Int': the number of sites
- 'a :: Int': the number of sites per unit cell, must divide L
- 'K :: Int': the translation symmetry sector, 0 <= K <= L
ED_sectors.measure_N_up — Method.measure_N_up(s, L)Measures the number of spin up's for a state 's' for 'L' spins. Returns the Sz sector of s, i.e. the number of spin's up.
ED_sectors.measure_N_up_A — Method.measure_N_up_A(s, L)Measures the number of spin up's for a state 's' for 'L' spins in the A sector, for an ABABAB sublattice structure. Returns the SzA sector of s.
ED_sectors.measure_N_up_B — Method.measure_N_up_B(s, L)Measures the number of spin up's for a state 's' for 'L' spins in the B sector, for an ABABAB sublattice structure. Returns the SzB sector of s.
matrix_constructors.jl
ED_sectors.VEC — Type.VEC(factor,state)A type for storing a prefactor * basis_state.
ED_sectors.apply_S_minus — Method.apply_S_minus(v,i)#Arguments *'v: VEC': a basis vector VEC(prefactor, state) *'i: Int': the index of the spin to apply the operator to, 0 <= i <= L
Given a basis vector |v>, return S_i^- |v>, which is another basis vector.
ED_sectors.apply_S_plus — Method.apply_S_plus(v,i)Given a basis vector |v>, return S_i^+ |v>, which is another basis vector.
Arguments
- 'v: VEC': a basis vector VEC(prefactor, state)
- 'i: Int': the index of the spin to apply the operator to, 0 <= i <= L
ED_sectors.apply_S_x — Method.apply_S_x(v,i)Given a basis vector |v>, return S_i^x |v>, which is another basis vector.
Arguments
- 'v: VEC': a basis vector VEC(prefactor, state)
- 'i: Int': the index of the spin to apply the operator to, 0 <= i <= L
ED_sectors.apply_S_y — Method.apply_S_y(v,i)Given a basis vector |v>, return S_i^y |v>, which is another basis vector.
Arguments
- 'v: VEC': a basis vector VEC(prefactor, state)
- 'i: Int': the index of the spin to apply the operator to, 0 <= i <= L
ED_sectors.apply_S_z — Method.apply_S_z(v,i)Arguments
- 'v: VEC': a basis vector VEC(prefactor, state)
- 'i: Int': the index of the spin to apply the operator to, 0 <= i <= L
Given a basis vector |v>, return S_i^z |v>, which is another basis vector.
ED_sectors.apply_operators — Method.apply_operators(v,t)Given a basis vector |v> and a term (i.e. operator) t, returns t | v>. For spin-1/2 with the X,Y,Z,+,- operators, the return vector is always another basis vector, rather than superposition thereof, which simplifies things.
Arguments
- 'v::VEC': a vector VEC(prefactor,basis vector) to apply the term to
- 't::TERM_INTERNAL': a single term from a Hamiltonian to apply
construct_matrix_fermion_biliners(basis, abstract_op)Makes a Hamiltonian from fermion bilinears. Only work for number-conserving Hamiltonians
Argument s
- 'basis :: Basis': the basis for the spin chain
- 'abstract_op :: HAMILTONIAN': the abstract operator to implement
ED_sectors.construct_matrix_full — Method.construct_matrix_full(basis, abstract_op)An internal method to quickly make an operator for the full basis with no symmetry constraints.
ED_sectors.construct_matrix_sym — Method.construct_matrix_sym(basis, abstract_op)Internal function to construct a Hamiltonian with symmetries.
ED_sectors.get_pauli_matrix — Method.Returns the correct Pauli matrix for the name. Really this should a hardcoded dictionary, but its essentially the same and there's not that many of them.
ED_sectors.is_Null_VEC — Method.is_Null_VEC(vec)Tests if 'vec' is the zero vector to numerical precision. Mostly used for internal testing.
measurement.jl
ED_sectors.ground_state — Method.ground_state(H)Returns a tuple (E0, psi0) of the ground state energy and wavefunction.
dynamics.jl
ED_sectors.timeseries — Method.Function to compute a two-point function Tr[rho O(t)O(0)] at a list of times {t1,t2,...}.
ED_sectors.timeseries — Method.Function to compute a two-point function <psi|O(t)O(0)|psi> at a list of times {t1,t2,...}. Since we're doing the same operator at each time, we can optimize this a bit.
ED_sectors.timeseries2 — Function.Function to compute a two-point function <psi|O(t)O(0)|psi> for an eigenstate |psi> at a list of times {t1,t2,...}. Since we're doing the same operator at each time, we can optimize this a bit.
utilities.jl
ED_sectors.display_states — Method.Pretty printing for spin-1/2 states. #Arguments
- 'psi :: Array{UInt64}': states to display