Physical operator builders#

Hopping#

Fermionic#

edinpy.fermion.Hopping(i, j, t, modes)[source]#

Return a Hermitian one-body hopping term.

Parameters:
  • i (int or iterable of int) – Mode labels for the two fermionic modes.

  • j (int or iterable of int) – Mode labels for the two fermionic modes.

  • t (numbers.Number) – Matrix element multiplying \(c_i^\dagger c_j\). The reverse process uses conj(t). A conventional tight-binding term \(-t_0(c_i^\dagger c_j+\mathrm{H.c.})\) is obtained by passing t=-t0 for real t0.

  • modes (FermionModes) – Fermionic modes used to resolve i and j.

Returns:

Literal symbolic expression \(t c_i^\dagger c_j+t^* c_j^\dagger c_i\).

Return type:

OperatorSum

Bosonic#

edinpy.boson.Hopping(i, j, t, modes)[source]#

Return a Hermitian one-boson hopping term.

Parameters:
  • i (int or iterable of int) – Mode labels for the two bosonic modes.

  • j (int or iterable of int) – Mode labels for the two bosonic modes.

  • t (numbers.Number) – Matrix element multiplying \(b_i^\dagger b_j\). The reverse process uses conj(t). The conventional Bose-Hubbard kinetic term \(-t_0(b_i^\dagger b_j+\mathrm{H.c.})\) is obtained with t=-t0 for real t0.

  • modes (BosonModes) – Bosonic modes used to resolve i and j.

Returns:

Literal symbolic expression \(t b_i^\dagger b_j+t^* b_j^\dagger b_i\).

Return type:

OperatorSum

Onsite energy#

Fermionic#

edinpy.fermion.Onsite(i, epsilon, modes)[source]#

Return an onsite one-body energy \(\epsilon_i n_i\).

Parameters:
  • i (int or iterable of int) – Mode label.

  • epsilon (numbers.Number) – Onsite energy.

  • modes (FermionModes) – Fermionic modes used to resolve i.

Returns:

Literal symbolic expression \(\epsilon_i n_i\).

Return type:

OperatorProduct

Bosonic#

edinpy.boson.Onsite(i, epsilon, modes)[source]#

Return an onsite one-body energy \(\epsilon_i n_i\).

Parameters:
  • i (int or iterable of int) – Mode label.

  • epsilon (numbers.Number) – Onsite energy.

  • modes (BosonModes) – Bosonic modes used to resolve i.

Returns:

Literal symbolic expression \(\epsilon_i n_i\).

Return type:

OperatorProduct

Density-density interaction#

Fermionic#

edinpy.fermion.DensityDensity(i, j, V, modes)[source]#

Return a density-density interaction \(V_{ij}n_i n_j\).

Parameters:
  • i (int or iterable of int) – Mode labels.

  • j (int or iterable of int) – Mode labels.

  • V (numbers.Number) – Density-density interaction strength.

  • modes (FermionModes) – Fermionic modes used to resolve i and j.

Returns:

Literal symbolic density-density interaction.

Return type:

OperatorProduct

Bosonic#

edinpy.boson.DensityDensity(i, j, V, modes)[source]#

Return a density-density interaction \(V_{ij} n_i n_j\).

Parameters:
  • i (int or iterable of int) – Mode labels.

  • j (int or iterable of int) – Mode labels.

  • V (numbers.Number) – Density-density interaction strength.

  • modes (BosonModes) – Bosonic modes used to resolve i and j.

Returns:

Literal symbolic density-density interaction.

Return type:

OperatorProduct

Hubbard interaction#

Fermionic#

edinpy.fermion.Hubbard(up, down, U, modes)[source]#

Return the local Hubbard interaction \(U n_\uparrow n_\downarrow\).

Parameters:
  • up (int or iterable of int) – Mode labels of the two local fermionic components.

  • down (int or iterable of int) – Mode labels of the two local fermionic components.

  • U (numbers.Number) – Local interaction strength.

  • modes (FermionModes) – Fermionic modes used to resolve the labels.

Returns:

Literal symbolic Hubbard interaction.

Return type:

OperatorProduct

Bosonic#

edinpy.boson.Hubbard(i, U, modes)[source]#

Return the standard bosonic onsite interaction.

The operator is

\[\frac{U}{2} n_i(n_i-1),\]

which is equal to \((U/2)b_i^\dagger b_i^\dagger b_i b_i\).

