Skip to content

OpSum, TOML#1

Merged
awietek merged 8 commits intoawietek:mainfrom
Last-Hope-024:main
Mar 31, 2025
Merged

OpSum, TOML#1
awietek merged 8 commits intoawietek:mainfrom
Last-Hope-024:main

Conversation

@Last-Hope-024
Copy link
Contributor

This pull request introduces the following changes:

  1. Renamed bonds.jl to opsum.jl

    • Users can now define operators using Op and collect them all in an OpSum.
  2. Modified and tested the functions neighbor_bonds! and lattice_bonds

    • Both functions now work and return an OpSum().
  3. Added write_OpSum_to_toml! functionality

    • Introduced an optional index_zero argument to enable zero-based indexing for site indices when writing to a TOML file.
  4. Created an examples folder with two scripts

    • One for the triangular lattice and another for the Shastry-Sutherland lattice.
  5. Added inline comments and documentation

@Last-Hope-024
Copy link
Contributor Author

Included function to plots the interactions bonds in OpSum()

Copy link
Owner

@awietek awietek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you Rafael, this looks great. I would have one comment about naming conventions. I would like to stick to CamelCase for classes, e.g. OpSum, and snake_case for functions. Thus, I would like to ask you to rename:

plotOpSum -> plot_opsum
write_OpSum_to_toml -> write_opsum_to_toml
plotops -> plot_ops

Also, I would like to ask you to add a "docstring" explaining the functions and parameters. I think it would be great if this showed up in the documentation.

Anyway, great work.

@awietek awietek merged commit e267723 into awietek:main Mar 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants