diff --git a/cirq-core/cirq/ops/uniform_superposition_gate.py b/cirq-core/cirq/ops/uniform_superposition_gate.py index 95aa3e5d200..598529202d8 100644 --- a/cirq-core/cirq/ops/uniform_superposition_gate.py +++ b/cirq-core/cirq/ops/uniform_superposition_gate.py @@ -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 diff --git a/cirq-core/cirq/vis/histogram.py b/cirq-core/cirq/vis/histogram.py index 7b3a4853c0f..b6977eb35ec 100644 --- a/cirq-core/cirq/vis/histogram.py +++ b/cirq-core/cirq/vis/histogram.py @@ -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