Skip to content

Commit

Permalink
Add a note to StatePreparationAliasSampling (#1119)
Browse files Browse the repository at this point in the history
  • Loading branch information
mpharrigan authored Jul 11, 2024
1 parent 3f325ce commit 1357456
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,9 @@ class StatePreparationAliasSampling(PrepareOracle):
where the temporary register must be treated with care, see the details in Section III.D. of
the reference.
The preparation is equivalent to [classical alias sampling]
(https://en.wikipedia.org/wiki/Alias_method): we sample `l` with probability `p[l]` by first
This construction is designed to work specifically when you don't require specific phases,
and the problem is reduced to [classical alias sampling]
(https://en.wikipedia.org/wiki/Alias_method). We sample `l` with probability `p[l]` by first
selecting `l` uniformly at random and then returning it with probability `keep[l] / 2**mu`;
otherwise returning `alt[l]`.
Expand Down

0 comments on commit 1357456

Please sign in to comment.