Skip to content

Instantly share code, notes, and snippets.

@lucainnocenti
Last active November 11, 2019 11:35
Show Gist options
  • Save lucainnocenti/a5c0b051f3e3a7caf3cb92832e8a9233 to your computer and use it in GitHub Desktop.
Save lucainnocenti/a5c0b051f3e3a7caf3cb92832e8a9233 to your computer and use it in GitHub Desktop.
Generate conditions for the ds parameters, as per QW paper. See also https://github.com/lucainnocenti/QSE-with-QW-code.
(* Create the expressions that must be satisfied by the d_s coefficients to generate a specific target
state after the coin is projected onto the + state. *)
generateConditionsForDs[n_, s_] := Sum[
Conjugate[u[i] - d[i]] (u[i + n - s] - d[i + n - s]) + Conjugate[d[i + 1]] d[i + n - s + 1],
{i, 1, s}
] /. {d[1] -> 0, d[n + 1] -> u[n + 1]};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment