<jupyter_start><jupyter_text>Comparison of classical methods to calculate ground state energy Classical methods- Full Configuration Interaction - Tractable in simple basis set- Hartree Fock - Cheap but inaccurate- Coupled-Cluster Single Double - Expensive but accurate<jupyter_code>import numpy as np
import matplotlib.pyplot as plt
from utility import get_molecular_data, obtain_PES

basis = 'sto-3g'<jupyter_output><empty_output><jupyter_text>LiH- HF loses accuracy in larger $R$- Asymmetric nature of LiH seems to affect in HF<jupyter_code>bond_lengths = np.linspace(0.2,4,20)
#Run FCI
FCI_PES = obtain_PES('lih', bond_lengths, basis, method='fci', print_log=False)
#Run HF
HF_PES = obtain_PES('lih', bond_lengths, basis,  method='hf', print_log=False)
#Run CCSD
CCSD_PES = obtain_PES('lih', bond_lengths, basis,  method='ccsd', print_log=False)
#Plot LiH PESs

plt.title('LiH dissociation, STO-3G')
plt.xlabel('R, Angstrom')
plt.ylabel('E, Hartree')

plt.plot(bond_lengths, FCI_PES, label='FCI')
plt.scatter(bond_lengths, HF_PES, label='HF', color='orange')
plt.scatter(bond_lengths, CCSD_PES, label='CCSD', color='purple')
plt.legend()

print()<jupyter_output><jupyter_text>H$_4$- HF is not accurate<jupyter_code>angles = np.linspace(85,95,20)
#Run FCI
FCI_PES = obtain_PES('h4',angles, basis, method='fci', print_log=False)
#Run HF
HF_PES = obtain_PES('h4', angles, basis,  method='hf', print_log=False)
#Run CCSD
CCSD_PES = obtain_PES('h4', angles, basis,  method='ccsd', print_log=False)
#Plot H2O PESs

plt.title('H4, STO-3G')
plt.xlabel('Θ,　Degree')
plt.ylabel('E, Hartree')

plt.plot(angles, FCI_PES, label='FCI')
plt.scatter(angles, HF_PES, label='HF', color='orange')
plt.scatter(angles, CCSD_PES, label='CCSD', color='purple')
plt.legend()<jupyter_output><empty_output><jupyter_text>NH$_3$- HF loses accuracy in larger $R$<jupyter_code>bond_lengths = np.linspace(0.2,2,20)
#Run FCI
FCI_PES = obtain_PES('nh3', bond_lengths, basis, method='fci', print_log=False)
#Run HF
HF_PES = obtain_PES('nh3', bond_lengths, basis,  method='hf', print_log=False)
#Run CCSD
CCSD_PES = obtain_PES('nh3', bond_lengths, basis,  method='ccsd', print_log=False)
#Plot NH3 PESs

plt.title('NH3, STO-3G')
plt.xlabel('R,　Angstrom')
plt.ylabel('E, Hartree')

plt.plot(bond_lengths, FCI_PES, label='FCI')
plt.scatter(bond_lengths, HF_PES, label='HF', color='orange')
plt.scatter(bond_lengths, CCSD_PES, label='CCSD', color='purple')
plt.legend()

print()<jupyter_output><jupyter_text>N$_2$- HF loses accuracy in larger $R$ but not so obvious<jupyter_code>bond_lengths = np.linspace(0.2,1.8,20)
#Run FCI
FCI_PES = obtain_PES('n2', bond_lengths, basis, method='fci', print_log=False)
#Run HF
HF_PES = obtain_PES('n2', bond_lengths, basis,  method='hf', print_log=False)
#Run CCSD
CCSD_PES = obtain_PES('n2', bond_lengths, basis,  method='ccsd', print_log=False)
#Plot NH3 PESs

plt.title('N2, STO-3G')
plt.xlabel('R,　Angstrom')
plt.ylabel('E, Hartree')

plt.plot(bond_lengths, FCI_PES, label='FCI')
plt.scatter(bond_lengths, HF_PES, label='HF', color='orange')
plt.scatter(bond_lengths, CCSD_PES, label='CCSD', color='purple')
plt.legend()
print()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.15486725663716813, 'fraction_numerical': 0.014222503160556258, 'mean_word_length': 7.816155988857939, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '208972', 'license': 'MIT', 'n_tokens_mistral': 1388, 'n_tokens_neox': 1255, 'n_words': 266, 'path': 'Project_2_VQE_Molecules/S1_Classical_Methods_solution.ipynb', 'repo_name': 'CDLQuantum2020Week2Team1/CohortProject_2020', 'size': '3164'}