uniqc.algorithms.core.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.algorithms.core.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:
\[D(n,k) = 1 \big/ \binom{n}{k} \quad \sum_{x \in \{0,1\}^n, |x|=k} x\]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.algorithms.core.state_preparation import dicke_state >>> c = Circuit() >>> dicke_state(c, qubits=[0, 1, 2], k=1) # ``|D(3,1)>``