Skip to content

Commit

Permalink
Renyi2 as optional
Browse files Browse the repository at this point in the history
  • Loading branch information
alleSini99 committed Oct 31, 2023
1 parent c6356c6 commit 8dea0f4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import jax

from RBM_Jastrow_measurement import RBMJasMeas
from netket_fidelity.renyi2 import Renyi2EntanglementEntropy

# Set the parameters
L = 2
Expand Down Expand Up @@ -64,7 +65,7 @@

# Instantiate the Renyi2 entropy to monitor
subsys = [x for x in range(N // 2)]
S2op = nkf.Renyi2EntanglementEntropy(hi, subsys)
S2op = Renyi2EntanglementEntropy(hi, subsys)


# Compute the probabilities for the measurement outcomes of a spin
Expand Down
3 changes: 1 addition & 2 deletions netket_fidelity/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
from . import driver

from .infidelity import InfidelityOperator
from .renyi2 import Renyi2EntanglementEntropy

from netket.utils import _hide_submodules

_hide_submodules(__name__, hide_folder=["renyi2", "infidelity"])
_hide_submodules(__name__, hide_folder=["infidelity"])
3 changes: 2 additions & 1 deletion test/test_Renyi2.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import netket_fidelity as nkf

from ._Renyi2_exact import _Renyi2_exact
from netket_fidelity.renyi2 import Renyi2EntanglementEntropy

N = 3
hi = nk.hilbert.Spin(0.5, N)
Expand All @@ -29,7 +30,7 @@ def _setup():
)

subsys = [0, 1]
S2 = nkf.Renyi2EntanglementEntropy(hi, subsys)
S2 = Renyi2EntanglementEntropy(hi, subsys)

return vs, vs_exact, S2, subsys

Expand Down

0 comments on commit 8dea0f4

Please sign in to comment.