Documentation for ITensorsOpenSystems.AutoMPOHermitianConjugate

ITensorsOpenSystems.AutoMPOHermitianConjugate.hermitianconjFunction
hermitianconj(o::ITensors.Op)
hermitianconj(ops::ITensors.Prod{ITensors.Op})
hermitianconj(term::ITensors.Scaled)
hermitianconj(terms::ITensors.Sum)

Returns the Hermitian conjugate of an operator.

Arguments

  • single operator(autoMPO) or
  • product of operators or
  • scaled operator or
  • sum of operators

Example

julia> H = OpSum()
sum(

)

julia> H += 2, "S+", 1, "Sz",1
sum(
2.0 S+(1,) Sz(1,)
)

julia> H += [1 im; 2 3], 2
sum(
2.0 S+(1,) Sz(1,)
1.0 Complex{Int64}[1 + 0im 0 + 1im; 2 + 0im 3 + 0im](2,)
)

julia> hermconj(H)
sum(
2.0 Sz(1,) S-(1,)
1.0 Complex{Int64}[1 + 0im 2 + 0im; 0 - 1im 3 + 0im](2,)
)

see also: register_conjugate

source
ITensorsOpenSystems.AutoMPOHermitianConjugate.register_conjugateFunction
register_conjugate(op::AbstractString;quiet=false)
register_conjugate(op::AbstractString,::Nothing;quiet=false)
register_conjugate(op1::AbstractString,op2::AbstractString; kwargs...)

registers an the name of an op allowing hermconj to take its conjugate. If one argument is given the op is assumed to be Hermitian. If two strings are given, both are registered as conjgates of each other. If the symmetric keyword is set to false only the the first argument is registered, with the second argment as its conjugate.

An arbitrary function can be applied particular parameters when taking the conjugate. This is passed via the parameter_transforms keyword, which expects a dictionary mapping symbols (the parameters to be modified) to the funcitons to apply. Different funcitons can be applied to the arguments of each element of a conjugate pair by passing the parameter_transforms1 and parameter_transforms2 keywords.

A function can also be applied to the entire operator before it is returned allowing for complete control of the returned conjugate. This is passed via the op_transform keyword. Seperate functions can be passed for each operator in a pair via the op_transform1 and op_transform2 keywords.

If nothing is given as an argument then it registered as not being able to take its hermitian conjugate.

If an op has previously been registered it will be overwriten but a warning will be raised. The warning can be supressed by passing the quiet keyword.

Example

julia> H = Op("Macbeth",1)
"Macbeth"(1,)

julia> hermitianconj(H)
ERROR: NotInSymbolicSetError "The hermitian conjugate of "Macbeth"(1,) is not in the set of symbolically defined ops"
Stacktrace:
    [1] top-level scope
    @ REPL[5]:1

julia> register_conjugate("Macbeth","MacbethDag")

julia> hermitianconj(H)
"MacbethDag"(1,)

see also: hermitianconj

source