mentpy.mbqc.templates.linear_cluster(n, **kwargs) MBQCircuit

Returns a linear cluster state of n qubits.

Parameters:
n : int

The number of qubits in the cluster state.

Return type:

The linear cluster state of n qubits.

Examples

Create a 1D cluster state \(|G>\) of five qubits

In [1]: g = mp.templates.linear_cluster(5)

In [2]: mp.draw(g)
Out[2]: (<Figure size 800x300 with 1 Axes>, <Axes: >)
../_images/linear_cluster.png