qiskit/releasenotes/notes/1.3/uniform-superposition-gate-...

28 lines
1.1 KiB
YAML

---
features:
- |
Implemented :class:`.UniformSuperpositionGate` class, which allows
the creation of a uniform superposition state using
the Shukla-Vedula algorithm. This feature facilitates the
creation of quantum circuits that produce a uniform superposition
state :math:`\frac{1}{\sqrt{M}} \sum_{j=0}^{M-1} |j\rangle`, where
:math:`M` is a positive integer representing the number of
computational basis states with an amplitude of
:math:`\frac{1}{\sqrt{M}}`. This implementation supports the
efficient creation of uniform superposition states,
requiring only :math:`O(\log_2 (M))` qubits and
:math:`O(\log_2 (M))` gates. Usage example:
.. code-block:: python
from qiskit import QuantumCircuit
from qiskit.circuit.library.data_preparation import UniformSuperpositionGate
M = 5
num_qubits = 3
usp_gate = UniformSuperpositionGate(M, num_qubits)
qc = QuantumCircuit(num_qubits)
qc.append(usp_gate, list(range(num_qubits)))
qc.draw()