Skip to content

Commit d8af88a

Browse files
committed
Fix for compile error
1 parent 67fa469 commit d8af88a

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

tests/gputests.cpp

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,17 @@ BOOST_DATA_TEST_CASE(random_circuits_test, numGates, nGates) {
209209
BOOST_CHECK_CLOSE(probStatevector, probTN, 1);
210210
}
211211

212-
auto resultsStatevector = gpusimStatevector != nullptr ? gpusimStatevector->SampleCounts(qubits, nrShots) : std::map<Types::qubit_vector, int>();
213-
auto resultsMPS = gpusimMPS != nullptr ? gpusimMPS->SampleCounts(qubits, nrShots) : std::map<Types::qubit_vector, int>();
214-
auto resultsTN = gpusimTN != nullptr ? gpusimTN->SampleCounts(qubits, nrShots) : std::map<Types::qubit_vector, int>();
212+
auto resultsStatevector =
213+
gpusimStatevector != nullptr
214+
? gpusimStatevector->SampleCounts(qubits, nrShots)
215+
: std::unordered_map<Types::qubit_t, Types::qubit_t>();
216+
auto resultsMPS =
217+
gpusimMPS != nullptr
218+
? gpusimMPS->SampleCounts(qubits, nrShots)
219+
: std::unordered_map<Types::qubit_t, Types::qubit_t>();
220+
auto resultsTN = gpusimTN != nullptr
221+
? gpusimTN->SampleCounts(qubits, nrShots)
222+
: std::unordered_map<Types::qubit_t, Types::qubit_t>();
215223

216224
for (const auto& [outcome, count] : resultsStatevector) {
217225
if (static_cast<double>(count) / nrShots < 0.01) continue;

0 commit comments

Comments
 (0)