Parameters:
  • i (int or iterable of int) – Mode label.

  • U (numbers.Number) – Onsite interaction strength.

  • modes (BosonModes) – Bosonic modes used to resolve i.

Returns:

Literal symbolic onsite interaction.

Return type:

Operator

Pair hopping#

Fermionic#

edinpy.fermion.PairHopping(i_up, i_down, j_up, j_down, J, modes)[source]#

Return a Hermitian pair-hopping interaction between two mode pairs.

Parameters:
  • i_up (int or iterable of int) – Mode labels of the pair at location i.

  • i_down (int or iterable of int) – Mode labels of the pair at location i.

  • j_up (int or iterable of int) – Mode labels of the pair at location j.

  • j_down (int or iterable of int) – Mode labels of the pair at location j.

  • J (numbers.Number) – Matrix element for transferring the pair from j to i.

  • modes (FermionModes) – Fermionic modes used to resolve all labels.

Returns:

Literal number-conserving pair-hopping expression and its Hermitian conjugate.

Return type:

OperatorSum

Bosonic#

edinpy.boson.PairHopping(i, j, J, modes)[source]#

Return Hermitian two-boson pair hopping between two modes.

The operator is

\[J (b_i^\dagger)^2 b_j^2 + J^* (b_j^\dagger)^2 b_i^2.\]
Parameters:
  • i (int or iterable of int) – Mode labels between which a boson pair is transferred.

  • j (int or iterable of int) – Mode labels between which a boson pair is transferred.

  • J (numbers.Number) – Pair-transfer matrix element.

  • modes (BosonModes) – Bosonic modes used to resolve i and j.

Returns:

Literal number-conserving pair-hopping expression.

Return type:

OperatorSum

Spin operators#

SpinPlus#

edinpy.fermion.SpinPlus(up, down, modes)[source]#

Return \(S^+=c_\uparrow^\dagger c_\downarrow\) for two modes.

Parameters:
  • up (int or iterable of int) – Mode labels identified with the up and down components.

  • down (int or iterable of int) – Mode labels identified with the up and down components.

  • modes (FermionModes) – Fermionic modes used to resolve the labels.

Returns:

Literal symbolic spin-raising operator.

Return type:

OperatorProduct

edinpy.boson.SpinPlus(up, down, modes)[source]#

Return the Schwinger-boson raising operator.

The operator is \(S^+=b_\uparrow^\dagger b_\downarrow\).

Parameters:
  • up (int or iterable of int) – Mode labels identified with the two internal bosonic components.

  • down (int or iterable of int) – Mode labels identified with the two internal bosonic components.

  • modes (BosonModes) – Bosonic modes used to resolve the labels.

Returns:

Literal symbolic pseudospin-raising operator.

Return type:

OperatorProduct

Notes

Together with SpinMinus() and SpinZ(), this is the Schwinger- boson representation of angular momentum. On a subspace with fixed local occupation n_up + n_down = 2S it realizes a spin-S representation.

SpinMinus#

edinpy.fermion.SpinMinus(up, down, modes)[source]#

Return \(S^-=c_\downarrow^\dagger c_\uparrow\) for two modes.

Parameters:
  • up (int or iterable of int) – Mode labels identified with the up and down components.

  • down (int or iterable of int) – Mode labels identified with the up and down components.

  • modes (FermionModes) – Fermionic modes used to resolve the labels.

Returns:

Literal symbolic spin-lowering operator.

Return type:

OperatorProduct

edinpy.boson.SpinMinus(up, down, modes)[source]#

Return the Schwinger-boson lowering operator.

The operator is \(S^-=b_\downarrow^\dagger b_\uparrow\).

Parameters:
  • up (int or iterable of int) – Mode labels identified with the two internal bosonic components.

  • down (int or iterable of int) – Mode labels identified with the two internal bosonic components.

  • modes (BosonModes) – Bosonic modes used to resolve the labels.

Returns:

Literal symbolic pseudospin-lowering operator.

Return type:

OperatorProduct

SpinX#

edinpy.fermion.SpinX(up, down, modes)[source]#

Return \(S^x=(S^++S^-)/2\) for two fermionic modes.

Parameters:
  • up (int or iterable of int) – Mode labels identified with the up and down components.

  • down (int or iterable of int) – Mode labels identified with the up and down components.

  • modes (FermionModes) – Fermionic modes used to resolve the labels.

