@property
def eigvals(self):
    'Return the eigenvalues of the specified tensor product observable.\n\n        This method uses pre-stored eigenvalues for standard observables where\n        possible.\n\n        Returns:\n            array[float]: array containing the eigenvalues of the tensor product\n            observable\n        '
    if (self._eigvals_cache is not None):
        return self._eigvals_cache
    standard_observables = {'PauliX', 'PauliY', 'PauliZ', 'Hadamard'}
    self._eigvals_cache = pauli_eigs(len(self.wires))
    obs_sorted = sorted(self.obs, key=(lambda x: [str(l) for l in x.wires.labels]))
    if (set(self.name) - standard_observables):
        self._eigvals_cache = np.array([1])
        for (k, g) in itertools.groupby(obs_sorted, (lambda x: (x.name in standard_observables))):
            if k:
                self._eigvals_cache = np.kron(self._eigvals_cache, pauli_eigs(len(list(g))))
            else:
                for ns_ob in g:
                    self._eigvals_cache = np.kron(self._eigvals_cache, ns_ob.eigvals)
    return self._eigvals_cache
Return the eigenvalues of the specified tensor product observable.

This method uses pre-stored eigenvalues for standard observables where
possible.

Returns:
    array[float]: array containing the eigenvalues of the tensor product
    observable
@property
def eigvals(self):
    'Return the eigenvalues of the specified tensor product observable.\n\n        This method uses pre-stored eigenvalues for standard observables where\n        possible.\n\n        Returns:\n            array[float]: array containing the eigenvalues of the tensor product\n            observable\n        '
    if (self._eigvals_cache is not None):
        return self._eigvals_cache
    standard_observables = {'PauliX', 'PauliY', 'PauliZ', 'Hadamard'}
    self._eigvals_cache = pauli_eigs(len(self.wires))
    obs_sorted = sorted(self.obs, key=(lambda x: [str(l) for l in x.wires.labels]))
    if (set(self.name) - standard_observables):
        self._eigvals_cache = np.array([1])
        for (k, g) in itertools.groupby(obs_sorted, (lambda x: (x.name in standard_observables))):
            if k:
                self._eigvals_cache = np.kron(self._eigvals_cache, pauli_eigs(len(list(g))))
            else:
                for ns_ob in g:
                    self._eigvals_cache = np.kron(self._eigvals_cache, ns_ob.eigvals)
    return self._eigvals_cache