Skip to content
Snippets Groups Projects
Commit e76fec90 authored by Kostas Vilkelis's avatar Kostas Vilkelis :flamingo:
Browse files

compare against singleshot diagonalization

parent 227060ba
No related branches found
No related tags found
1 merge request!4Interface refactoring
Pipeline #178318 passed
......@@ -17,7 +17,8 @@ nk = 600
h_int = utils.builder_to_tb(int_builder, params)
h_0 = utils.builder_to_tb(graphene_builder)
guess = generate_guess(frozenset(h_int), len(list(h_0.values())[0]))
norbs = len(list(h_0.values())[0])
guess = generate_guess(frozenset(h_int), norbs)
model = Model(h_0, h_int, filling)
......@@ -39,12 +40,12 @@ profiler.stop()
profiler.write_html(path="timeProfile.html")
# %%
number = 1
number = 10
time_scf = timeit.timeit(scf_loop, number=number) / number
H = np.random.rand(nk, nk)
H += H.T.conj()
H = np.random.rand(nk, nk, norbs, norbs).astype(complex)
H += 1j * np.random.rand(nk, nk, norbs, norbs)
H += H.transpose(0, 1, 3, 2).conj()
time_diag = timeit.timeit(lambda: np.linalg.eigh(H), number=number) / number
print(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment