inquanto-hamlib¶
InQuanto Dummy extension.
- class HamLibDatasetLoader(url)¶
Creates a dataset loader to load fermion operators, qubit operators and their properties from HDF5 and CSV files.
- Parameters:
url (
str) – URL of a HDF5 or CSV file.
Note
Example
>>> base_url = "https://portal.nersc.gov/cfs/m888/dcamps/hamlib/" >>> path = "chemistry/electronic/hydrogen_data/H2_linear/ES_H2_linear_R0.5_sto-6g.zip" >>> loader = HamLibDatasetLoader(base_url + path)
- get_fermion_operator(key='ham_molec')¶
Create a fermion operator from HDF5 file at given key.
- Parameters:
key (
str, default:"ham_molec") – Key of the operator dataset.- Returns:
FermionOperator– FermionOperator object.
- get_qubit_operator(key='ham_JW')¶
Create a qubit operator from HDF5 file at given key.
- Parameters:
key (
str, default:"ham_JW") – Key of the operator dataset.- Returns:
QubitOperator– QubitOperator object.
- print_hdf5_ham_properties()¶
Print properties of a hamiltonian from a given HDF5 file using ‘ham_props’ key.
Useful for chemistry examples.
- Return type:
- print_hdf5_structure()¶
Print path structure of given HDF5 file. Useful especially for chemistry examples.
- Return type:
- print_keys_csv(index_range=None, string_search=None)¶
Print keys from a CSV file, used later to read operators from HDF5 files.
Optional index range and string search key can be used to filer the results. Useful for condensed matter examples.