Skip to content

Commit

Permalink
Merge branch 'unstable' of github.com:TRIQS/ctseg into unstable
Browse files Browse the repository at this point in the history
  • Loading branch information
nkavokine committed May 25, 2024
2 parents 00446fc + 0722428 commit c10fea3
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion doc/about.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
About CTSEG
*************

The CTSEG solver has been written by N. Kavokine and O. Parcollet, with contriubtions from H. Lu and N. Wentzell. The algorithm has been
The CTSEG solver has been written by N. Kavokine and O. Parcollet, with contributions from H. Lu and N. Wentzell. The algorithm has been
introduced in [J. Otsuki, Phys. Rev. B 87, 125102 (2013)].

The authors thank T. Ayral and M. Ferrero for sharing their unpublished implementation of CTSEG, which served as an inspiration
Expand Down
10 changes: 5 additions & 5 deletions doc/algorithm_implementation/ctseg.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Double expansion

The segment-picture continuous-time quantum Monte Carlo algorithm
(CTSEG), in its double expansion version, is based on an expansion of the partition function in powers of the
hybridization function :math:`\Delta(\tau)` and perprendicular spin-spin interaction
hybridization function :math:`\Delta(\tau)` and perpendicular spin-spin interaction
:math:`J_{\perp} (\tau)`. Details can be found in [#ctqmc1]_ [#ctqmc2]_. The partition function is :math:`Z = \int [Dc][D\overline{c}]e^{-\mathcal{S}[c,\overline{c}]}`,
with the action :math:`\mathcal{S}` given by

Expand All @@ -25,7 +25,7 @@ with the action :math:`\mathcal{S}` given by
Here :math:`\beta` is the inverse temperature, :math:`a` denote orbital indices, :math:`\sigma` spin indices (:math:`\sigma = \uparrow, \downarrow`),
:math:`n_a \equiv \sum_{\sigma} n_{a\sigma}`, :math:`s_a^{\xi} \equiv \frac{1}{2} \sum_{\sigma \sigma'} \overline{c}_{a\sigma}
\sigma_{\sigma \sigma'}^{\xi} c_{a \sigma'}` and :math:`\sigma^{\xi}` are the Pauli matrices. :math:`\overline{c}_{a\sigma}(\tau)`
and :math:`c_{a\sigma}(\tau)` are the :math:`\beta`-antiperiodic Grassman fields corresponding to the fermion
and :math:`c_{a\sigma}(\tau)` are the :math:`\beta`-antiperiodic Grassmann fields corresponding to the fermion
creation and annihilation operators on the impurity, respectively.

This action can be recast as
Expand Down Expand Up @@ -72,9 +72,9 @@ where :math:`w_{\rm loc}` is the local trace factor:
w_{\rm loc} = \langle \psi \vert e^{-S_{\rm loc}} c(v_1)\overline{c}(u_1) \dots c(v_n) \overline{c}(u_n) s^+(\alpha_1)s^-(\beta_1) \dots s^+(\alpha_k) s^-(\beta_k) \vert \psi \rangle.
We have denoted :math:`\vert \Psi \rangle` the basis states of the isolated impurity and :math:`S_{\rm loc}` the corresponsing action.
We have denoted :math:`\vert \Psi \rangle` the basis states of the isolated impurity and :math:`S_{\rm loc}` the corresponding action.
:math:`[\Delta]` is the matrix with elements :math:`[\Delta]_{ij} = \Delta(u_i - v_j)` and :math:`q` is a permutation
of :math:`(1, \dots, k)`. We chose to regoup all the possible permutations of the "hybridized" operators into a determinant
of :math:`(1, \dots, k)`. We chose to regroup all the possible permutations of the "hybridized" operators into a determinant
because it allows for numerically fast updates, while there is no advantage to regrouping the permutations of the spin
operators into a permanent.

Expand All @@ -96,7 +96,7 @@ The static trace factor is
w_{\rm st}(U_{ab}, \mu_a) = \exp \left[ -\sum_{a \neq b} U_{ab} O_{ab} + \sum_a \mu_a \ell_a \right].
Here :math:`O_{ab}` is the overlap between the segments of colors a and b, and :math:`\ell_a` is the occupied length in color a.
Here :math:`O_{ab}` is the overlap between the segments of colors :math:`a` and :math:`b`, and :math:`\ell_a` is the occupied length in color a.
In the presence of dynamical interactions, the static trace factor is computed with a renormalized interaction and chemical potential:
:math:`\tilde U_{ab} = U_{ab} - 2 K'_{ab}(0)` and :math:`\tilde \mu_{a} = \mu_a + K'_{aa}(0)`.

Expand Down
10 changes: 5 additions & 5 deletions doc/algorithm_implementation/implementation_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ the set of results (``results.hpp``) and the ``solve`` method. The latter runs
the QMC calculation for a given set of inputs, and given the additional ``solve_params`` (see ``params.hpp``).

The solve method works with three structures: ``params_t p`` (the set of all parameters), ``configuration_t config``
(the Monte Carlo configuration, see below) and ``work_data_t wdata``, that contains all the data and auxillary
(the Monte Carlo configuration, see below) and ``work_data_t wdata``, that contains all the data and auxiliary
methods that are used by the Monte Carlo moves and measurements. It further defines an instance of the
`mc_generic <https://triqs.github.io/triqs/latest/documentation/manual/triqs/mc_tools/contents.html>`_ class
(a component of TRIQS) that takes care of implementing the Metropolis algorithm. The
Expand Down Expand Up @@ -54,7 +54,7 @@ operator, and a boolean for each operator indicating whether it is attached to a

By convention, we orient the imaginary time axis from :math:`\beta` on the left to 0 on the right.

A segment may be cyclic if :math:`\tau_c < \tau_{c^{\dagger}}`. A line that is occcupied at all times
A segment may be cyclic if :math:`\tau_c < \tau_{c^{\dagger}}`. A line that is occupied at all times
(a zeroth order term in the hybridization expansion) is represented by a segment with
:math:`\tau_{c^{\dagger}} = 0` and :math:`\tau_c = \beta`.

Expand All @@ -64,7 +64,7 @@ and the time corresponding to an :math:`S^-` operator. No orbital indices are st

The structure of the configuration is inherited from the structure of the hybridization function. The
hybridization function is matrix-valued, and its line (or column) indices are termed *colors*. The configuration
consists in a list (``std::vector``) of lists of segments (one per color), and a list of :math:`J_{\perp}` lines.
consists of a list (``std::vector``) of lists of segments (one per color), and a list of :math:`J_{\perp}` lines.
The block structure of the hybridization function is irrelevant for the configuration (it is only used for the determinants, see below).

.. warning::
Expand All @@ -88,7 +88,7 @@ Work data
The ``work_data`` structure (see ``work_data.hpp``) contains data and methods that are used by the Monte Carlo moves
and measurements. Most importantly, its construction involves computing the dynamical interaction kernel :math:`K(\tau)`,
and initializing the determinant for every block of the hybridization matrix :math:`[\Delta]`. ``work_data.hpp`` also
contains auxillary functions for the Monte Carlo moves: in particular, ``trace_sign``, that computes the sign of the trace
contains auxiliary functions for the Monte Carlo moves: in particular, ``trace_sign``, that computes the sign of the trace
from the times of the hybridized operators stored in the ``dets`` object.

Determinants
Expand All @@ -98,7 +98,7 @@ The hybridization matrix :math:`[\Delta]` is stored in ``work_data`` as a list (
Each block is a ``det_manip`` object. The ``det_manip`` class is a part of TRIQS, which implements
a fast computation of the change to :math:`\mathrm{det}[\Delta]` upon insertion or removal of a line
and column in :math:`[\Delta]`. The ``det_manip`` object is constructed from the input hybridization function
via an "adaptor" that specifies how it is to be callled (see ``dets.hpp``). The alias ``det_t`` is used for the
via an "adaptor" that specifies how it is to be called (see ``dets.hpp``). The alias ``det_t`` is used for the
type of :math:`[\Delta]`.

.. warning::
Expand Down
6 changes: 3 additions & 3 deletions doc/guide/moves.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ Insert spin segment

Randomly choose a color :math:`i` (spin up or spin down) and a segment :math:`[\tau, \tau']` within that color. The other color is denoted :math:`j`.
Choose two random (but ordered) times :math:`\tau_1` and :math:`\tau_1'` within that segment. Try replacing :math:`[\tau, \tau']` with :math:`[\tau, \tau_1]`
and :math:`[\tau_1, \tau']` in color :math:`i`, inserting :math:`[\tau_1, \tau_1']` in color :math:`j`, and inserting a :math:`J_{\perp}` line
and :math:`[\tau_1', \tau']` in color :math:`i`, inserting :math:`[\tau_1, \tau_1']` in color :math:`j`, and inserting a :math:`J_{\perp}` line
between :math:`\tau_1` and :math:`\tau_1'`.

This move is enabled if there is a non-zero :math:`J_{\perp}(\tau)`.
Expand All @@ -102,8 +102,8 @@ Remove spin segment
:width: 80%

Randomly choose a :math:`J_{\perp}` line. If its two endpoints are connected by a segment :math:`[\tau_1, \tau_1']` in color :math:`i`, find the segments
:math:`[\tau, \tau_1]` and :math:`[\tau_1, \tau']` that it connects in color :math:`j`. Try removing the :math:`J_{\perp}` line and segment
:math:`[\tau_1, \tau_1']` in color :math:`i`, and replacing :math:`[\tau, \tau_1]` and :math:`[\tau_1, \tau']` in color :math:`j` with a single
:math:`[\tau, \tau_1]` and :math:`[\tau_1', \tau']` that it connects in color :math:`j`. Try removing the :math:`J_{\perp}` line and segment
:math:`[\tau_1, \tau_1']` in color :math:`i`, and replacing :math:`[\tau, \tau_1]` and :math:`[\tau_1', \tau']` in color :math:`j` with a single
segment :math:`[\tau, \tau']`.

This move is enabled if there is a non-zero :math:`J_{\perp}(\tau)`.
Expand Down
10 changes: 5 additions & 5 deletions doc/guide/step_by_step.rst
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ Chemical potential
------------------

The orbital-dependent chemical potential is passed to the solver as the solve parameter ``hartree_shift`` (see below),
a list with one value per color. For example, for the single-orgital problem::
a list with one value per color. For example, for the single-orbital problem::

hartree_shift = [mu, mu]

Expand All @@ -178,7 +178,7 @@ The dynamical density-density interaction :math:`D(\tau)` (see :doc:`CTSEG algor

D_tau = GfImTime(indices = range(n_colors), beta = beta, statistic = "Boson", n_points = n_tau_k)

It is a matrix Green's function, for which no block strucutre is explicitly enforced. The data in
It is a matrix Green's function, for which no block structure is explicitly enforced. The data in
``D_tau`` can be specified manually (``D_tau.data = ...``) or by using an analytical expression.
For example::

Expand All @@ -195,7 +195,7 @@ The dynamical interaction is supplied to the solver via::
Spin-spin interaction
---------------------

The prependicular spin-spin interaction :math:`J_{\perp}(\tau)` (see :doc:`CTSEG algorithm <../algorithm_implementation/ctseg>`) is initialized as::
The perpendicular spin-spin interaction :math:`J_{\perp}(\tau)` (see :doc:`CTSEG algorithm <../algorithm_implementation/ctseg>`) is initialized as::

Jperp_tau = GfImTime(indices = [0], beta = beta, statistic = "Boson", n_points = n_tau_k)

Expand Down Expand Up @@ -248,7 +248,7 @@ Other parameters include:
density correlation functions) can be time-consuming, and they are off by default. For example, to turn the improved estimator
measurement on, one should set ``solve_params["measure_ft"] = True``.

* **Move control**. All the :doc:`Monte Carlo moves <moves>` can be switched on and off. This functionality exists to faciliate testing
* **Move control**. All the :doc:`Monte Carlo moves <moves>` can be switched on and off. This functionality exists to facilitate testing
for developers. The solver chooses the relevant moves depending on its inputs, and regular users should not need move control.

The complete list of parameters is available :doc:`here <../_ref/triqs_ctseg.solver.Solver.solve>`.
Expand All @@ -265,7 +265,7 @@ The CTQMC run is triggered by::
In the presence of dynamical interactions, these are renormalized values, different from the input parameters contained
in ``h_int`` and ``hartree_shift`` (see :doc:`CTSEG algorithm <../algorithm_implementation/ctseg>`).

After it is done accumulating, the solver prints the average acceptance rates. Very low acceptance rates for all moves (below 0.1)
After it is done accumulating, the solver prints the average acceptance rates. Very low acceptance rates for all moves (below 0.01)
are generally a sign that something went wrong. However, some of the moves (``split_spin_segment``, ``regroup_spin_segment``)
often have low acceptance rates, even if the calculation runs as it should.

Expand Down
4 changes: 2 additions & 2 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The Segment Picture Solver
**************************

The :ref:`TRIQS-based <triqslibs:welcome>` hybridization-expansion **segment picture** solver (CTSEG)
can tackle the generic problem of a quantum impurity coupled to an external environement (bath). The "impurity" can
can tackle the generic problem of a quantum impurity coupled to an external environment (bath). The "impurity" can
be any set of orbitals, on one or several atoms. The CTSEG solver supports (possibly retarded) density-density
and spin-spin interactions on the impurity. Under these restrictions, it provides better performance than the generic
`CTHYB <https://triqs.github.io/cthyb/latest/>`_ solver, that supports generic local interaction vertices.
Expand Down Expand Up @@ -33,7 +33,7 @@ The imaginary time action solved by CTSEG is of the form
Here :math:`\beta` is the inverse temperature, :math:`a` denote orbital indices, :math:`\sigma` spin indices (:math:`\sigma = \uparrow, \downarrow`),
:math:`n_a \equiv \sum_{\sigma} n_{a\sigma}`, :math:`s_a^{\xi} \equiv \frac{1}{2} \sum_{\sigma \sigma'} \overline{c}_{a\sigma}
\sigma_{\sigma \sigma'}^{\xi} c_{a \sigma'}` and :math:`\sigma^{\xi}` are the Pauli matrices. :math:`\overline{c}_{a\sigma}(\tau)`
and :math:`c_{a\sigma}(\tau)` are the :math:`\beta`-antiperiodic Grassman fields corresponding to the fermion
and :math:`c_{a\sigma}(\tau)` are the :math:`\beta`-antiperiodic Grassmann fields corresponding to the fermion
creation and annihilation operators on the impurity, respectively. :math:`\Delta_{ab}^{\sigma \sigma'}(\tau)`
is the hybridization function, that accounts for particle exchange between the impurity and the bath, and
:math:`\mathcal{U}_{ab} (\tau)` and :math:`\mathcal{J}_{a}^{\xi} (\tau)` are the (dynamical)
Expand Down

0 comments on commit c10fea3

Please sign in to comment.