Grover's Oracle Implementation in MBQC

Hi, I am working on implementing a Grover’s oracle in MBQC by following tutorials on measurement-based quantum computing. I’m encountering an issue: when I compare density matrices to check if my MBQC circuit matches the gate-based circuit, it works fine for the CZ-based structure. However, as I try to construct oracles for other marked states (such as 00, 10, or 01), the density matrix seems to remain unchanged because the MBQC oracle is built using only the CZ gate. Is there a way in PennyLane, when working with MBQC, to verify that my oracle circuit actually changes the phase of the marked state—for instance, by explicitly observing the phase flip or by using another observable that reveals the effect of the oracle?

Hi @Rayhan740 ,
Do you have a minimal reproducible code example that you can share so that I can check the problem you’re having?

I figured it out. Thanks a lot to this community.

1 Like

That’s great to hear @Rayhan740 !

If you can share the solution here it might help others having the same problem in the future.

I will share the solution soon. Once it is complete.

1 Like