Skip to content

Commit 7215ea3

Browse files
committed
Enhanced to be able to call probability for the stabilizer simulator
1 parent 7f7c1ba commit 7215ea3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/controllers/state_controller.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1381,6 +1381,9 @@ double AerState::probability(const uint_t outcome) {
13811381
op.int_params.push_back(outcome);
13821382
op.save_type = Operations::DataSubType::list;
13831383

1384+
for (uint_t i = 0; i < num_of_qubits_; ++i)
1385+
op.qubits.push_back(i);
1386+
13841387
last_result_ = ExperimentResult();
13851388
state_->apply_op(op, last_result_, rng_);
13861389

0 commit comments

Comments
 (0)