Return a tuple of potentially excited cluster states and their labels.
tfq.datasets.excited_cluster_states(qubits)
For every qubit in qubits this method will create a cluster state circuit
on qubits, apply a cirq.X on that qubit along with a label of 1 and add
it to the return dataset. Finally a cluster state circuit on qubits that
doesn't contain any cirq.X gates with a label of -1 will be added to the
returned dataset.
[null,null,["Last updated 2024-05-17 UTC."],[],[],null,["# tfq.datasets.excited_cluster_states\n\n\u003cbr /\u003e\n\n|---------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/quantum/blob/v0.7.3/tensorflow_quantum/datasets/cluster_state.py#L20-L93) |\n\nReturn a tuple of potentially excited cluster states and their labels. \n\n tfq.datasets.excited_cluster_states(\n qubits\n )\n\nFor every qubit in `qubits` this method will create a cluster state circuit\non `qubits`, apply a [`cirq.X`](https://quantumai.google/reference/python/cirq/X) on that qubit along with a label of 1 and add\nit to the return dataset. Finally a cluster state circuit on `qubits` that\ndoesn't contain any [`cirq.X`](https://quantumai.google/reference/python/cirq/X) gates with a label of -1 will be added to the\nreturned dataset.\n**Note:** This is a toy dataset that can serve as guidance for the community to contribute new datasets to TensorFlow Quantum. \n\n circuits, labels = tfq.datasets.excited_cluster_states(\n cirq.GridQubit.rect(1, 3)\n )\n print(circuits[0])\n (0, 0): ───H───@───────@───X───\n │ │\n (0, 1): ───H───@───@───┼───────\n │ │\n (0, 2): ───H───────@───@───────\n labels[0]\n 1\n print(circuits[-1])\n (0, 0): ───H───@───────@───\n │ │\n (0, 1): ───H───@───@───┼───\n │ │\n (0, 2): ───H───────@───@───\n labels[-1]\n -1\n\nCircuits that feature a [`cirq.X`](https://quantumai.google/reference/python/cirq/X) gate on one of the qubits are labeled 1,\nwhile the circuit that doesn't feature a [`cirq.X`](https://quantumai.google/reference/python/cirq/X) anywhere has the label -1.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|----------|------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `qubits` | Python `list` of [`cirq.GridQubit`](https://quantumai.google/reference/python/cirq/GridQubit)s on which the excited cluster state dataset will be created. |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ------- ||\n|---|---|\n| A `tuple` of [`cirq.Circuit`](https://quantumai.google/reference/python/cirq/Circuit)s and Python `int` labels. ||\n\n\u003cbr /\u003e"]]