Changed s_q to spin
@@ -341,12 +341,12 @@ class Hamiltonian(ChemistryOperator):
if 'aux_ops' in algo_result and len(algo_result['aux_ops']) > 0:
aux_ops = algo_result['aux_ops'][0]
num_particles = aux_ops[0][0]
- s_squared = aux_ops[1][0]
- s_q = (-1.0 + np.sqrt(1 + 4 * s_squared)) / 2
+ spin_squared = aux_ops[1][0]
+ spin = (-1.0 + np.sqrt(1 + 4 * spin_squared)) / 2
m = aux_ops[2][0]
lines.append(
' Measured:: Num particles: {:.3f}, S: {:.3f}, M: {:.5f}'.format(
- num_particles, s_q, m))
+ num_particles, spin, m))
result['energy'] = self._nuclear_repulsion_energy + egse
result['nuclear_repulsion_energy'] = self._nuclear_repulsion_energy
if self._hf_energy is not None:
@@ -378,12 +378,12 @@ class Hamiltonian(ChemistryOperator):
for i in range(len(algo_result['aux_ops'])):
aux_ops = algo_result['aux_ops'][i]
num_particles = aux_ops[0][0]
- s_squared = aux_ops[1][0]
- s_q = (-1.0 + np.sqrt(1 + 4 * s_squared)) / 2
+ spin_squared = aux_ops[1][0]
+ spin = (-1.0 + np.sqrt(1 + 4 * spin_squared)) / 2
m = aux_ops[2][0]
lines.append(
' {:>3}: {: 16.12f}, {: 16.12f}, {:5.3f}, {:5.3f}, {:8.5f}'.
- format(i, exste[i], algo_result['energies'][i], num_particles, s_q, m))
+ format(i, exste[i], algo_result['energies'][i], num_particles, spin, m))
else:
result['energies'] = [result['energy']]
