Skip to content

Commit

Permalink
Fix GPU batched execution (Qiskit#2014)
Browse files Browse the repository at this point in the history
* Fix GPU batched execution

* format
  • Loading branch information
doichanj committed Jan 16, 2024
1 parent 397abbe commit aff11ec
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
5 changes: 5 additions & 0 deletions releasenotes/notes/fix_batch_shots-837c066d8b993a2d.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
fixes:
- |
Fixed GPU batched shots optimization and GPU runtime parameter binding
failures caused by wrong checking of return condition
5 changes: 2 additions & 3 deletions src/simulators/batch_shots_executor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ void BatchShotsExecutor<state_t>::run_circuit_with_sampling(
return Executor<state_t>::run_circuit_with_sampling(circ, config, init_rng,
result_it);
}

Noise::NoiseModel dummy_noise;
state_t dummy_state;
int_t i;
Expand Down Expand Up @@ -580,8 +579,8 @@ void BatchShotsExecutor<state_t>::apply_ops_batched_shots_for_group(
apply_batched_noise_ops(i_group, noise_ops, result_it, rng);
}
} else {
if (!op->expr && !apply_batched_op(istate, *op, result_it, rng,
final_ops && (op + 1 == last))) {
if (!op->expr && apply_batched_op(istate, *op, result_it, rng,
final_ops && (op + 1 == last))) {
continue;
}
// call apply_op for each state
Expand Down

0 comments on commit aff11ec

Please sign in to comment.