Skip to content

Commit

Permalink
Enhanced to be able to call probability for the stabilizer simulator
Browse files Browse the repository at this point in the history
  • Loading branch information
aromanro committed Nov 15, 2024
1 parent 7f7c1ba commit 7215ea3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/controllers/state_controller.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1381,6 +1381,9 @@ double AerState::probability(const uint_t outcome) {
op.int_params.push_back(outcome);
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_);

Expand Down

0 comments on commit 7215ea3

Please sign in to comment.