TPBGroupedWeightedPauliOperator.from_file

classmethod TPBGroupedWeightedPauliOperator.from_file(file_name, before_04=False)

Load paulis in a file to construct an Operator.

Parameters
  • file_name (str) – path to the file, which contains a list of Paulis and coefficients.

  • before_04 (bool) – support the format before Aqua 0.4.

Returns

the loaded operator.

Return type

WeightedPauliOperator