Skip to content

Commit 11cd808

Browse files
committed
Generate documentation output manually
1 parent 5cde8a7 commit 11cd808

File tree

3 files changed

+170
-44
lines changed

3 files changed

+170
-44
lines changed

Basics/03-Operators.ipynb

Lines changed: 34 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -257,16 +257,41 @@
257257
},
258258
{
259259
"cell_type": "code",
260-
"execution_count": 6,
261-
"metadata": {
262-
"execution": {
263-
"iopub.execute_input": "2023-08-28T15:03:37.626026Z",
264-
"iopub.status.busy": "2023-08-28T15:03:37.625962Z",
265-
"iopub.status.idle": "2023-08-28T15:03:37.652744Z",
266-
"shell.execute_reply": "2023-08-28T15:03:37.652516Z"
260+
"execution_count": 1,
261+
"metadata": {},
262+
"outputs": [
263+
{
264+
"data": {
265+
"text/plain": [
266+
"\u001b[0;31mSignature:\u001b[0m \u001b[0mAtomDiag\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
267+
"\u001b[0;31mDocstring:\u001b[0m\n",
268+
"Lightweight exact diagonalization solver\n",
269+
"\n",
270+
"Use the QR algorithm to diagonalize the Hamiltonian.\n",
271+
"Auto-partitions the Hamiltonian into subspaces (blocks)\n",
272+
"such that all creation and annihilation operators map one\n",
273+
"subspace to exactly one other subspace.\n",
274+
"\n",
275+
"Parameters\n",
276+
"----------\n",
277+
"h: Operator\n",
278+
" Hamiltonian to be diagonalized.\n",
279+
"fops: list of tuple of strings and ints\n",
280+
" List of all annihilation / creation operator flavors (indices).\n",
281+
" Must at least contain all flavors met in `h`.\n",
282+
"qn_vector: list of Operator, optional\n",
283+
" Vector of quantum number operators to be used for the auto-partitioning\n",
284+
"n_min, n_max: integers, optional\n",
285+
" Truncate the Fock-space to states with particle number in [n_min, n_max]\n",
286+
" Cannot be combined with qn_vector\n",
287+
"\u001b[0;31mFile:\u001b[0m ~/opt/triqs/lib/python3.11/site-packages/triqs/atom_diag/__init__.py\n",
288+
"\u001b[0;31mType:\u001b[0m function"
289+
]
290+
},
291+
"metadata": {},
292+
"output_type": "display_data"
267293
}
268-
},
269-
"outputs": [],
294+
],
270295
"source": [
271296
"from triqs.atom_diag import AtomDiag\n",
272297
"?AtomDiag"

Basics/04-Multivariable_Green_functions.ipynb

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -355,16 +355,35 @@
355355
},
356356
{
357357
"cell_type": "code",
358-
"execution_count": 11,
359-
"metadata": {
360-
"execution": {
361-
"iopub.execute_input": "2023-08-28T15:03:47.310645Z",
362-
"iopub.status.busy": "2023-08-28T15:03:47.310584Z",
363-
"iopub.status.idle": "2023-08-28T15:03:47.327414Z",
364-
"shell.execute_reply": "2023-08-28T15:03:47.327197Z"
358+
"execution_count": 1,
359+
"metadata": {},
360+
"outputs": [
361+
{
362+
"data": {
363+
"text/plain": [
364+
"\u001b[0;31mInit signature:\u001b[0m \u001b[0mTightBinding\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m/\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
365+
"\u001b[0;31mDocstring:\u001b[0m \n",
366+
"A tight-binding Hamiltonian on a Bravais lattice.\n",
367+
"\n",
368+
"Requires the displacements in units of the lattice basis vectors (units)\n",
369+
"and the associated overlap (hopping) matrices.\n",
370+
"The matrix structure is w.r.t. the atoms in the unit cell.\n",
371+
"\n",
372+
"Parameters\n",
373+
"----------\n",
374+
"bl : BravaisLattice\n",
375+
" Underlying bravais lattice\n",
376+
"hoppings : dict(vector->matrix)\n",
377+
" The mapping between displacement vectors and overlap (hopping) matrices\n",
378+
"\u001b[0;31mFile:\u001b[0m ~/opt/triqs/lib/python3.11/site-packages/triqs/lattice/lattice_tools.cpython-311-darwin.so\n",
379+
"\u001b[0;31mType:\u001b[0m type\n",
380+
"\u001b[0;31mSubclasses:\u001b[0m "
381+
]
382+
},
383+
"metadata": {},
384+
"output_type": "display_data"
365385
}
366-
},
367-
"outputs": [],
386+
],
368387
"source": [
369388
"from triqs.lattice import TightBinding\n",
370389
"?TightBinding"

Basics/solutions/01s-Greens_functions.ipynb

Lines changed: 108 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,35 @@
3434
{
3535
"cell_type": "code",
3636
"execution_count": 1,
37-
"metadata": {
38-
"execution": {
39-
"iopub.execute_input": "2023-08-28T15:03:58.320804Z",
40-
"iopub.status.busy": "2023-08-28T15:03:58.320497Z",
41-
"iopub.status.idle": "2023-08-28T15:03:58.446386Z",
42-
"shell.execute_reply": "2023-08-28T15:03:58.446021Z"
37+
"metadata": {},
38+
"outputs": [
39+
{
40+
"data": {
41+
"text/plain": [
42+
"\u001b[0;31mInit signature:\u001b[0m \u001b[0mMeshImTime\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m/\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
43+
"\u001b[0;31mDocstring:\u001b[0m \n",
44+
"Mesh of imaginary times\n",
45+
"\n",
46+
"Mesh-points are evenly distributed in the interval [0,beta]\n",
47+
"including points at both edges.\n",
48+
"\n",
49+
"Parameters\n",
50+
"----------\n",
51+
"beta : float\n",
52+
" Inverse temperature\n",
53+
"statistic : str\n",
54+
" Statistic, 'Fermion' or 'Boson'\n",
55+
"n_tau : int\n",
56+
" Number of mesh-points\n",
57+
"\u001b[0;31mFile:\u001b[0m ~/opt/triqs/lib/python3.11/site-packages/triqs/gf/meshes.cpython-311-darwin.so\n",
58+
"\u001b[0;31mType:\u001b[0m type\n",
59+
"\u001b[0;31mSubclasses:\u001b[0m "
60+
]
61+
},
62+
"metadata": {},
63+
"output_type": "display_data"
4364
}
44-
},
45-
"outputs": [],
65+
],
4666
"source": [
4767
"# Import the Mesh type we want to use\n",
4868
"from triqs.gf import MeshImTime\n",
@@ -106,16 +126,50 @@
106126
},
107127
{
108128
"cell_type": "code",
109-
"execution_count": 3,
110-
"metadata": {
111-
"execution": {
112-
"iopub.execute_input": "2023-08-28T15:03:58.466295Z",
113-
"iopub.status.busy": "2023-08-28T15:03:58.466191Z",
114-
"iopub.status.idle": "2023-08-28T15:03:58.468256Z",
115-
"shell.execute_reply": "2023-08-28T15:03:58.468041Z"
129+
"execution_count": 2,
130+
"metadata": {},
131+
"outputs": [
132+
{
133+
"data": {
134+
"text/plain": [
135+
"\u001b[0;31mInit signature:\u001b[0m \u001b[0mGf\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m**\u001b[0m\u001b[0mkw\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
136+
"\u001b[0;31mDocstring:\u001b[0m \n",
137+
"TRIQS Greens function container class\n",
138+
"\n",
139+
"Parameters\n",
140+
"----------\n",
141+
"\n",
142+
"mesh: Types defined in triqs.gf beginning with 'Mesh'\n",
143+
" The mesh on which the Green function is defined.\n",
144+
"\n",
145+
"data: numpy.array, optional\n",
146+
" The data of the Greens function.\n",
147+
" Must be of dimension ``mesh.rank + target_rank``.\n",
148+
"\n",
149+
"target_shape: list of int, optional\n",
150+
" Shape of the target space.\n",
151+
"\n",
152+
"is_real: bool\n",
153+
" Is the Greens function real valued?\n",
154+
" If true, and target_shape is set, the data will be real.\n",
155+
" Mutually exclusive with argument ``data``.\n",
156+
"\n",
157+
"name: str \n",
158+
" The name of the Greens function for plotting.\n",
159+
"\n",
160+
"Notes\n",
161+
"-----\n",
162+
"\n",
163+
"One of ``target_shape`` or ``data`` must be set, and the other must be `None`.\n",
164+
"\u001b[0;31mFile:\u001b[0m ~/opt/triqs/lib/python3.11/site-packages/triqs/gf/gf.py\n",
165+
"\u001b[0;31mType:\u001b[0m AddMethod\n",
166+
"\u001b[0;31mSubclasses:\u001b[0m GfReFreq, GfImFreq, GfImTime, GfReTime, GfLegendre"
167+
]
168+
},
169+
"metadata": {},
170+
"output_type": "display_data"
116171
}
117-
},
118-
"outputs": [],
172+
],
119173
"source": [
120174
"from triqs.gf import Gf\n",
121175
"?Gf"
@@ -388,16 +442,44 @@
388442
},
389443
{
390444
"cell_type": "code",
391-
"execution_count": 9,
392-
"metadata": {
393-
"execution": {
394-
"iopub.execute_input": "2023-08-28T15:03:58.746672Z",
395-
"iopub.status.busy": "2023-08-28T15:03:58.746612Z",
396-
"iopub.status.idle": "2023-08-28T15:03:58.748475Z",
397-
"shell.execute_reply": "2023-08-28T15:03:58.748280Z"
445+
"execution_count": 3,
446+
"metadata": {},
447+
"outputs": [
448+
{
449+
"data": {
450+
"text/plain": [
451+
"\u001b[0;31mInit signature:\u001b[0m \u001b[0mBlockGf\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
452+
"\u001b[0;31mDocstring:\u001b[0m Generic Green's Function by Block.\n",
453+
"\u001b[0;31mInit docstring:\u001b[0m\n",
454+
"* There are several possible constructors, which accept only keyword arguments.\n",
455+
"\n",
456+
" * BlockGf(block_list = list of blocks, name_list = list of names, make_copies = False)\n",
457+
"\n",
458+
" * ``block_list``: list of blocks of Green's functions.\n",
459+
" * ``name_list``: list of the names of the blocks, e.g. [\"up\",\"down\"]. Default to [\"0\", \"1\", ...]\n",
460+
" * ``make_copies``: If True, build the Green's function from a copy of the blocks (default: False).\n",
461+
"\n",
462+
" * BlockGf(mesh = mesh, gf_struct = block structure, target_rank = rank of target space)\n",
463+
"\n",
464+
" * ``mesh``: The mesh used to construct each block\n",
465+
" * ``gf_struct``: List of pairs [ (str,int), ... ] providing the block name and its linear size\n",
466+
" * ``target_rank``: The rank of the target space of each block (default: 2)\n",
467+
"\n",
468+
" * BlockGf(name_block_generator, make_copies = False)\n",
469+
"\n",
470+
" * ``name_block_generator``: a generator of (name, block)\n",
471+
" * ``make_copies``: If True, build the Green's function from a copy of the blocks (default: False).\n",
472+
"\n",
473+
" \n",
474+
"\u001b[0;31mFile:\u001b[0m ~/opt/triqs/lib/python3.11/site-packages/triqs/gf/block_gf.py\n",
475+
"\u001b[0;31mType:\u001b[0m type\n",
476+
"\u001b[0;31mSubclasses:\u001b[0m "
477+
]
478+
},
479+
"metadata": {},
480+
"output_type": "display_data"
398481
}
399-
},
400-
"outputs": [],
482+
],
401483
"source": [
402484
"from triqs.gf import BlockGf\n",
403485
"?BlockGf"

0 commit comments

Comments
 (0)