# What does "Error '00' mean?

**URL:** <https://discuss.pennylane.ai/t/what-does-error-00-mean/9347>\
**Category:** Codebook\
**Created:** [May 18, 2026, 9:10pm UTC](https://discuss.pennylane.ai/t/what-does-error-00-mean/9347 "2026-05-18T21:10:25Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![fyellin](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/fyellin/32/4296_2.png) [@fyellin](https://discuss.pennylane.ai/u/fyellin)\
**Post date:** [May 18, 2026, 9:10pm UTC](https://discuss.pennylane.ai/t/what-does-error-00-mean/9347/1 "2026-05-18T21:10:25Z")

</div>

I’m running PF.5.1. My code runs. I get the printed output:

```auto
the success probability is 0.2524

```

which is roughly what I expected but then above that I see a red stripe above my user output with the message `Error '00'`. My answer isn’t accepted and I have no idea what it is trying to tell me.

My code is:

```auto
@qml.qnode(dev)
def circuit(bomb: bool = False):
    qp.H(0)
    if bomb:
        # If I get a 1, the bomb explodes. I continue with 0
        qp.measure(wires=0, postselect=0)
    qp.H(0)
    # If I measure a 1, then it's definitely not a bomb.
    # This measurement isn't really necessary.
    qp.measure(wires=0)
    return qp.counts(wires = 0)

result = circuit(True)
prob_success = result.get('1', 0) / n_shots
print('the success probability is', prob_success)

```

I’d love to know both what is wrong with my code and what this cryptic error means.

---

<div class="post-metadata">

**Author:** ![dren](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/dren/32/4183_2.png) [@dren](https://discuss.pennylane.ai/u/dren)\
**Post date:** [May 19, 2026, 8:28pm UTC](https://discuss.pennylane.ai/t/what-does-error-00-mean/9347/2 "2026-05-19T20:28:30Z")

</div>

Hi @fyellin , welcome to the forum! We’re excited that you’re here.

As a hint, `circuit` should not have an input i.e., running `circuit()` should yield the desired result.

`Error '00'` indicates that we are expecting an output key called `00` but cannot find it.

More broadly, the task is looking for the counts of two different measurements: `m_bomb` and `m_det`.

I hope these tips help!

Best wishes,

David

---

<div class="post-metadata">

**Author:** ![fyellin](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/fyellin/32/4296_2.png) [@fyellin](https://discuss.pennylane.ai/u/fyellin)\
**Post date:** [May 20, 2026, 5:35am UTC](https://discuss.pennylane.ai/t/what-does-error-00-mean/9347/3 "2026-05-20T05:35:16Z")

</div>

I did eventually figure out that that’s what the error message had to mean. It does seem strange that the puzzle not only wants you to get the right answer, but wants you to get it the correct method.

I’m now struggling with Part 2. The obvious solution is in the inconclusive case, just run the test again. The bomb will go off 75% of the time, but I’ll know there’s a bomb 25% + 25%/4 = 31.25% of the time. There is nothing I can do with the qubit after the detector measurement. The qubit is definitively |0\> or |1\>.

I could rotate the qubit so that I was measuring it halfway between |+\> and |0\>, but that would give me both false positives and false negatives.

When I run the following code:

```auto
@qp.qnode(dev)
def circuit():
    # |0> -> |+>
    qp.H(0)

    # No bomb. q0 unchanged.
    # Bomb |0> Bomb doesn't explode. q0 = |0>
    # Bomb |1> Bomb explodes. q0 = |1> But we throw away this case!
    m_bomb = qp.measure(wires=0, postselect=0)

    # Bomb: |0> => |+>
    # No bomb: |+> => |0>
    qp.H(0)

    # Bomb: Measurement. 50% |0> + 50% |1>
    # No bomb: Measurement. 100% |0>
    # Measurement of |1> unambiguously indicates a bomb
    # Measurement of |0> is ambigous.  
    m_det_1 = qp.measure(wires=0, reset=True)

    # Run the same test again in the ambiguous case, having reset the qubit.
    qp.cond(m_det_1 == 0, qp.H)(0)
    m_bomb_2 = qp.measure(wires=0)
    qp.cond(m_det_1 == 0, qp.H)(0)
    m_det_2 = qp.measure(wires=0)

    return qp.counts([m_bomb, m_det_1]), qp.counts([m_bomb_2, m_det_2])

results1, results2 = circuit()
prob_suc = (results1['01'] + results2['01']) / n_shots
print("The success probability is", prob_suc)

```

I get the right answer, but get the error message “Error: Your quantum circuit isn’t quite right.” Not helpful at all. I wished the text gave me some indication of what it wanted, rather than letting me know I’ve got the wrong right answer.

---

<div class="post-metadata">

**Author:** ![dren](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/dren/32/4183_2.png) [@dren](https://discuss.pennylane.ai/u/dren)\
**Post date:** [May 22, 2026, 10:18pm UTC](https://discuss.pennylane.ai/t/what-does-error-00-mean/9347/4 "2026-05-22T22:18:40Z")

</div>

Hi @fyellin , thanks for your question. Glad to see that you are progressing with that topic!

It is a harder topic because it is more open-ended, so it’s natural to encounter problems. The prompt also leaves a little unexplained.

For PF.5.1., we discarded all instances when the first detector provided an inconclusive result. Now, we are trying to recover useful information when that happens with `qp.cond`.

Firstly, resetting the qubit in m\_det\_1 is not advisable because the outcome is guaranteed to be |0\rangle. Secondly, regarding the language, our convention at the first detector is: |1\rangle if there is a bomb there. Thirdly, just like in PF.5.1, you have a circuit with post-selection. You might want to try that in the second part 😉

I hope this helps!

---

<div class="post-metadata">

**Author:** ![fyellin](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/fyellin/32/4296_2.png) [@fyellin](https://discuss.pennylane.ai/u/fyellin)\
**Post date:** [May 23, 2026, 3:28pm UTC](https://discuss.pennylane.ai/t/what-does-error-00-mean/9347/5 "2026-05-23T15:28:42Z")

</div>

Yes. I had managed to finish the puzzle. I am stubborn that way.

I realized that I was doing something that didn’t affect correctness but was unnecessary. Removing it make the grader happy.

---

<div class="post-metadata">

**Author:** ![dren](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/dren/32/4183_2.png) [@dren](https://discuss.pennylane.ai/u/dren)\
**Post date:** [May 25, 2026, 5:51pm UTC](https://discuss.pennylane.ai/t/what-does-error-00-mean/9347/6 "2026-05-25T17:51:54Z")

</div>

Outstanding work, @fyellin ! Keep going!

Out of curiosity, is there anything in particular you are learning PennyLane for?
