Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Potts edits #29

Merged
merged 33 commits into from
Oct 30, 2024
Merged

Potts edits #29

merged 33 commits into from
Oct 30, 2024

Conversation

borisdevos
Copy link
Contributor

generalise the Potts operators for arbitrary Q, as well as tests to check these for Q=4 and Q=5.

Copy link

codecov bot commented Oct 14, 2024

Codecov Report

Attention: Patch coverage is 84.31373% with 8 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/operators/spinoperators.jl 89.58% 5 Missing ⚠️
src/models/hamiltonians.jl 0.00% 3 Missing ⚠️
Files with missing lines Coverage Δ
src/models/hamiltonians.jl 21.81% <0.00%> (+1.81%) ⬆️
src/operators/spinoperators.jl 90.57% <89.58%> (+10.85%) ⬆️

... and 1 file with indirect coverage changes

Copy link
Member

@lkdvos lkdvos left a comment

Choose a reason for hiding this comment

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

This is definitely a great first PR!
I have just a couple remarks before we can get this merged:

Could you run the formatter, such that the formatter check is happy? This is done file-by-file in VSCode by rightclicking the file and selecting the format option, or for an entire directory (and its subdirectories) by:

using JuliaFormatter
format("path_to_directory")

I think we could consider renaming the operators a bit. U_matrix and V_matrix don't give too much information, and could be anything, so I would suggest:
potts_X and potts_Z, as generalizations to pauli_X etc.

Note that our convention is to have XX + Z as the Ising model, as Z is diagonal in the symmetry basis, so this would mean writing the model as \sum_i potts_XX^i + potts_Z^i or something to keep the consistency. (ie, potts_X should be the non-diagonal one in the symmetric basis!). If this is very strange, we can also consider changing the convention in the ising model to have X be diagonal, but that is somehow also strange to me.

I think it would be very nice if the operators themselves could be tested as well. I am mostly considering Z^q = 1, and the commutation relations, which should be relatively straightforward to test? See also this file

Finally, it is nice for discoverability to have them added to the docs as well. Probably somewhere here would be perfect.

src/operators/spinoperators.jl Outdated Show resolved Hide resolved
src/operators/spinoperators.jl Show resolved Hide resolved
test/potts.jl Outdated Show resolved Hide resolved
test/potts.jl Outdated Show resolved Hide resolved
test/potts.jl Outdated Show resolved Hide resolved
src/operators/spinoperators.jl Outdated Show resolved Hide resolved
@lkdvos lkdvos merged commit 66c9788 into QuantumKitHub:master Oct 30, 2024
10 checks passed
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