Skip to content

Commit

Permalink
rm dunder
Browse files Browse the repository at this point in the history
  • Loading branch information
Charles MOUSSA committed Jan 8, 2025
1 parent 2e2a811 commit d066a63
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions horqrux/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,15 @@ def sample(


@singledispatch
def __ad_expectation_single_observable(
def _ad_expectation_single_observable(
state: Any,
observable: Primitive,
values: dict[str, float],
) -> Any:
raise NotImplementedError("__ad_expectation_single_observable is not implemented")
raise NotImplementedError("_ad_expectation_single_observable is not implemented")


@__ad_expectation_single_observable.register
@_ad_expectation_single_observable.register
def _(
state: Array,
observable: Primitive,
Expand All @@ -92,7 +92,7 @@ def _(
return inner(state, projected_state).real


@__ad_expectation_single_observable.register
@_ad_expectation_single_observable.register
def _(
state: DensityMatrix,
observable: Primitive,
Expand Down Expand Up @@ -124,7 +124,7 @@ def ad_expectation(
Array: Expectation values.
"""
outputs = [
__ad_expectation_single_observable(
_ad_expectation_single_observable(
apply_gate(state, gates, values, OperationType.UNITARY), observable, values
)
for observable in observables
Expand Down

0 comments on commit d066a63

Please sign in to comment.