# 'QubitUnitary' object is not callable Error for codercise I.9.2

**URL:** <https://discuss.pennylane.ai/t/qubitunitary-object-is-not-callable-error-for-codercise-i-9-2/9505>\
**Category:** Codebook\
**Created:** [September 17, 2026, 2:55am UTC](https://discuss.pennylane.ai/t/qubitunitary-object-is-not-callable-error-for-codercise-i-9-2/9505 "2026-09-17T02:55:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AmruthA](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/amrutha/32/4438_2.png) [@AmruthA](https://discuss.pennylane.ai/u/AmruthA)\
**Post date:** [September 17, 2026, 2:55am UTC](https://discuss.pennylane.ai/t/qubitunitary-object-is-not-callable-error-for-codercise-i-9-2/9505/1 "2026-09-17T02:55:20Z")

</div>

In codercise I.9.2 in the Measurements Codebook challenge, I get  
`Error: 'QubitUnitary' object is not callable`  
when I run the correct code, or even when I run the provided starter code without any edits.  
Looks like the issue happens inside the Codebook environment itself.

Thanks!

---

<div class="post-metadata">

**Author:** ![AmruthA](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/amrutha/32/4438_2.png) [@AmruthA](https://discuss.pennylane.ai/u/AmruthA)\
**Post date:** [September 17, 2026, 3:20am UTC](https://discuss.pennylane.ai/t/qubitunitary-object-is-not-callable-error-for-codercise-i-9-2/9505/2 "2026-09-17T03:20:32Z")

</div>

nevermind, it works now after I gave it a few minutes

---

<div class="post-metadata">

**Author:** ![priyanair](https://avatars.discourse-cdn.com/v4/letter/p/ec9cab/32.png) [@priyanair](https://discuss.pennylane.ai/u/priyanair)\
**Post date:** [October 10, 2026, 6:43pm UTC](https://discuss.pennylane.ai/t/qubitunitary-object-is-not-callable-error-for-codercise-i-9-2/9505/3 "2026-10-10T18:43:41Z")

</div>

This error usually happens when the Codebook environment’s kernel state gets out of sync, or if QubitUnitary was previously instantiated and accidentally called as a function in the workspace namespace. If starter code triggers it without any edits, restarting the Codebook kernel or refreshing the exercise session clears cached execution variables and fixes the issue.
