Skip to content

Commit db4b7b7

Browse files
committed
1 parent b1d5a38 commit db4b7b7

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

qmb/_hamiltonian.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ auto prepare(py::dict hamiltonian) {
3737
auto coef = torch::empty({term_number, 2}, torch::TensorOptions().dtype(torch::kFloat64).device(torch::kCPU));
3838
// No need to initialize
3939

40-
auto site_accessor = site.template accessor<std::int16_t, 2>();
41-
auto kind_accessor = kind.template accessor<std::uint8_t, 2>();
42-
auto coef_accessor = coef.template accessor<double, 2>();
40+
auto site_accessor = site.accessor<std::int16_t, 2>();
41+
auto kind_accessor = kind.accessor<std::uint8_t, 2>();
42+
auto coef_accessor = coef.accessor<double, 2>();
4343

4444
std::int64_t index = 0;
4545
for (auto& item : hamiltonian) {

qmb/hamiltonian.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ def _load_module(cls, n_qubytes: int = 0, particle_cut: int = 0) -> object:
3131
f"{folder}/_hamiltonian_cuda.cu",
3232
],
3333
is_python_module=n_qubytes == 0,
34-
extra_cflags=["-O3", "-ffast-math", "-march=native", f"-DN_QUBYTES={n_qubytes}", f"-DPARTICLE_CUT={particle_cut}"],
35-
extra_cuda_cflags=["-O3", "--use_fast_math", f"-DN_QUBYTES={n_qubytes}", f"-DPARTICLE_CUT={particle_cut}"],
34+
extra_cflags=["-O3", "-ffast-math", "-march=native", f"-DN_QUBYTES={n_qubytes}", f"-DPARTICLE_CUT={particle_cut}", "-std=c++20"],
35+
extra_cuda_cflags=["-O3", "--use_fast_math", f"-DN_QUBYTES={n_qubytes}", f"-DPARTICLE_CUT={particle_cut}", "-std=c++20"],
3636
build_directory=build_directory,
3737
)
3838
if n_qubytes == 0: # pylint: disable=no-else-return

0 commit comments

Comments
 (0)