Bases: CompositeGate
Reference
[1]: Shukla, Alok, and Prakash Vedula. “An Efficient Quantum Algorithm for Preparation of Uniform
Quantum Superposition States.” Quantum Information Processing 23, no. 2 (January 29, 2024): 38.
https://doi.org/10.1007/s11128-024-04258-4.
Source code in QuICT/algorithm/state/uniform_state.py
| def __init__(
self,
N: int,
control: bool = False,
name: str = None
):
if name is None:
name = f"Uniform-{N}"
if control:
name = "c" + name
super().__init__(name)
if control:
gate_l_end = self._build_control_unif(N)
application_indices = gate_l_end.qubits[:1] + gate_l_end.qubits[:0:-1]
else:
gate_l_end = self._build_unif(N)
application_indices = gate_l_end.qubits[::-1]
for gate in (gate_l_end & application_indices):
gate | self
|