Archieved interfaces

The following functions are used in the historical versions and might be obsolete in the future versions.

Core

Main.FuzzifiED.ConfsMethod
function Confs(no :: Int64, qnu_s :: Vector{Int64}, qnu_o :: Vector{Vector{Int64}} ; nor :: Int64 = div(no, 2), modul :: Vector{Int64}, num_th :: Int64, disp_std :: Bool) :: Confs

We have improved the interface for this function. Please consider using in the future

Confs(no :: Int64, secd :: Vector{Int64}, qnd :: Vector{QNDiag}) :: Confs

generates the configurations that has the diagonal quantum numbers given by qnu_s of certain conserved quantities specified by qnu_o :: Vector{Vector{Int64}}

\[Q_i=∑_{o=1}^{N_o}q_{io}n_o\]

or

\[Q_i=∑_{o=1}^{N_o}q_{io}n_o\ \mathrm{mod}\ p_i\]

where $i=1,…,N_U$ is the index of quantum number, $o$ is the index of orbital, $n_o=c^†_oc_o$, and $q_o$ is a set of coefficients that must be non negative integer valued. (A list of $q_o$ with both positive and negative entries can be adapted by shifting every elements by a same value)

Arguments

  • no :: Int64 is the number of orbital*flavour $N_o$ ;
  • qnu_s :: Vector{Int64} is the set of $Q_i$ for the selected configurations ;
  • qnu_o :: Vector{Vector{Int64}} is the set of $q_{io}$ for each quantum number and for each orbital. It should contain $N_U$ elements and each element should be a vector of length $N_o$.
  • nor :: Int64 is the number of less significant bits used to generate the Lin table. Facultative, $N_o/2$ by default.
  • modul :: Vector{Int64} is the modulus of each quantum number. Setting it to 1 means there is no modulus. Facultative, all 1 by default.
  • num_th :: Int64, the number of threads. Facultative, NumThreads by default.
  • disp_std :: Bool, whether or not the log shall be displayed. Facultative, !SilentStd by default.

Output

  • cfs :: Confs is a Confs object
source
Main.FuzzifiED.BasisMethod
function Basis(cfs :: Confs, qnz_s :: Vector{ComplexF64} ; cyc :: Vector{Int64}, perm_o :: Vector{Vector{Int64}}, ph_o :: Vector{Vector{Int64}}, fac_o :: Vector{Vector{ComplexF64}} ; num_th :: Int64, disp_std :: Bool) :: Basis

We have improved the interface for this function. Please consider using in the future

Basis(cfs :: Confs, secf :: Vector{ComplexF64}, qnf :: Vector{QNOffd}) :: Basis

generates the basis that respects the off-diagonal $ℤ_n$ quantum numbers (QNZ) from the diagonal QN–preserving configurations. The discrete $ℤ_n$ symmetries are in the form of

\[𝒵:\ c_o↦ α_o^* c^{(p_o)}_{π_o},  c_o^†↦ α_o c^{(1-p_o)}_{π_o}\]

where we use a notation $c^{(1)}=c^†$ and $c^{0}=c$ for convenience, $π_o$ is a permutation of $1,…,N_o$, $α_o$ is a coefficient, and $p_o$ specified whether or not particle-hole transformation is performed for the orbital. Note that one must guarentee that all these transformations commute with each other and also commute with the diagonal QNs.

Arguments

  • cfs :: Confs is the diagonal QN–preserving configurations ;
  • qnz_s :: Vector{ComplexF64} is a vector of length the same as the number of discrete symmetries that records the eigenvalue of each transformation ;
  • cyc :: Vector{Int64} records the cycle of each transformation. For $ℤ_n$ symmetry, record $n$ ;
  • perm_o :: Vector{Vector{Int64}} records the permutation $π_o$. It has $N_Z$ elements and each of its elements is a vector of length $N_o$.
  • ph_o :: Vector{Vector{Int64}} records $p_o$ to determine whether or not to perform a particle-hole transformation. It has $N_Z$ elements and each of its elements is a vector of length $N_o$.
  • fac_o :: Vector{Vector{ComplexF64}} records the factor $α_o$ in the transformation. Each of its elements is a vector of length $N_o$.
  • num_th :: Int64, the number of threads. Facultative, NumThreads by default.
  • disp_std :: Bool, whether or not the log shall be displayed. Facultative, !SilentStd by default.

