-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Thomas Applencourt
committed
Jul 26, 2023
1 parent
c98620a
commit 31a3221
Showing
1 changed file
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#include "qpx.hpp" | ||
#include <determinant.hpp> | ||
#include <benchmark/benchmark.h> | ||
|
||
static void ComputePhaseAndApplyExcitation(benchmark::State& state) { | ||
|
||
const auto n_orbital = 1024; | ||
const auto n_elec = 129; | ||
|
||
auto alpha = spin_det_t(n_orbital); | ||
auto beta = spin_det_t(n_elec); | ||
alpha.set(0, n_elec, 1); | ||
|
||
det_t s{alpha, beta}; | ||
for(auto _ : state) { | ||
auto d = apply_single_spin_excitation(s, 0, 0, n_elec+1); | ||
benchmark::DoNotOptimize(d); | ||
} | ||
} | ||
|
||
BENCHMARK(ComputePhaseAndApplyExcitation); | ||
BENCHMARK_MAIN(); |