uniqc.algorithmics.circuits.dicke_state module#

Dicke state preparation circuit using the SCUC algorithm.

Reference:

Bärtschi & Eidenbenz, “Deterministic Preparation of Dicke States”, FCT 2019, arXiv:1904.07358.

uniqc.algorithmics.circuits.dicke_state.dicke_state_circuit(circuit, k, qubits=None)[source]#

Prepare the Dicke state \(|D(n,k)\rangle\).

The Dicke state \(|D(n,k)\rangle\) is the equal superposition of all \(\binom{n}{k}\) computational basis states with exactly k qubits in \(|1\rangle\):

\[|D(n,k)\rangle = \frac{1}{\sqrt{\binom{n}{k}}} \sum_{x\,\in\,\{0,1\}^n,\;|x|=k} |x\rangle\]

This implementation uses the SCUC (Sequential Conditional Unitary Cascade) algorithm from Bärtschi & Eidenbenz (2019), built from CNOT, CRY, and Toffoli gates in \(O(nk)\) depth.

Algorithm outline:
  1. Initialize the last k qubits to \(|1\rangle\) (X gates).

  2. first_block: for l = n, n-1, …, k+1 apply SCS_{l,k} on the first l qubits.

  3. second_block: for l = k, k-1, …, 2 apply SCS_{l,l-1} on the first l qubits.

Parameters:
  • circuit (Circuit) – Quantum circuit to operate on (mutated in-place).

  • k (int) – Number of excitations (1``s) in the target Dicke state. Must satisfy ``1 <= k <= n.

  • qubits (List[int] | None) – Qubit indices to use. None means all qubits of circuit (list(range(circuit.qubit_num))). Must contain at least k qubits.

Raises:

ValueError – If k is not in [1, n].

Return type:

None

Example

>>> from uniqc.circuit_builder import Circuit
>>> from uniqc.algorithmics.circuits import dicke_state_circuit
>>> c = Circuit()
>>> dicke_state_circuit(c, k=2, qubits=[0, 1, 2, 3])