Output

  • bs :: Basis is the resulting Basis object
source
Main.FuzzifiED.GetEntSpecMethod
function GetEntSpec(st :: Vector{<:Number}, bs0 :: Basis, qnu_s_lst :: Vector{Vector{Vector{Int64}}}, qnz_s_lst :: Vector{Vector{Vector{ComplexF64}}} ; qnu_o :: Vector{Vector{Int64}}, qnu_name :: Vector{String}, modul :: Vector{Int64}, cyc :: Vector{Int64}, perm_o :: Vector{Vector{Int64}}, ph_o :: Vector{Vector{Int64}}, fac_o :: Vector{Vector{ComplexF64}}, amp_oa :: Vector{<:Number}, amp_ob :: Vector{<:Number} = sqrt.(1 .- abs.(amp_oa .^ 2))) :: Dict{@NamedTuple{qnu_sa, qnz_sa, qnu_sb, qnz_sb}, Vector{Float64}}

We have improved the interface for this function. Please consider using in the future

GetEntSpec(st :: Vector{<:Number}, bs0 :: Basis, secd_lst :: Vector{Vector{Vector{Int64}}}, secf_lst :: Vector{Vector{Vector{<:Number}}} ; qnd_a :: Vector{QNDiag} qnf_a :: Vector{QNOffd}, amp_oa :: Vector{<:Number})

Arguments

  • st :: Vector{<:Number} is the state to be decomposed into direct-product basis of two subsystems.
  • bs0 :: Basis is the total basis.
  • qnu_s_lst :: Vector{Vector{Vector{Int64}}} gives the list of QNU sectors of subsystems to be calculated. Each of its elements is a two element vector ; the first specifies the QNUs for subsystem A, and the second specifies the QNU for subsystem B.
  • qnz_s_lst :: Vector{Vector{Vector{ComplexF64}}} gives the list of QNZ sectors of subsystems to be calculated. Each of its elements is a two element vector ; the first specifies the QNZs for subsystem A, and the second specifies the QNZs for subsystem B.
  • qnu_o :: Vector{Vector{Int64}}, qnu_name :: Vector{String} and modul :: Vector{Int64} specifies the diagonal quantum numbers of the subsystems A and B.
  • cyc :: Vector{Int64}, perm_o :: Vector{Vector{Int64}}, ph_o :: Vector{Vector{Int64}} and fac_o :: Vector{Vector{ComplexF64}} specifies the off-diagonal quantum numbers of the subsystems A and B.
  • amp_oa :: Vector{ComplexF64} and amp_ob :: Vector{ComplexF64} are complex lists of length no that specify the amplitute of each orbital in the subsystems A and B. For a non-local basis, we decompose each electron into creation operators in two subsystems $c^†_o=a_{o,A}c^†_{o,A}+a_{o,B}c^†_{o,B}$ and this list specifies $a_{o,A}$. This is equivalent to $√{ℱ_{m,A}}$ in PRB 85, 125308 (2012) with an extra phase factor.

Output

A dictionary whose keys are named tuples that specify the sector containing entries qnu_sa, qnz_sq, qnu_sb, qnz_sb and values are lists of eigenvalues of the density matrix in those sectors.

source

ITensor support

Main.FuzzifiED.TruncateQnuMethod
TruncateQnu(; qnu_o :: Vector{Vector{Int64}}, qnu_name :: Vector{String}, modul :: Vector{Int64}, trunc_lth :: Int64, trunc_wt :: Vector{Int64})

We have improved the interface for this function. Please consider using in the future TruncateQNDiag

TruncateQNDiag(qnd ; trunc_lth, trunc_wt)

truncates the list of $N_U$ QNU's from to a number $N'_U$ acceptable by ITensors. The new quantum numbers are