Returns:

Literal symbolic \(S^x\) operator.

Return type:

OperatorSum

edinpy.boson.SpinX(up, down, modes)[source]#

Return \(S^x=(S^++S^-)/2\) for two bosonic components.

Parameters:
  • up (int or iterable of int) – Mode labels identified with the two internal bosonic components.

  • down (int or iterable of int) – Mode labels identified with the two internal bosonic components.

  • modes (BosonModes) – Bosonic modes used to resolve the labels.

Returns:

Literal symbolic \(S^x\) operator.

Return type:

OperatorSum

SpinY#

edinpy.fermion.SpinY(up, down, modes)[source]#

Return \(S^y=(S^+-S^-)/(2i)\) for two fermionic modes.

Parameters:
  • up (int or iterable of int) – Mode labels identified with the up and down components.

  • down (int or iterable of int) – Mode labels identified with the up and down components.

  • modes (FermionModes) – Fermionic modes used to resolve the labels.

Returns:

Literal symbolic \(S^y\) operator.

Return type:

OperatorSum

edinpy.boson.SpinY(up, down, modes)[source]#

Return \(S^y=(S^+-S^-)/(2i)\) for two bosonic components.

Parameters:
  • up (int or iterable of int) – Mode labels identified with the two internal bosonic components.

  • down (int or iterable of int) – Mode labels identified with the two internal bosonic components.

  • modes (BosonModes) – Bosonic modes used to resolve the labels.

Returns:

Literal symbolic \(S^y\) operator.

Return type:

OperatorSum

SpinZ#

edinpy.fermion.SpinZ(up, down, modes)[source]#

Return \(S^z=(n_\uparrow-n_\downarrow)/2\) for two modes.

Parameters:
  • up (int or iterable of int) – Mode labels identified with the up and down components.

  • down (int or iterable of int) – Mode labels identified with the up and down components.

  • modes (FermionModes) – Fermionic modes used to resolve the labels.

Returns:

Literal symbolic \(S^z\) operator.

Return type:

OperatorSum

edinpy.boson.SpinZ(up, down, modes)[source]#

Return \(S^z=(n_\uparrow-n_\downarrow)/2\).

Parameters:
  • up (int or iterable of int) – Mode labels identified with the two internal bosonic components.

  • down (int or iterable of int) – Mode labels identified with the two internal bosonic components.

  • modes (BosonModes) – Bosonic modes used to resolve the labels.

Returns:

Literal symbolic \(S^z\) operator.

Return type:

OperatorSum

Heisenberg exchange#

Fermionic#

edinpy.fermion.HeisenbergExchange(up_i, down_i, up_j, down_j, J, modes)[source]#

Return \(J\mathbf{S}_i\cdot\mathbf{S}_j\) for two spinful sites.

Parameters:
  • up_i (int or iterable of int) – Up and down mode labels at site i.

  • down_i (int or iterable of int) – Up and down mode labels at site i.

  • up_j (int or iterable of int) – Up and down mode labels at site j.

  • down_j (int or iterable of int) – Up and down mode labels at site j.

  • J (numbers.Number) – Heisenberg exchange coupling.

  • modes (FermionModes) – Fermionic modes used to resolve all labels.

Returns:

Literal symbolic expression equivalent to \(J[S_i^zS_j^z+(S_i^+S_j^-+S_i^-S_j^+)/2]\).

Return type:

Operator

Bosonic#

edinpy.boson.HeisenbergExchange(up_i, down_i, up_j, down_j, J, modes)[source]#

Return \(J\mathbf{S}_i\cdot\mathbf{S}_j\) in Schwinger-boson form.

Parameters:
  • up_i (int or iterable of int) – Two component-mode labels at location i.

  • down_i (int or iterable of int) – Two component-mode labels at location i.

  • up_j (int or iterable of int) – Two component-mode labels at location j.

  • down_j (int or iterable of int) – Two component-mode labels at location j.

  • J (numbers.Number) – Exchange coupling.

  • modes (BosonModes) – Bosonic modes used to resolve all labels.

Returns:

Literal expression \(J[S_i^zS_j^z+(S_i^+S_j^-+S_i^-S_j^+)/2]\).

Return type:

Operator

Notes

When each location is constrained to one boson, this reduces to the usual spin-1/2 Heisenberg exchange. More generally, a fixed local occupation n_up + n_down = 2S realizes spin S at that location.