From 271a31fd2bf5919f04e6a05913ea64648304e0fb Mon Sep 17 00:00:00 2001 From: knakaji Date: Wed, 6 Dec 2023 18:04:05 -0500 Subject: [PATCH] add future --- qswift/compiler.py | 7 +------ setup.py | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/qswift/compiler.py b/qswift/compiler.py index cbd5567..df1f89a 100644 --- a/qswift/compiler.py +++ b/qswift/compiler.py @@ -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): diff --git a/setup.py b/setup.py index d784e70..fb893b8 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name="qswift", - version="0.0.17", + version="0.0.18", author="kouhei nakaji", author_email="nakajijiji@gmail.com", description="You can receive the message 'Hello!!!'",