Skip to content

Commit

Permalink
Added placeholders for a bit flip Lindbladian term
Browse files Browse the repository at this point in the history
  • Loading branch information
haggaila committed May 26, 2024
1 parent e0e2fd1 commit 6a9c864
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 5 deletions.
16 changes: 14 additions & 2 deletions src/Pauli.cc
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,10 @@ ITensor PauliSite::op(const string &opname, const Args &args) const
Op.set(ud_, ud, -1.0);
Op.set(uu_, uu, +1.0);
}
else if (opname == "Sx_Sx")
{
Error("Operator " + opname + " missing implementation.");
}
else if (opname == "_S-S+")
{
Op.set(dd_, uu, 1.0);
Expand Down Expand Up @@ -231,7 +235,7 @@ ITensor PauliSite::op(const string &opname, const Args &args) const
}
else
{
Error("Operator " + opname + " name not recognized");
Error("Operator " + opname + " name not recognized.");
}
return Op;
}
Expand Down Expand Up @@ -603,7 +607,8 @@ Cplx SpinHalfSystem::Expect(const vector <string>& opnames, const vector <int>&
return (re);
}

void SpinHalfSystem::AddSingleSpinBath(double GammaPlus, double GammaMinus, double GammaDephasing, int site)
void SpinHalfSystem::AddSingleSpinBath(double GammaPlus, double GammaMinus, double GammaDephasing,
double GammaBitFlip, int site)
{
if (GammaMinus)
{
Expand All @@ -626,6 +631,13 @@ void SpinHalfSystem::AddSingleSpinBath(double GammaPlus, double GammaMinus, doub
Lindbladian += -z * 0.5, "Id", site;
Lindbladian += -z * 0.5, "Id", site;
}
if (GammaBitFlip)
{
Cplx z = GammaBitFlip * Cplx_i;
Lindbladian += z, "Sx_Sx", site;
Lindbladian += -z * 0.5, "Id", site;
Lindbladian += -z * 0.5, "Id", site;
}
}
//_____________________________________________________

Expand Down
3 changes: 2 additions & 1 deletion src/Pauli.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ class SpinHalfSystem {
AutoMPO Lindbladian;

//Adds a single-spin term to the Lindbladian above
void AddSingleSpinBath(double GammaPlus, double GammaMinus, double GammaDephasing, int site);
void AddSingleSpinBath(double GammaPlus, double GammaMinus, double GammaDephasing,
double GammaBitFlip, int site);

//Trace of rho
complex<double> trace_rho() const;
Expand Down
8 changes: 6 additions & 2 deletions src/lindbladian.h
Original file line number Diff line number Diff line change
Expand Up @@ -164,13 +164,17 @@ bool SetLindbladian(SpinHalfSystem &C, ModelParameters param, Lattice2d L)
if (g_2_len == 1)
g_2 = vector<double>(N, g_2[0]);

g_3 = vector<double>(N, 0.);
// TODO: support parameter input

for (int i = 1; i <= int(N); i++)
if (g_0[i - 1] || g_1[i - 1] || g_2[i - 1])
if (g_0[i - 1] || g_1[i - 1] || g_2[i - 1] || g_3[i - 1])
{
C.AddSingleSpinBath(g_0[i - 1], g_1[i - 1], g_2[i - 1], i);
C.AddSingleSpinBath(g_0[i - 1], g_1[i - 1], g_2[i - 1], g_3[i - 1], i);
// The first argument is the rate of dissipative processes where a spin goes from down to up
// The second argument is the rate of dissipative processes where a spin goes from up to down
// The third argument is the rate of energy-conserving (pure) dephasing processes
// The fourth argument is the rate of bit flip processes
b_time_evolution = true;
}
return b_time_evolution;
Expand Down

0 comments on commit 6a9c864

Please sign in to comment.