Skip to content

Commit

Permalink
Added examples to documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Wietek committed Mar 29, 2024
1 parent 9afc195 commit ec2ddbe
Show file tree
Hide file tree
Showing 10 changed files with 72 additions and 25 deletions.
45 changes: 45 additions & 0 deletions docs/examples.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
title: Examples
---

## Basic examples

- Hello World

??? example "source"
```c++
--8<-- "examples/hello_world/main.cpp"
```

- Ground state energy of a spin chain

??? example "source"
```c++
--8<-- "examples/spectrum/spinhalf_chain_e0/main.cpp"
```

## Distributed examples


- Time-evolution of a $t$-$J$ model

??? example "source"
```c++
--8<-- "examples/time_evolution/tj_distributed_time_evolve/main.cpp"
```

## Application CMakeLists.txt

- Normal hydra library

??? example "source"
```cmake
--8<-- "examples/hello_world/CMakeLists.txt"
```

- Distributed hydra library

??? example "source"
```cmake
--8<-- "examples/time_evolution/tj_distributed_time_evolve/CMakeLists.txt"
```
Binary file added docs/img/hb_chain_dynamical_sf.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/hubbard_doublon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/j1j2_spectra.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/triangularwse2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 18 additions & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,26 @@
---
title: Home
---
:simple-cplusplus: :simple-julia: :material-github:

![license](https://img.shields.io/badge/license-Apache%202.0-blue)
![cpp](https://img.shields.io/badge/C++-17-blue.svg?logo=c%2B%2B)
[![Linux CI](https://github.com/awietek/hydra/actions/workflows/linux.yml/badge.svg?style=for-the-badge)](https://github.com/awietek/hydra/actions/workflows/linux.yml)
[![Mac OSX CI](https://github.com/awietek/hydra/actions/workflows/osx.yml/badge.svg?style=for-the-badge)](https://github.com/awietek/hydra/actions/workflows/osx.yml)

[Quick Start](quickstart.md){ .md-button .md-button--primary }
[Code on GitHub](https://github.com/awietek/hydra){ .md-button .md-button--secondary }

## Overview
Hydra is a C++ library for performing Exact Diagonalizations of quantum many-body systems. Key features include optimized combinatorical algorithms for navigating Hilbert spaces, iterative algorithms for solving large-scale eigenvalue problems, and efficient parallelization.
Hydra is a C++ library for performing Exact Diagonalizations of
quantum many-body systems. Key features include optimized combinatorical
algorithms for navigating Hilbert spaces, iterative linear algebra algorithms,
shared and distributed memory parallelization.

## Gallery
<div class="grid cards" markdown>
- ![Image title](img/triangularwse2.png){ align=left }
- ![Image title](img/hb_chain_dynamical_sf.png){ align=left }
- ![Image title](img/hubbard_doublon.png){ align=left }
- ![Image title](img/j1j2_spectra.png){ align=left }
</div>
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
cmake_minimum_required(VERSION 3.15)
cmake_minimum_required(VERSION 3.19)

project(
tj_distributed_time_evolve
VERSION 1.0
LANGUAGES CXX
)

find_package(hydra_distributed REQUIRED HINTS /home/awietek/Research/Software/hydra/install)
find_package(hydra_distributed REQUIRED HINTS ../../../install)
add_executable(main main.cpp)
target_link_libraries(main PUBLIC hydra_distributed)
target_link_libraries(main PUBLIC hydra::hydra_distributed)
16 changes: 0 additions & 16 deletions examples/time_evolution/tj_distributed_time_evolve/plot.py

This file was deleted.

4 changes: 0 additions & 4 deletions examples/time_evolution/tj_distributed_time_evolve/run.sh

This file was deleted.

6 changes: 6 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,18 @@ theme:
markdown_extensions:
- attr_list
- admonition
- pymdownx.details
- pymdownx.highlight:
anchor_linenums: true
auto_title: false
- pymdownx.superfences
- pymdownx.arithmatex:
generic: true
- md_in_html
- pymdownx.emoji:
emoji_index: !!python/name:material.extensions.emoji.twemoji
emoji_generator: !!python/name:material.extensions.emoji.to_svg
- pymdownx.snippets

extra_javascript:
- javascripts/katex.js
Expand Down

0 comments on commit ec2ddbe

Please sign in to comment.