Skip to content

hc

Returns the hermitian conjugate \(\mathcal{O}^\dagger\) of an operator \(\mathcal{O}\) represented by an Op or OpSum object. Please note the details when conjugating complex couplings, outlined in OpSum # Complex couplings.

Sources
hc.hpp
hc.cpp
hc.jl


Definition

Op hc(Op const &op)
OpSum hc(OpSum const &ops)
hc(op::OpSum)::Op
hc(ops::OpSum)::OpSum

Usage Example

auto cdagup = Op("Cdagup", 0);
auto sdots = Op("SdotS", {0, 1});
auto hop = (1.0 + 1.0i) * Op("Hop", {0, 1});
XDIAG_SHOW(cdagup == hc(cdagup));
XDIAG_SHOW(sdots == hc(sdots));
XDIAG_SHOW(hop == hc(hop));
cdagup = Op("Cdagup", 1)
sdots = Op("SdotS", [1, 2])
hop = (1.0 + 1.0im) * Op("Hop", [1, 2])
@show cdagup == hc(cdagup)
@show sdots == hc(sdots)
@show hop == hc(hop)