diff --git a/src/controllers/state_controller.hpp b/src/controllers/state_controller.hpp index 0977735add..30b1910078 100644 --- a/src/controllers/state_controller.hpp +++ b/src/controllers/state_controller.hpp @@ -1421,6 +1421,9 @@ std::vector AerState::probabilities() { op.string_params.push_back("s"); op.save_type = Operations::DataSubType::list; + for (uint_t i = 0; i < num_of_qubits_; ++i) + op.qubits.push_back(i); + last_result_ = ExperimentResult(); state_->apply_op(op, last_result_, rng_);