\[\begin{aligned} &Q'_1=Q_1,\ Q'_2=Q_2,\ …,\ Q'_{N'_U-1}=Q_{N'_U-1}\\ &Q'_{N'_U}=λ_{N'_U}Q_{N'_U}+λ_{N'_U+1}Q_{N'_U+1}+…+λ_{N_U}Q_{N_U} \end{aligned}\]

Arguments

  • qnu_o :: Vector{Vector{Int64}} stores the charge of each orbital under each conserved quantity. See Confs for detail.
  • qnu_name :: Vector{String} stores the name of each quantum number. Facultative, QN1, QN2, ... by default.
  • modul :: Vector{Int64} stores the modulus of each quantum number. Store 1 if no modulus. Facultative, all 1 by default.
  • trunc_lth :: Int64 stores the truncated numbers of QNU. Facultative, 3 by default.
  • trunc_wt :: Vecotr{Int64} stores the $N_U-N'_U+1$ coefficients $λ$. Facultative, $1,2,4,8,…$ by default.

Output

A named tuple with three elements that can be directly fed into SitesFromQnu

  • qnu_o :: Vector{Vector{Int64}} stores the charge of each orbital under each conserved quantity. See Confs for detail.
  • qnu_name :: Vector{String} stores the name of each quantum number.
  • modul :: Vector{Int64} stores the modulus of each quantum number, 1 if no modulus.
source
Main.FuzzifiED.SitesFromQnuMethod
function SitesFromQnu(; qnu_o :: Vector{Vector{Int64}}, qnu_name :: Vector{String}, modul :: Vector{Int64})

We have improved the interface for the function. Please consider using in the future SitesFromQNDiag

SitesFromQNDiag(qnd)

returns the ITensors Sites object from the information of quantum numbers

Arguments

  • qnu_o :: Vector{Vector{Int64}} stores the charge of each orbital under each conserved quantity. See Confs for detail.
  • qnu_name :: Vector{String} stores the name of each quantum number. Facultative, QN1, QN2, ... by default.
  • modul :: Vector{Int64} stores the modulus of each quantum number. Store 1 if no modulus. Facultative, all 1 by default.
source
Main.FuzzifiED.GetMPOSitesMethod
function GetMPOSites(id :: String, tms :: Union{Vector{Term}, Sum{Scaled{ComplexF64, Prod{Op}}}} ; path :: String, qnu_o :: Vector{Vector{Int64}}, qnu_name :: Vector{String}, modul :: Vector{Int64}, mpo_method :: Function) :: Tuple{MPO, Vector{<:Index}}

We have improved the interface for the function. Please consider using in the future

GetMPOSites(id, tms, qnd)

Function

This function returns the MPO and sites for a given operator and a Hilbert space with given quantum numbers. It first checks the file op_$(id).h5 in a specified repository. If the file exists, it will try to read the fields mpo and sites and return the MPO and Sites. Otherwise it will first generates the sites with the quantum numbers given in qnu_o, qnu_name and modul (these objects are often results of a function named Get*Qnu). Then it will generate the MPO with the terms of the operator given in tms. The MPO and sites will be written into the file op_$(id).h5 in the fields mpo and sites.

Arguments

  • id :: String is a string identifying the file to which the results will be accessed and written.
  • tms :: Vector{Term} or tms :: Sum{Scaled{ComplexF64, Prod{Op}}} is either an array of terms or a OpSum objects that specifies the expression of the operator.
  • path :: String identifies the path where the results will be accessed and stored. Facultative, ./ by default.
  • qnu_o :: Vector{Vector{Int64}} is a list where each element specifies a quantum number. Each element is a list that specifies the charges of each orbital under the quantum number. Obligatory.
  • qnu_name :: Vector{String} specifies the name of each quantum number. Facultative, QN1, QN2, ... by default.
  • module :: Vector{Int64} specifies the modulus of each quantum number. Facultative, all 1 by default.
  • mpo_method :: Function is a function mpo_method(os :: OpSum, sites :: Sites) :: MPO that generates the MPO from OpSum and Sites. Facultative, MPO by default. We suggest using MPO_new in ITensorMPOConstruction package. See example_ising_dmrg_easysweep.jl for example.
source

Built-in models

Main.FuzzifiED.GetLzQnuMethod
function GetLzQnu(nm :: Int64, nf :: Int64) :: @NamedTuple{qnu_o :: Vector{Vector{Int64}}, qnu_name :: Vector{String}, modul :: Vector{Int64}}

We have improved the interface for the function. Please consider using in the future the built-in QNDiags

[ GetNeQNDiag(nm * nf), GetLz2QNDiag(nm, nf) ]

returns the diagonal quantum numbers, i.e., particle number $N_e$ and angular momentum $L_z+sN_e$

\[\begin{aligned} N_e&=∑_o n_o\\ L_z+sN_e&=∑_{mf}(m+s)n_o \end{aligned}\]

Arguments

  • nm :: Int64 is the number of orbitals ;
  • nf :: Int64 is the number of flavours ;

Output

A named tuple with three elements that can be directly fed into SitesFromQnu

  • qnu_o :: Vector{Vector{Int64}} stores the charge of each orbital under each conserved quantity. See Confs for detail.
  • qnu_name :: Vector{String} stores the name of each quantum number.
  • modul :: Vector{Int64} stores the modulus of each quantum number, 1 if no modulus.
source
Main.FuzzifiED.GetLzConfsMethod
function GetLzConfs(nm :: Int64, nf :: Int64, ne :: Int64 ; lz :: Float64 ; num_th :: Int64, disp_std :: Bool) :: Confs

We have improved the interface for the function. Please consider using in the future the built-in QNDiags

Confs(nm * nf, [ne, Int(lz * 2), zn], [ 
    GetNeQNDiag(nm * nf), 
    GetLz2QNDiag(nm, nf)
])

Return the configurations with conserved particle number $N_e$ and angular momentum $L_z$.

Arguments

  • nm :: Int64 is the number of orbitals $2s+1$.
  • nf :: Int64 is the number of flavours ;
  • ne :: Int64 is the number of electrons.
  • lz :: Float64 is the angular momentum. Facultative, 0 by default.
  • num_th :: Int64, the number of threads. Facultative, NumThreads by default.
  • disp_std :: Bool, whether or not the log shall be displayed. Facultative, !SilentStd by default.
source
Main.FuzzifiED.GetLzZnQnuMethod
function GetLzZnQnu(nm :: Int64, nf :: Int64) :: @NamedTuple{qnu_o :: Vector{Vector{Int64}}, qnu_name :: Vector{String}, modul :: Vector{Int64}}

We have improved the interface for the function. Please consider using in the future the built-in QNDiags

[ GetNeQNDiag(nm * nf), GetLz2QNDiag(nm, nf), GetZnfChargeQNDiag(nm, nf) ]

returns the diagonal quantum numbers, i.e., particle number $N_e$, angular momentum $L_z+sN_e$ and flavour charge $Z_{N_f}$

\[\begin{aligned} N_e&=∑_o n_o\\ L_z+sN_e&=∑_{mf}(m+s)n_{mf}\\ Z_{N_f}&=∑_{m,f=0}^{N_f-1}fn_{mf}\ \mathrm{mod}\ N_f \end{aligned}\]

Arguments

  • nm :: Int64 is the number of orbitals ;
  • nf :: Int64 is the number of flavours ;

Output

A named tuple with three elements that can be directly fed into SitesFromQnu

  • qnu_o :: Vector{Vector{Int64}} stores the charge of each orbital under each conserved quantity. See Confs for detail.
  • qnu_name :: Vector{String} stores the name of each quantum number.
  • modul :: Vector{Int64} stores the modulus of each quantum number, 1 if no modulus.
source
Main.FuzzifiED.GetLzZnConfsMethod
function GetLzZnConfs(nm :: Int64, nf :: Int64, ne :: Int64 ; lz :: Float64, zn :: Int64 = 0 ; num_th :: Int64, disp_std :: Bool) :: Confs

We have improved the interface for the function. Please consider using in the future the built-in QNDiags

Confs(nm * nf, [ne, Int(lz * 2), zn], [ 
    GetNeQNDiag(nm * nf), 
    GetLz2QNDiag(nm, nf), 
    GetZnfChargeQNDiag(nm, nf) 
])

Return the configurations with conserved particle number $N_e$, angular momentum $L_z$ and flavour charge $Z_{N_f}$.

Arguments

  • nm :: Int64 is the number of orbitals $2s+1$.
  • nf :: Int64 is the number of flavours ;
  • ne :: Int64 is the number of electrons.
  • lz :: Float64 is the angular momentum. Facultative, 0 by default.
  • zn :: Float64 is the flavour charge. Facultative, 0 by default.
  • num_th :: Int64, the number of threads. Facultative, NumThreads by default.
  • disp_std :: Bool, whether or not the log shall be displayed. Facultative, !SilentStd by default.
source
Main.FuzzifiED.GetIsingBasisMethod
function GetIsingBasis(cfs :: Confs ; qn_p :: Int64 = 0, qn_z :: Int64 = 0, qn_r :: Int64 = 0, num_th :: Int64, disp_std :: Bool) :: Basis

We have improved the interface for the function. Please consider using in the future the built-in QNOffds

bs = Basis(cfs, [qn_p, qn_z, qn_r], [
    GetParityQNOffd(nm, 2, [2, 1], [1, -1]), 
    GetFlavPermQNOffd(nm, 2, [2, 1]),
    GetRotyQNOffd(nm, 2)
])

Return the basis with conserved parity $\mathscr{P}$, flavour symmetry $𝒵$ and $π$-rotation along $y$-axis $\mathscr{R}$ from the configurations already generated. Quantum numbers set to zero signify that they are not conserved.

Arguments

  • cfs :: Confs is the configurations generated by GetLzConfs or GetLzZnConfs.
  • qn_p :: Int64 is quantum number for parity transformation. Facultative, 0 by default.
  • qn_z :: Int64 is the particle quantum number for $ℤ_2$-flavour transformation. Facultative, 0 by default.
  • qn_r :: Int64 is the quantum number for $π$ rotation along $y$-axis compared with the ground state. Facultative, 0 by default.
  • num_th :: Int64, the number of threads. Facultative, NumThreads by default.
  • disp_std :: Bool, whether or not the log shall be displayed. Facultative, !SilentStd by default.
source
Main.FuzzifiED.GetSnBasisMethod
function GetSnBasis(cfs :: Confs, nf :: Int64 ; qn_r :: Int64 = 0, perm :: Vector, qn_z :: Vector{<:Number}) :: Basis

We have improved the interface for the function. Please consider using in the future the built-in QNOffds

bs = Basis(cfs, [qn_r, qn_z...], [
    GetRotyQNOffd(nm, nf)
    GetFlavPermQNOffd(nm, nf, [ perm1 ], cyc1),
    GetFlavPermQNOffd(nm, nf, [ perm2 ], cyc2)...
])

Return the basis where the $π$-rotation along $y$-axis $\mathscr{R}$ and certain permutationss of flavour are implemented. Quantum numbers set to zero signify that they are not conserved.

Arguments

  • cfs :: Confs is the configurations generated by GetLzConfs or GetLzZnConfs.
  • nf :: Int64 is the number of flavours
  • qn_r :: Int64 is the quantum number for $π$ rotation along $y$-axis compared with the ground state. Facultative, 0 by default.
  • perm :: Vector{Vector{Int64}} is a list where each element specifies a permutation of flavour indices (from 1 to $N_f$) in the format of a cycle. Facultative, empty by default.
  • qn_z :: Vector{<:Number} is a list where each element specifies the quantum number under the flavour permutation. Facultative, empty by default.
  • num_th :: Int64, the number of threads. Facultative, NumThreads by default.
  • disp_std :: Bool, whether or not the log shall be displayed. Facultative, !SilentStd by default.
source
Main.FuzzifiED.GetIsingIntTermsMethod
function GetIsingIntTerms(nm :: Int64 ; ps_pot :: Vector) :: Vector{Term}

We have improved the interface for the function. Please consider using the function GetDenIntTerms in the future

    GetDenIntTerms(nm, 2 ; ps_pot = 2 .* ps_pot, mat_a = diagm([1, 0]), mat_b = diagm([0, 1]))

Returns the terms for the ising interaction

\[∑_{m_1m_2m_3m_4}2U_{m_1m_2m_3m_4}c^{†}_{m_1\uparrow}c^{†}_{m_2\downarrow}c_{m_3\downarrow}c_{m_4\uparrow}\]

from the pseudopotentials.

Arguments

  • nm :: Int64 is the number of orbitals $2s+1$.
  • ps_pot :: Vector{Number} is the pseudopotential of Ising interaction.
source
Main.FuzzifiED.GetXPolTermsMethod
function GetXPolTerms(nm :: Int64)

We have improved the interface for the function. Please consider using the function GetPolTerms in the future

    GetPolTerms(nm, 2, [ 0 1 ; 1 0 ])

Returns the terms for the density operator $n^x_{l=0,m=0}$

Arguments

  • nm :: Int64 is the number of orbitals.
source
Main.FuzzifiED.GetZPolTermsMethod
function GetZPolTerms(nm :: Int64)

We have improved the interface for the function. Please consider using the function GetPolTerms in the future

    GetPolTerms(nm, 2, [ 1 0 ; 0 -1 ])

Returns the terms for the density operator $n^z_{l=0,m=0}$

Arguments

  • nm :: Int64 is the number of orbitals.
source