Full Configuration Interaction
- class pydmqmc.methods.FullConfigurationInteraction(system)
Bases:
AnalyticPerform full configuration interaction (FCI) for a given Hamiltonian.
FCI is accomplished by performing exact diagonalization.
Attributes
FCI energies.
Whether or not the calculation has been run.
The System object to which this method is applied.
FCI wavefunctions.
Methods
run()Find the exact solution to the Schrodinger equation.
save_data(basename[, energy_filetype, ...])Save the final energies and wavefunctions to file.
Warning
The supplied system must have a hermtian Hamiltonian.
- run()
Find the exact solution to the Schrodinger equation.
Internally, uses numpy.linalg.eigh. The eigenvalues and eigenvectors are stored as the energies and wavefunctions attributes, respectively.
- save_data(basename, energy_filetype='csv', wavefunction_filetype='csv', pickle_protocol=None)
Save the final energies and wavefunctions to file.
The basename and filetype parameters will be used to construct filenames for all of the data written to file. For example, if basename is “test_run” and the energy_ and wavefunction_filetype are both “csv”, the energies will be saved to “test_run_energies.csv” and the wavefunctions will be saved to “test_run_wavefunctions.csv”.
- Parameters:
- basenamestr
Base name used to construct the filenames for the energies and wavefunctions
- energy_filetype, wavefunction_filetypestr, default “csv”
File type (aka extension) with which to save the energies. Supported types are:
“csv” : comma-separated value file
“npy” : NumPy binary file
“pkl” : Python pickle file
“txt” : text file (space-delimited)
- pickle_protocolunt, optional
Protocol version to use if either filetype is “pkl”. If none, uses pickle’s default.
- property energies
FCI energies.
- property ran_calculation
Whether or not the calculation has been run.
- property system
The System object to which this method is applied.
- property wavefunctions
FCI wavefunctions.