diff --git a/src/framework/operations.hpp b/src/framework/operations.hpp index 17d8985fcb..f6c727c2b6 100644 --- a/src/framework/operations.hpp +++ b/src/framework/operations.hpp @@ -1775,7 +1775,7 @@ Op input_to_op_bfunc(const inputdata_t &input) { auto it = comp_table.find(relation); if (it == comp_table.end()) { std::stringstream msg; - msg << "Invalid bfunc relation string :\"" << it->first << "\"." + msg << "Invalid bfunc relation string :\"" << relation << "\"." << std::endl; throw std::invalid_argument(msg.str()); } else { diff --git a/src/simulators/density_matrix/densitymatrix_executor.hpp b/src/simulators/density_matrix/densitymatrix_executor.hpp index 8a1081aa09..29c7fd52f1 100644 --- a/src/simulators/density_matrix/densitymatrix_executor.hpp +++ b/src/simulators/density_matrix/densitymatrix_executor.hpp @@ -1323,7 +1323,7 @@ Executor::sample_measure(const reg_t &qubits, uint_t shots, #endif // Convert to SampleVector format - int_t npar = Base::parallel_state_update_; + uint_t npar = Base::parallel_state_update_; if (npar > local_samples.size()) npar = local_samples.size(); std::vector all_samples(shots, SampleVector(qubits.size())); diff --git a/src/simulators/density_matrix/densitymatrix_state.hpp b/src/simulators/density_matrix/densitymatrix_state.hpp index 4300fed0db..ed0855b073 100644 --- a/src/simulators/density_matrix/densitymatrix_state.hpp +++ b/src/simulators/density_matrix/densitymatrix_state.hpp @@ -1003,7 +1003,7 @@ std::vector State::sample_measure(const reg_t &qubits, allbit_samples = BaseState::qreg_.sample_measure(rnds); // Convert to bit format - int_t npar = BaseState::threads_; + uint_t npar = BaseState::threads_; if (npar > shots) npar = shots; std::vector all_samples(shots, SampleVector(qubits.size())); diff --git a/src/simulators/state.hpp b/src/simulators/state.hpp index 98b717222a..219eaa6bb0 100644 --- a/src/simulators/state.hpp +++ b/src/simulators/state.hpp @@ -259,7 +259,7 @@ class Base { // Maximum threads which may be used by the backend for OpenMP multithreading // Default value is single-threaded unless overridden - int threads_ = 1; + uint_t threads_ = 1; // Set a global phase exp(1j * theta) for the state bool has_global_phase_ = false; diff --git a/src/simulators/statevector/statevector_executor.hpp b/src/simulators/statevector/statevector_executor.hpp index 27193ff948..45777a0287 100644 --- a/src/simulators/statevector/statevector_executor.hpp +++ b/src/simulators/statevector/statevector_executor.hpp @@ -1241,7 +1241,7 @@ Executor::sample_measure(const reg_t &qubits, uint_t shots, #endif // Convert to SampleVector format - int_t npar = Base::parallel_state_update_; + uint_t npar = Base::parallel_state_update_; if (npar > local_samples.size()) npar = local_samples.size(); std::vector all_samples(shots, SampleVector(qubits.size()));