GraphState
class qiskit.circuit.library.GraphState(adjacency_matrix)
Bases: QuantumCircuit
Circuit to prepare a graph state.
Given a graph G = (V, E), with the set of vertices V and the set of edges E, the corresponding graph state is defined as
Such a state can be prepared by first preparing all qubits in the state, then applying a gate for each corresponding graph edge.
Graph state preparation circuits are Clifford circuits, and thus easy to simulate classically. However, by adding a layer of measurements in a product basis at the end, there is evidence that the circuit becomes hard to simulate [2].
Reference Circuit:

References:
[1] M. Hein, J. Eisert, H.J. Briegel, Multi-party Entanglement in Graph States,
[2] D. Koh, Further Extensions of Clifford Circuits & their Classical Simulation Complexities.
Create graph state preparation circuit.
The class qiskit.circuit.library.graph_state.GraphState
is deprecated as of Qiskit 2.1. It will be removed in Qiskit 3.0. Use qiskit.circuit.library.GraphStateGate instead.
Parameters
adjacency_matrix (list | np.ndarray) – input graph as n-by-n list of 0-1 lists
Raises
CircuitError – If adjacency_matrix is not symmetric.
The circuit prepares a graph state with the given adjacency matrix.
Attributes
name
Type: str
A human-readable name for the circuit.
Example
from qiskit import QuantumCircuit
qc = QuantumCircuit(2, 2, name="my_circuit")
print(qc.name)
my_circuit