# Latest

**URL:** https://discuss.pennylane.ai/latest.md

[Latest](https://discuss.pennylane.ai/latest.md) · [Categories](https://discuss.pennylane.ai/categories.md)

---

## [Welcome to the PennyLane discussion forum](https://discuss.pennylane.ai/t/welcome-to-the-pennylane-discussion-forum/7)

<div class="topic-metadata">

**Author:** [@system](https://discuss.pennylane.ai/u/system)\
**Replies:** 0\
**Last updated:** [November 16, 2018, 5:24pm UTC](https://discuss.pennylane.ai/t/welcome-to-the-pennylane-discussion-forum/7 "2018-11-16T17:24:12Z")

</div>

PennyLane is a cross-platform Python library for quantum machine learning, automatic differentiation, and optimization of hybrid quantum-classical computations. This is the official PennyLane forum, and is for any and al…

---

## [Challenge Availability Issue](https://discuss.pennylane.ai/t/challenge-availability-issue/9509)

<div class="topic-metadata">

**Author:** [@nandini.avanindra](https://discuss.pennylane.ai/u/nandini.avanindra)\
**Replies:** 1\
**Last updated:** [September 19, 2026, 5:10pm UTC](https://discuss.pennylane.ai/t/challenge-availability-issue/9509 "2026-09-19T17:10:14Z")

</div>

Hello, I registered for QHack on October 17th. I can see myslef logged into the QHack homepage, but the coding challenge and rank tabs are greyed out for me. I locked my team and have signed out and back in again but it…

---

## ['QubitUnitary' object is not callable Error for codercise I.9.2](https://discuss.pennylane.ai/t/qubitunitary-object-is-not-callable-error-for-codercise-i-9-2/9505)

<div class="topic-metadata">

**Author:** [@AmruthA](https://discuss.pennylane.ai/u/AmruthA)\
**Replies:** 1\
**Last updated:** [September 17, 2026, 3:20am UTC](https://discuss.pennylane.ai/t/qubitunitary-object-is-not-callable-error-for-codercise-i-9-2/9505 "2026-09-17T03:20:32Z")

</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…

---

## [\[HS.4.2a\]Incorrect: Something is off with your Hamiltonian!](https://discuss.pennylane.ai/t/hs-4-2a-incorrect-something-is-off-with-your-hamiltonian/9497)

<div class="topic-metadata">

**Author:** [@Ring](https://discuss.pennylane.ai/u/Ring)\
**Replies:** 1\
**Last updated:** [September 11, 2026, 7:59pm UTC](https://discuss.pennylane.ai/t/hs-4-2a-incorrect-something-is-off-with-your-hamiltonian/9497 "2026-09-11T19:59:31Z")

</div>

Hi, When i coding HS.4.2a PrepSelPrep on the Walk operator, it show incorrect. error log\>\>\> Incorrect: Something is off with your Hamiltonian! my code\>\>\> offes = \[1/4,1/4,1/2\] objs = \[qml.Z(5),qml.Z(6),qml.Z(5)@qml…

---

## [Doubts on qhack](https://discuss.pennylane.ai/t/doubts-on-qhack/9484)

<div class="topic-metadata">

**Author:** [@ragulml](https://discuss.pennylane.ai/u/ragulml)\
**Replies:** 2\
**Last updated:** [September 8, 2026, 10:52pm UTC](https://discuss.pennylane.ai/t/doubts-on-qhack/9484 "2026-09-08T22:52:44Z")

</div>

“Is there a runtime/time limit on submitted code, or just correctness checked?” — matters because if there’s a hidden timeout, “optimized code” actually does matter, contrary to what the public rules imply. “Are AI codi…

---

## [Applying the same gate to multiple qubits at the same time](https://discuss.pennylane.ai/t/applying-the-same-gate-to-multiple-qubits-at-the-same-time/9488)

<div class="topic-metadata">

**Author:** [@aziz.chebil](https://discuss.pennylane.ai/u/aziz.chebil)\
**Replies:** 0\
**Last updated:** [September 4, 2026, 10:35am UTC](https://discuss.pennylane.ai/t/applying-the-same-gate-to-multiple-qubits-at-the-same-time/9488 "2026-09-04T10:35:12Z")

</div>

Hello! If applicable, put your complete code example down below. Make sure that your code: is 100% self-contained — someone can copy-paste exactly what is here and run it to reproduce the behaviour you are observing i…

---

## [Validating Sub-Nanometer Regularization on Photonic Hardware via PennyLane-SF](https://discuss.pennylane.ai/t/validating-sub-nanometer-regularization-on-photonic-hardware-via-pennylane-sf/9486)

<div class="topic-metadata">

**Author:** [@AmrTorky](https://discuss.pennylane.ai/u/AmrTorky)\
**Replies:** 1\
**Last updated:** [September 6, 2026, 10:52am UTC](https://discuss.pennylane.ai/t/validating-sub-nanometer-regularization-on-photonic-hardware-via-pennylane-sf/9486 "2026-09-06T10:52:55Z")

</div>

Hello PennyLane Community, My name is Amr Torky. I am an independent researcher working entirely alone in the fields of Sub-Nanometer Topological Quantum Lattice Engineering, Solid-State Wakefield Acceleration, and Acti…

---

## ["Get involved - Collaborate with us!" form](https://discuss.pennylane.ai/t/get-involved-collaborate-with-us-form/9480)

<div class="topic-metadata">

**Author:** [@sarah\_ceo](https://discuss.pennylane.ai/u/sarah_ceo)\
**Replies:** 0\
**Last updated:** [September 1, 2026, 2:09pm UTC](https://discuss.pennylane.ai/t/get-involved-collaborate-with-us-form/9480 "2026-09-01T14:09:42Z")

</div>

Hello, I tried to send a message regarding a potential new Demo through the “Get involved - Collaborate with us!” form. However, the submit button just greyed out after I hit it and I didn’t get any confirmation, so I d…

---

## [QHack is officially back! 📣](https://discuss.pennylane.ai/t/qhack-is-officially-back/9477)

<div class="topic-metadata">

**Author:** [@CatalinaAlbornoz](https://discuss.pennylane.ai/u/CatalinaAlbornoz)\
**Replies:** 0\
**Last updated:** [August 21, 2026, 10:13pm UTC](https://discuss.pennylane.ai/t/qhack-is-officially-back/9477 "2026-08-21T22:13:41Z")

</div>

QHack is officially back! :mega: This year, we’re focusing on the community’s favourite event: quantum coding challenges. We’re bringing the heat for 2026 with some massive updates: :moneybag: Biggest Prize Pool in Q…

---

## [Request for Missing Badges for Completed Codebook Modules](https://discuss.pennylane.ai/t/request-for-missing-badges-for-completed-codebook-modules/9464)

<div class="topic-metadata">

**Author:** [@Shah\_Hussain\_Pirzada](https://discuss.pennylane.ai/u/Shah_Hussain_Pirzada)\
**Replies:** 4\
**Last updated:** [August 19, 2026, 6:12pm UTC](https://discuss.pennylane.ai/t/request-for-missing-badges-for-completed-codebook-modules/9464 "2026-08-19T18:12:41Z")

</div>

Hi PennyLane Support Team, I have successfully completed 100% of the topics & challenges for the following modules in the PennyLane Codebook: 1: Hamiltonian Time Evolution 2: Noisy Quantum Theory All tasks show full …

---

## [PauliString for Amplitude State](https://discuss.pennylane.ai/t/paulistring-for-amplitude-state/9469)

<div class="topic-metadata">

**Author:** [@movingwaters](https://discuss.pennylane.ai/u/movingwaters)\
**Replies:** 2\
**Last updated:** [August 19, 2026, 2:00pm UTC](https://discuss.pennylane.ai/t/paulistring-for-amplitude-state/9469 "2026-08-19T14:00:51Z")

</div>

Hello! Is there a way to create a PauliString that will target a specific amplitude state? I know you can use qp.PauliZ(0) @ qp.PauliZ(1) to target two qubit, but wondering if there’s anything we can do at the binary am…

---

## [Quantum walk on the heptaract: depth-2 perfect state transfer + pitch invariance — seeking hardware verification](https://discuss.pennylane.ai/t/quantum-walk-on-the-heptaract-depth-2-perfect-state-transfer-pitch-invariance-seeking-hardware-verification/9325)

<div class="topic-metadata">

**Author:** [@Miah\_Fry](https://discuss.pennylane.ai/u/Miah_Fry)\
**Replies:** 4\
**Last updated:** [August 17, 2026, 3:26pm UTC](https://discuss.pennylane.ai/t/quantum-walk-on-the-heptaract-depth-2-perfect-state-transfer-pitch-invariance-seeking-hardware-verification/9325 "2026-08-17T15:26:18Z")

</div>

Hey PennyLane community — Built something I’d love eyes on and ideally a hardware run. \*\*What it is:\*\* A continuous-time quantum walk on the 7-cube (heptaract) that achieves perfect state transfer from |0000000⟩ to |11…

---

## [Expectation Value from Counts](https://discuss.pennylane.ai/t/expectation-value-from-counts/9429)

<div class="topic-metadata">

**Author:** [@movingwaters](https://discuss.pennylane.ai/u/movingwaters)\
**Replies:** 2\
**Last updated:** [August 15, 2026, 4:33pm UTC](https://discuss.pennylane.ai/t/expectation-value-from-counts/9429 "2026-08-15T16:33:58Z")

</div>

Hello, I am wondering if there is a way in Pennylane to calculate the expectation of an observable based on counts outside of a qnode circuit? For example, with this circuit is there method within pennylane to easily c…

---

## [Codexercise PF.4.1 (possible bug)](https://discuss.pennylane.ai/t/codexercise-pf-4-1-possible-bug/9428)

<div class="topic-metadata">

**Author:** [@Anton\_Naumov](https://discuss.pennylane.ai/u/Anton_Naumov)\
**Replies:** 3\
**Last updated:** [August 13, 2026, 4:06pm UTC](https://discuss.pennylane.ai/t/codexercise-pf-4-1-possible-bug/9428 "2026-08-13T16:06:59Z")

</div>

I have recently tried approaching codexercise PF.4.1 met a weird behavior. I tried this implementation: and got a “Correct” result. After that I commented out BasicEntanglerLayers and ran: and got a “Correct” result…

---

## [Codexercise I.13.5 possible bug](https://discuss.pennylane.ai/t/codexercise-i-13-5-possible-bug/9416)

<div class="topic-metadata">

**Author:** [@Anton\_Naumov](https://discuss.pennylane.ai/u/Anton_Naumov)\
**Replies:** 4\
**Last updated:** [August 13, 2026, 3:49pm UTC](https://discuss.pennylane.ai/t/codexercise-i-13-5-possible-bug/9416 "2026-08-13T15:49:53Z")

</div>

Hi, First of all, thank you for your excellent study materials and codexercises, they really thoughtful and engaging. My issue might be a duplicate of something, if so – sorry for that. Was recently solving Codexercise…

---

## [How to report some issues in the codebook](https://discuss.pennylane.ai/t/how-to-report-some-issues-in-the-codebook/9358)

<div class="topic-metadata">

**Author:** [@mbzadegan](https://discuss.pennylane.ai/u/mbzadegan)\
**Replies:** 9\
**Last updated:** [July 27, 2026, 1:45pm UTC](https://discuss.pennylane.ai/t/how-to-report-some-issues-in-the-codebook/9358 "2026-07-27T13:45:20Z")

</div>

Hi everybody, I found some issues in the codebook, but I cannot open a new issue in the GitHub repo because the repository has been archived. I also forked the codebook repository, but unfortunately, I’m unable to pull…

---

## [Purpose of qml variable definition on the code](https://discuss.pennylane.ai/t/purpose-of-qml-variable-definition-on-the-code/9420)

<div class="topic-metadata">

**Author:** [@mbzadegan](https://discuss.pennylane.ai/u/mbzadegan)\
**Replies:** 1\
**Last updated:** [July 24, 2026, 8:51pm UTC](https://discuss.pennylane.ai/t/purpose-of-qml-variable-definition-on-the-code/9420 "2026-07-24T20:51:09Z")

</div>

Hello all, What is the reason for defining the qml variable in the following program on this page? Thank you :folded\_hands:

---

## [The codebook needs more basic explanation](https://discuss.pennylane.ai/t/the-codebook-needs-more-basic-explanation/9413)

<div class="topic-metadata">

**Author:** [@mbzadegan](https://discuss.pennylane.ai/u/mbzadegan)\
**Replies:** 3\
**Last updated:** [July 23, 2026, 9:21pm UTC](https://discuss.pennylane.ai/t/the-codebook-needs-more-basic-explanation/9413 "2026-07-23T21:21:13Z")

</div>

When I teach PennyLane to my students, they sometimes ask about basic concepts in the Codebook, such as where equation (7) comes from. I thought it would be helpful to provide the proof of equation (7) so that you can i…

---

## [Average time to complete one topic in each Pennylane Module](https://discuss.pennylane.ai/t/average-time-to-complete-one-topic-in-each-pennylane-module/9415)

<div class="topic-metadata">

**Author:** [@lugoblogger](https://discuss.pennylane.ai/u/lugoblogger)\
**Replies:** 1\
**Last updated:** [July 21, 2026, 1:48am UTC](https://discuss.pennylane.ai/t/average-time-to-complete-one-topic-in-each-pennylane-module/9415 "2026-07-21T01:48:27Z")

</div>

I wonder how long is to complete on average or normal phyiscs student for one topic in each Pennylane codebook module. For me, sometimes, it takes more than just 30 minutes or a couple of days to understand the concept …

---

## [CleitonForge: neutral Rust benchmarking found Rz sign convention bug (fidelity = 0.0 on QAOA)](https://discuss.pennylane.ai/t/cleitonforge-neutral-rust-benchmarking-found-rz-sign-convention-bug-fidelity-0-0-on-qaoa/9410)

<div class="topic-metadata">

**Author:** [@cleiton\_augusto](https://discuss.pennylane.ai/u/cleiton_augusto)\
**Replies:** 3\
**Last updated:** [July 16, 2026, 2:38am UTC](https://discuss.pennylane.ai/t/cleitonforge-neutral-rust-benchmarking-found-rz-sign-convention-bug-fidelity-0-0-on-qaoa/9410 "2026-07-16T02:38:24Z")

</div>

Hi PennyLane community! I built CleitonForge, a neutral benchmarking framework that routes identical quantum circuits through multiple Rust-native backends simultaneously and compares statevector fidelity. No Python sim…

---

## [MrMustard for GKP state preparation](https://discuss.pennylane.ai/t/mrmustard-for-gkp-state-preparation/9401)

<div class="topic-metadata">

**Author:** [@Amanuel](https://discuss.pennylane.ai/u/Amanuel)\
**Replies:** 4\
**Last updated:** [July 14, 2026, 12:44am UTC](https://discuss.pennylane.ai/t/mrmustard-for-gkp-state-preparation/9401 "2026-07-14T00:44:56Z")

</div>

Hello are there tutorials available for performing non-Gaussian state preparation with a GBS device using the latest version of the MrMustard library? I am trying to investigate the capabilities of MrMustard for heraldin…

---

## [How can I natively parallelize my batch calculations and leverage the GPU with an accelerated simulator backend](https://discuss.pennylane.ai/t/how-can-i-natively-parallelize-my-batch-calculations-and-leverage-the-gpu-with-an-accelerated-simulator-backend/9407)

<div class="topic-metadata">

**Author:** [@Jay\_Prakash](https://discuss.pennylane.ai/u/Jay_Prakash)\
**Replies:** 4\
**Last updated:** [July 14, 2026, 12:39am UTC](https://discuss.pennylane.ai/t/how-can-i-natively-parallelize-my-batch-calculations-and-leverage-the-gpu-with-an-accelerated-simulator-backend/9407 "2026-07-14T00:39:24Z")

</div>

Performance Bottleneck: When running this loop on a CUDA-enabled session, active GPU utilization scales down completely to 0.00% while a single thread on the CPU spikes to 100%. If I remove the explicit \`.cpu()\` cast fro…

---

## [Normalization in qp.BlockEncode](https://discuss.pennylane.ai/t/normalization-in-qp-blockencode/9397)

<div class="topic-metadata">

**Author:** [@ttaka](https://discuss.pennylane.ai/u/ttaka)\
**Replies:** 3\
**Last updated:** [July 10, 2026, 1:52am UTC](https://discuss.pennylane.ai/t/normalization-in-qp-blockencode/9397 "2026-07-10T01:52:02Z")

</div>

Hi, I am a newbie for Pennylane as well as quantum computing itself. I am trying to understand the QSVT and apply my dense and asymmetric matrices. Since the norm of such a matrix (say A) is usually grater than one, qp.…

---

## [Quantum key distribution](https://discuss.pennylane.ai/t/quantum-key-distribution/9399)

<div class="topic-metadata">

**Author:** [@krish\_18](https://discuss.pennylane.ai/u/krish_18)\
**Replies:** 1\
**Last updated:** [July 10, 2026, 1:33am UTC](https://discuss.pennylane.ai/t/quantum-key-distribution/9399 "2026-07-10T01:33:44Z")

</div>

i want to know fullly and detailed abuut quantum key distribution including practical ways implementation with pennylane

---

## [HS.5.2 polynomial](https://discuss.pennylane.ai/t/hs-5-2-polynomial/9393)

<div class="topic-metadata">

**Author:** [@mchau](https://discuss.pennylane.ai/u/mchau)\
**Replies:** 2\
**Last updated:** [July 7, 2026, 4:20pm UTC](https://discuss.pennylane.ai/t/hs-5-2-polynomial/9393 "2026-07-07T16:20:55Z")

</div>

The exercise is from the link above. We need to use QSP to estimate the \\text{erf} function. I tried to solve that without viewing the hint by estimating the Chebyshev series of erf. I run this externally and copy the …

---

## [PennyLane Challenge: Revisiting Schrodinger's cat](https://discuss.pennylane.ai/t/pennylane-challenge-revisiting-schrodingers-cat/4509)

<div class="topic-metadata">

**Author:** [@CatalinaAlbornoz](https://discuss.pennylane.ai/u/CatalinaAlbornoz)\
**Replies:** 5\
**Last updated:** [July 3, 2026, 1:30am UTC](https://discuss.pennylane.ai/t/pennylane-challenge-revisiting-schrodingers-cat/4509 "2026-07-03T01:30:26Z")

</div>

Use this topic to ask your questions about the PennyLane Challenge: Revisiting Schrodinger’s cat.

---

## [Numpy version incompatibility with Pennylane](https://discuss.pennylane.ai/t/numpy-version-incompatibility-with-pennylane/9383)

<div class="topic-metadata">

**Author:** [@mlowe](https://discuss.pennylane.ai/u/mlowe)\
**Replies:** 8\
**Last updated:** [June 25, 2026, 3:59pm UTC](https://discuss.pennylane.ai/t/numpy-version-incompatibility-with-pennylane/9383 "2026-06-25T15:59:36Z")

</div>

I am running the latest version of Pennylane 0.45.0 in a Jupyter notebook. However I am receiving Numpy errors (particularly regarding msort and linalg) when I run “import pennylane as qml”. This occurs when using numpy …

---

## [Stuck on HS.1.4](https://discuss.pennylane.ai/t/stuck-on-hs-1-4/9389)

<div class="topic-metadata">

**Author:** [@lemjm](https://discuss.pennylane.ai/u/lemjm)\
**Replies:** 1\
**Last updated:** [June 23, 2026, 10:28pm UTC](https://discuss.pennylane.ai/t/stuck-on-hs-1-4/9389 "2026-06-23T22:28:25Z")

</div>

Hi. I’m currently stuck on codercise HS.1.4. I think I understand the theory, but somehow can manage to get my code accepted. Can anyone help me ? Here are my attempts :

---

## ["typo" in codercise V1.1](https://discuss.pennylane.ai/t/typo-in-codercise-v1-1/9279)

<div class="topic-metadata">

**Author:** [@kasterma](https://discuss.pennylane.ai/u/kasterma)\
**Replies:** 2\
**Last updated:** [June 23, 2026, 8:29pm UTC](https://discuss.pennylane.ai/t/typo-in-codercise-v1-1/9279 "2026-06-23T20:29:09Z")

</div>

def basic\_entangling\_ansatz(observable,params): “”"Applies an ansatz with basic entanglement. Args: observable (qml.op): a pennylane operator whose expectation value we want to measure. params(np.ar…

---

## [QAOA Workflow: contradictory information](https://discuss.pennylane.ai/t/qaoa-workflow-contradictory-information/9350)

<div class="topic-metadata">

**Author:** [@fyellin](https://discuss.pennylane.ai/u/fyellin)\
**Replies:** 4\
**Last updated:** [June 22, 2026, 10:07pm UTC](https://discuss.pennylane.ai/t/qaoa-workflow-contradictory-information/9350 "2026-06-22T22:07:54Z")

</div>

I’m confused by two seemingly contradictory steps in the QAOA workflow. Define the mixer Hamiltonion. . . A common choice for H\_m is … \\sum{X\_j} Initialize the quantum system in the ground state of H\_m which is usuall…

[Next page](https://discuss.pennylane.ai/latest.md?page=1)
