quspin.operators.save_zip
- quspin.operators.save_zip(archive, op, save_basis=True)[source]
Save a quantum_operator to a zip archive to be used later.
- Parameters:
- archivestr
name of archive, including path.
- opquantum_operator object
operator which you would like to save to disk
- save_basisbool
flag which tells code whether to save basis attribute of op, if it has such an attribute. some basis objects may not be able to be pickled, therefore attempting to save them will fail if this is the case, then set this flag to be False.
Notes
In order to keep formatting consistent, this function will always overwrite any file with the same name archive. This means that you can not append data to an existing archive. If you would like to combine data, either construct everything together and save or combine different quantum_oeprator objects using the + operator in python.