Skip to content

Commit 4cd92f9

Browse files
author
XIN XIE
committed
Handle zero-qubit gates in NEON simulator
1 parent 8f002a6 commit 4cd92f9

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

lib/simulator_neon.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ class SimulatorNEON final : public SimulatorBase {
4949
// Assume qs[0] < qs[1] < qs[2] < ... .
5050

5151
switch (qs.size()) {
52+
case 0:
53+
ApplyGateH<0>(qs, matrix, state);
54+
return;
5255
case 1:
5356
if (qs[0] > 1) {
5457
ApplyGateH<1>(qs, matrix, state);

0 commit comments

Comments
 (0)