Skip to content

Commit

Permalink
add future
Browse files Browse the repository at this point in the history
  • Loading branch information
konakaji committed Dec 6, 2023
1 parent 91d5c6f commit 271a31f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
7 changes: 1 addition & 6 deletions qswift/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,7 @@ def compute(self, code, **kwargs):
for operator in operators:
self.add_gate(qc, operator, self._tau, ancilla_index, targets)
if isinstance(operator, MeasurementOperator):
tmp = self._observables[operator.j].get_value(qc, self._nshot, **kwargs)
if isinstance(tmp, float):
return coeff * tmp

return (coeff, tmp)

return coeff * self._observables[operator.j].get_value(qc, self._nshot, **kwargs)
raise AttributeError("measurement is not set")

def add_gate(self, qc: QWrapper, operator: Operator, tau, ancilla_index, targets):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="qswift",
version="0.0.17",
version="0.0.18",
author="kouhei nakaji",
author_email="[email protected]",
description="You can receive the message 'Hello!!!'",
Expand Down

0 comments on commit 271a31f

Please sign in to comment.