Skip to content

Commit b8fa786

Browse files
committed
[doc] add section on tests
1 parent 7884acf commit b8fa786

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

doc/algorithm_implementation/implementation_notes.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,3 +116,17 @@ Miscellaneous
116116
at every move if the code is compiled in debug mode. Checks include the time-ordering of the segments and of the lines and
117117
columns of :math:`[\Delta]`, the consistency between the times stored in the configuration and in :math:`[\Delta]`, and the
118118
consistency between the :math:`J_{\perp}` lines and the labels stored in the segments.
119+
120+
Automatic tests
121+
***************
122+
123+
Several automatic tests are supplied with CTSEG. They run short simulations to assess whether the software functions correctly.
124+
* ``anderson.py``, ``dynamical_U.py``, ``Jperp.py``, ``spin_spin.py`` and ``multiorb.py`` are non-regression tests, that compare their results to a reference generated by CTSEG itself.
125+
They cover most situations that might be handled by CTSEG: single or multiple orbitals, static, dynamic or spin-spin interactions.
126+
In addition, two tests written directly in C++, ``anderson.cpp`` and ``spin_spin.cpp``, are supplied for developers who may wish to check for non-regression without re-generating the Python wrapper.
127+
* ``dimer.py`` may be used to check the correctness of CTSEG on an exactly solvable problem (two impurity sites coupled to two bath sites). The reference data can be found
128+
in ``dimer_pyed.ref.h5``. A meaningful comparison to the reference requires a long solver run (for this particular problem, the result can have significant fluctuations between machines for short runs).
129+
Such a long run is not carried out as part of the automatic testing procedure and should be set up by the user if an in-depth assessment of correctness is required.
130+
* Additionally, the correctness of CTSEG for problems involving dynamical and spin-spin interaction can be checked by comparing the output of ``spin_spin.py`` to the data in ``ctint.ref.h5``,
131+
generated by a very long CTINT run. CTINT carries out an altogether different expansion to solve the problem: therefore, agreement between CTSEG and CTINT is a good indication for the correctness
132+
of both solvers.

0 commit comments

Comments
 (0)