def _try_set_expectation_value_from_factory(self) -> None: if self.operator is not None and self.quantum_instance is not None: self._set_expectation( ExpectationFactory.build(operator=self.operator, backend=self.quantum_instance, include_custom=self._include_custom))
def _try_set_expectation_value_from_factory(self): if self.operator and self.quantum_instance: self.expectation = ExpectationFactory.build(operator=self.operator, backend=self.quantum_instance, include_custom=self._include_custom)