Save FermionOperator or QubitOperator to file.
openfermion.utils.save_operator(
operator,
file_name=None,
data_directory=None,
allow_overwrite=False,
plain_text=False
)
Args |
operator
|
An instance of FermionOperator, BosonOperator,
or QubitOperator.
|
file_name
|
The name of the saved file.
|
data_directory
|
Optional data directory to change from default data
directory specified in config file.
|
allow_overwrite
|
Whether to allow files to be overwritten.
|
plain_text
|
Whether the operator should be saved to a
plain-text format for manual analysis
|
Raises |
OperatorUtilsError
|
Not saved, file already exists.
|
TypeError
|
Operator of invalid type.
|
TypeError
|
Coefficients in Operator sympy expressions.
|