Skip to content

Conversation

@MartinBombar
Copy link

Overview

Changing the 2 mode Grover search to make it correspond better to the kiwat reference and to grover algorithm.

What was wrong

In the old version, the state after initialization would be the wrong state (2 of the terms had a phase of \ pi ).
Also the inversion circuit would amplify the state having opposite polarization to the marked state. ({0;P:H} marked would amplify {0;P:V})

What was changed :

Both the issues were fixed.
In initialization : the components before the BS were lowered to mode 1 allowing to create the right superposition
In the inversion : the components between the BS were lowered to mode 1 allowing to amplify the right state.
In the circuit evaluation : Now the circuit is initialized to pcvl.BasicState("|0,{P:H}, 0, 0>") and not pcvl.BasicState("|{P:H},0, 0, 0>")

Please note that changing the mode for the initialization is not just a symetric change, it creates a totally different state :
Older version :
State after initialization : -0.5*|{P:H},0>+0.5*|0,{P:H}>-0.5*|{P:V},0>+0.5*|0,{P:V}>
New version :
State after initialization : 0.5*|{P:H},0>+0.5*|0,{P:H}>+0.5*|{P:V},0>+0.5*|0,{P:V}>

vmscw and others added 2 commits November 26, 2025 09:58
… reference. in the old version, the state after initialization would be the wrong state (2 of the terms had a phase of \ pi ). Also the inversion circuit would amplify the state having opposite polarization to the marked state
@Aubaert Aubaert changed the base branch from main to release/1.2.0 December 22, 2025 09:08
@Aubaert
Copy link
Contributor

Aubaert commented Dec 22, 2025

Hello,

Thank you for your contribution, and congrats on finding this error.
The changes will appear in the documentation when we release the 1.2 version of perceval.

Cheers,
The perceval team

@philippe3263
Copy link

here a full introduction with a full description of grover using photonic
https://arxiv.org/abs/2509.04266

@Aubaert Aubaert merged commit 148bc26 into Quandela:release/1.2.0 Dec 22, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants