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

Definition

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

The hermitian conjugate of an Op need not necessarily be of type Op as well, since for certain operator types, a numerical prefactor can be introduced (e.g. HopAsym or ExchangeAsym introduce a -1 upon hermitian conjugation, see operator types) which then generically requires representing the object as an OpSum.

Usage Example

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)
auto cdagup = 1.0 * Op("Cdagup", 0);
auto sdots = 1.0 * 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));