Skip to content
This repository was archived by the owner on Jun 15, 2023. It is now read-only.

Commit bb85097

Browse files
🎨 clang-format changes
1 parent 17092ec commit bb85097

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

include/DDpackage.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,15 +156,15 @@ namespace dd {
156156
// Three types since different possibilities for complex numbers (caused by caching)
157157
// weights of operands and result are from complex table (e.g., transpose, conjugateTranspose)
158158
std::array<std::array<CTentry1, CTSLOTS>, modeCount> CTable1{};
159-
std::array<std::size_t, modeCount> CT1count{};
159+
std::array<std::size_t, modeCount> CT1count{};
160160

161161
// weights of operands are from complex table, weight of result from cache/ZERO (e.g., mult)
162162
std::array<std::array<CTentry2, CTSLOTS>, modeCount> CTable2{};
163-
std::array<std::size_t, modeCount> CT2count{};
163+
std::array<std::size_t, modeCount> CT2count{};
164164

165165
// weights of operands and result are from cache/ZERO (e.g., add)
166166
std::array<std::array<CTentry3, CTSLOTS>, modeCount> CTable3{};
167-
std::array<std::size_t, modeCount> CT3count{};
167+
std::array<std::size_t, modeCount> CT3count{};
168168

169169
// Toffoli gate table
170170
std::array<TTentry, TTSLOTS> TTable{};

test/bench_package.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -363,10 +363,10 @@ static void BM_MxV_GHZ(benchmark::State& state) {
363363
sv = dd->multiply(h, sv);
364364
line[nqubits - 1] = 1;
365365
for (int i = nqubits - 2; i >= 0; --i) {
366-
line[std::min(nqubits-2, i+1)] = -1;
367-
line[i] = 2;
368-
auto cx = dd->makeGateDD(dd::Xmat, nqubits, line);
369-
sv = dd->multiply(cx, sv);
366+
line[std::min(nqubits - 2, i + 1)] = -1;
367+
line[i] = 2;
368+
auto cx = dd->makeGateDD(dd::Xmat, nqubits, line);
369+
sv = dd->multiply(cx, sv);
370370
}
371371
// clear compute table so the next iteration does not find the result cached
372372
dd->clearComputeTables();
@@ -405,10 +405,10 @@ static void BM_MxM_GHZ(benchmark::State& state) {
405405
auto func = dd->makeGateDD(dd::Hmat, nqubits, line);
406406
line[nqubits - 1] = 1;
407407
for (int i = nqubits - 2; i >= 0; --i) {
408-
line[std::min(nqubits-2, i+1)] = -1;
409-
line[i] = 2;
410-
auto cx = dd->makeGateDD(dd::Xmat, nqubits, line);
411-
func = dd->multiply(cx, func);
408+
line[std::min(nqubits - 2, i + 1)] = -1;
409+
line[i] = 2;
410+
auto cx = dd->makeGateDD(dd::Xmat, nqubits, line);
411+
func = dd->multiply(cx, func);
412412
}
413413
// clear compute table so the next iteration does not find the result cached
414414
dd->clearComputeTables();

0 commit comments

Comments
 (0)