minor update on qpe test result report
@@ -19,7 +19,7 @@ import unittest
from parameterized import parameterized
from collections import OrderedDict
import numpy as np
-
+from qiskit_acqua.utils import decimal_to_binary
from qiskit_acqua import get_algorithm_instance, get_initial_state_instance, get_iqft_instance
from test.common import QISKitAcquaChemistryTestCase
from qiskit_acqua_chemistry.drivers import ConfigurationManager
@@ -94,7 +94,14 @@ class TestEnd2EndWithQPE(QISKitAcquaChemistryTestCase):
self.log.debug('translation: {}'.format(result['translation']))
self.log.debug('final energy from QPE: {}'.format(result['energy']))
self.log.debug('reference energy: {}'.format(self.reference_energy))
- self.log.debug('ref energy (transformed) {}'.format((self.reference_energy + result['translation']) * result['stretch']))
+ self.log.debug('ref energy (transformed): {}'.format(
+ (self.reference_energy + result['translation']) * result['stretch'])
+ )
+ self.log.debug('ref binary str label: {}'.format(decimal_to_binary(
+ (self.reference_energy + result['translation']) * result['stretch'],
+ max_num_digits=n_ancillae + 3,
+ fractional_part_only=True
+ )))
np.testing.assert_approx_equal(result['energy'], self.reference_energy, significant=2)
