Documentation for ITensorsOpenSystems._VectorizationCore

ITensorsOpenSystems._VectorizationCore.build_vectorized_spaceFunction

Builds the vectorized space for a given site type.

Arguments

  • basespace_name::String: the name of the base space to vectorize
  • operators::Vector{String}: A vector of operators
  • conserve_qns::Bool: Should quantum numbers be conserved
  • conserve_qns_options::String: If we are to conserve quantum numbers, how to do so, valid options are "difference" or "independent"
  • additional_parameters::Union{Nothing,Vector{Pair{Symbol,<:Function}}}: Used to vectorize spaces with variable dimension. Expects a list of pairs of keywords and functions which take in a vectorized index and return the value of the keyword used to create them

Examples

julia> build_vectorized_space("S=1/2")

julia> siteind("S=1/2Vec")
(dim=4|id=145|"S=1/2Vec,Site")
source
ITensorsOpenSystems._VectorizationCore.leftrightapplyFunction
leftrightapply(leftop,rightop)

Takes a pair of autoMPO objects on the unvectorized space and constructs the autoMPO object on the vectorized space corresponding to left multiplying the density matrix by leftop and right multiplying it by rightop

Example

julia> leftop, rightop = OpSum(),OpSum()
julia>leftop += "σx", 1
julia>rightop += "σz", 1

julia>leftrightapply(leftop,rightop)
sum(
    1.0, "σzᵀ⊗σx", 1
)

see also: leftapply, rightapply, commutatorapply, commutator, lindbladdissipator, dissipator

source
ITensorsOpenSystems._VectorizationCore.vectorizerFunction
vectorizer(_dumby;kwargs...)
vectorizer(space::String;kwargs...)

Returns the vectorization tensor, which maps a pair of site indices in the vectorized space (with oposite directions), to a single index in the vectorized space.

It is recomended to always use this when combining or separating site indices to esure that a consitent convention for how the different indices correspond is maintained

If the space has conserved quantum numbers the index can be returned with or without them using the conserve_qns keyword.

For spaces with variable dimension, additional keywords can be provided to spesify the dimension of the index returned. In these cases the sample_idx keyword can also used. This expects a vectorized index and adds the keywords used to create that index to the ones passed directly to the function

Example

# We create some local site indices and some corrisponding
# vectoprized indices
s = siteinds("S=1/2", 2)
sv = siteinds("S=1/2Vec",2)

# We create a tensor using those local indices
t = op("Sz", s[1])

# We set the indices on t to match those of the vectorization
# tensor
t *= delta(vectorizer_input("S=1/2"),s[1])
t *= delta(vectorizer_input("S=1/2")', s[1]')

# We combine the indices on t into a single 
# vecotorized index
t *= vectorizer("S=1/2")

# We set the single index on t to be one of
# our previously created vectorized indices
t *= delta(vectorizer_output("s=1/2"),sv[1])

see also: vectorizer_input, vectorizer_output

source
ITensorsOpenSystems._VectorizationCore.vectorizer_inputFunction
vectorizer_input(_dumby;kwargs...)
vectorizer_input(space::String;kwargs...)

Returns the input (unvectorized) indices of the vectorization tensor. The vectorization tensor has two copies of this index, one primed (directed in if there are conserved quantum numbers) corresponding to the left hand index of the unvectorized density matrix and one unprimed (directed out if there are conserved quantum numbers) corresponding to the right hand index of the unvectorized desnity matrix.

If the space has conserved quantum numbers the index can be returned with or without them using the conserve_qns keyword.

For spaces with variable dimension, additional keywords can be provided to spesify the dimension of the index returned. In these cases the sample_idx keyword can also used. This expects a vectorized index and adds the keywords used to create that index to the ones passed directly to the function

Example

# We create some local site indices and some corrisponding
# vectoprized indices
s = siteinds("S=1/2", 2)
sv = siteinds("S=1/2Vec",2)

# We create a tensor using those local indices
t = op("Sz", s[1])

# We set the indices on t to match those of the vectorization
# tensor
t *= delta(vectorizer_input("S=1/2"),s[1])
t *= delta(vectorizer_input("S=1/2")', s[1]')

# We combine the indices on t into a single 
# vecotorized index
t *= vectorizer("S=1/2")

# We set the single index on t to be one of
# our previously created vectorized indices
t *= delta(vectorizer_output("s=1/2"),sv[1])

see also: vectorizer, vectorizer_output

source
ITensorsOpenSystems._VectorizationCore.vectorizer_outputFunction
vectorizer_output(_dumby;kwargs...)
vectorizer_output(space::String;kwargs...)

Returns the output (vectorized) indices of the vectorization tensor. The vectorization tensor has one unprimed (outfacing if quantum numbers are conserved) copy of this index, corresponding to the vectorized index.

If the space has conserved quantum numbers the index can be returned with or without them using the conserve_qns keyword.

For spaces with variable dimension, additional keywords can be provided to spesify the dimension of the index returned. In these cases the sample_idx keyword can also used. This expects a vectorized index and adds the keywords used to create that index to the ones passed directly to the function

Example

# We create some local site indices and some corrisponding
# vectoprized indices
s = siteinds("S=1/2", 2)
sv = siteinds("S=1/2Vec",2)

# We create a tensor using those local indices
t = op("Sz", s[1])

# We set the indices on t to match those of the vectorization
# tensor
t *= delta(vectorizer_input("S=1/2"),s[1])
t *= delta(vectorizer_input("S=1/2")', s[1]')

# We combine the indices on t into a single 
# vecotorized index
t *= vectorizer("S=1/2")

# We set the single index on t to be one of
# our previously created vectorized indices
t *= delta(vectorizer_output("s=1/2"),sv[1])

see also: vectorizer_input, vectorizer

source