mindquantum.device.LinearQubits

Contents

mindquantum.device.LinearQubits#

class mindquantum.device.LinearQubits(n_qubits: int)#

Linear qubit topology.

Parameters:

n_qubits (int) – total qubit size.

Examples

>>> from mindquantum.device import LinearQubits
>>> topology = LinearQubits(5)
>>> topology.is_coupled_with(0, 1)
True
>>> topology.is_coupled_with(0, 2)
False