uniqc.algorithmics.state_preparation.dicke_state module#
Dicke state preparation.
Prepares the symmetric Dicke state |D(n,k)> — the equal superposition
of all n-qubit basis states with exactly k excitations (ones).
- uniqc.algorithmics.state_preparation.dicke_state.dicke_state(circuit, qubits=None, k=1)[source]#
Prepare the symmetric Dicke state
|D(n,k)>.The Dicke state is the equal superposition of all weight-k computational basis states on n qubits:
\[\begin{split}|D(n,k)\\rangle = \\frac{1}{\\sqrt{\\binom{n}{k}}} \\sum_{\\substack{x \\in \\{0,1\\}^n \\\\ |x|=k}} |x\\rangle\end{split}\]The target state vector is constructed directly and prepared using
rotation_prepare().- Parameters:
- Raises:
ValueError – k is negative or exceeds the number of qubits.
- Return type:
None
Example
>>> from uniqc.circuit_builder import Circuit >>> from uniqc.algorithmics.state_preparation import dicke_state >>> c = Circuit() >>> dicke_state(c, qubits=[0, 1, 2], k=1) # ``|D(3,1)>``