Skip to content

Commit

Permalink
swap to abstractobservables
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilipVinc committed Mar 3, 2024
1 parent e5319d8 commit 0832c3a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion netket_fidelity/infidelity/overlap/operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import jax.numpy as jnp

from netket.experimental.observable import AbstractObservable

from netket.operator import AbstractOperator, DiscreteJaxOperator
from netket.utils.types import DType
Expand All @@ -11,7 +12,7 @@
from netket_fidelity.utils.sampling_Ustate import make_logpsi_U_afun


class InfidelityOperatorStandard(AbstractOperator):
class InfidelityOperatorStandard(AbstractObservable):
def __init__(
self,
target: VariationalState,
Expand Down
4 changes: 3 additions & 1 deletion netket_fidelity/infidelity/overlap_U/operator.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
from typing import Optional
import jax.numpy as jnp

from netket.experimental.observable import AbstractObservable

from netket.operator import AbstractOperator
from netket.utils.types import DType
from netket.utils.numbers import is_scalar
from netket.vqs import VariationalState, FullSumState


class InfidelityOperatorUPsi(AbstractOperator):
class InfidelityOperatorUPsi(AbstractObservable):
def __init__(
self,
U: AbstractOperator,
Expand Down

0 comments on commit 0832c3a

Please sign in to comment.