Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions cirq-core/cirq/ops/uniform_superposition_gate.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,15 @@

@value.value_equality
class UniformSuperpositionGate(raw_types.Gate):
r"""Creates a uniform superposition state on the states $[0, M)$
The gate creates the state $\frac{1}{\sqrt{M}}\sum_{j=0}^{M-1}\ket{j}$
(where $1\leq M \leq 2^n$), using n qubits, according to the Shukla-Vedula algorithm [SV24].
r"""Creates a uniform superposition state on the states $[0, M)$.

The gate creates the state
$$
\frac{1}{\sqrt{M}}\sum_{j=0}^{M-1}|j\rangle
$$
(where $1 \leq M \leq 2^n$), using n qubits, according to the
Shukla-Vedula algorithm [SV24].

References:
[SV24]
[An efficient quantum algorithm for preparation of uniform quantum superposition
Expand Down
22 changes: 11 additions & 11 deletions cirq-core/cirq/vis/histogram.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,17 @@ def integrated_histogram(
Suppose the input is a list of gate fidelities. The x-axis of the plot will
be gate fidelity, and the y-axis will be the probability that a random gate
fidelity from the list is less than the x-value. It will look something like
this

1.0
| |
| ___|
| |
| ____|
| |
| |
|_____|_______________
0.0
this:

1.0
| |
| ___|
| |
| ____|
| |
| |
|_____|_______________
0.0

Another way of saying this is that we assume the probability distribution
function (pdf) of gate fidelities is a set of equally weighted delta
Expand Down
Loading