Skip to content

Commit

Permalink
Adjust doc strings
Browse files Browse the repository at this point in the history
  • Loading branch information
alleSini99 committed Oct 24, 2023
1 parent 49af77f commit 3f3ccb2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
14 changes: 7 additions & 7 deletions netket_fidelity/infidelity/logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ def InfidelityOperator(
U_dagger = U.H
if isinstance(U_dagger, Adjoint):
raise TypeError(
"Must explicitly pass a jax-compatible operator as `U_dagger`."
"You either did not pass `U_dagger` explicitly or you used `U.H` but should"
"use operators coming from `netket_fidelity`."
"Must explicitly pass a jax-compatible operator as `U_dagger`. "
"You either did not pass `U_dagger` explicitly or you used `U.H` but should "
"use operators coming from `netket_fidelity`. "
)

if isinstance(target, FullSumState):
Expand All @@ -132,14 +132,14 @@ def InfidelityOperator(
if not is_unitary and not sample_Upsi:
raise ValueError(
"Non-unitary operators can only be handled by sampling from the state U|ψ⟩. "
"This is more expensive and disabled by default."
"This is more expensive and disabled by default. "
""
"If your operator is Unitary, please specify so by passing `is_unitary=True` as a "
"keyword argument."
"keyword argument. "
""
"If your operator is not unitary, please specify `sample_Upsi=True` explicitly to"
"sample from that state."
"You can also sample from U|ψ⟩ if your operator is unitary."
"sample from that state. "
"You can also sample from U|ψ⟩ if your operator is unitary. "
""
)

Expand Down
4 changes: 2 additions & 2 deletions netket_fidelity/infidelity/overlap_U/operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ def __init__(

if not is_unitary and not isinstance(state, FullSumState):
raise ValueError(
"Only works with unitary gates. If the gate is non unitary"
" then you must sample from it. Use a different operator."
"Only works with unitary gates. If the gate is non unitary "
"then you must sample from it. Use a different operator."
)

if cv_coeff is not None:
Expand Down
1 change: 0 additions & 1 deletion netket_fidelity/renyi2/operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ def __init__(
Returns:
Rényi2 operator for which computing expected value.
Example:
"""

super().__init__(hilbert)
Expand Down

0 comments on commit 3f3ccb2

Please sign in to comment.