mindquantum.device.LinearQubits

View Source On Gitee
class mindquantum.device.LinearQubits(n_qubits: int)[source]

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