mindquantum.device.GridQubits#
- class mindquantum.device.GridQubits(n_row: int, n_col: int)#
Grid qubit topology.
- Parameters:
n_row (int) – how many rows of your grid qubits.
n_col (int) – how many columns of your grid quits.
Examples
>>> from mindquantum.device import GridQubits >>> topology = GridQubits(2, 3) >>> topology.n_row() 2
- n_col() int#
Get column number.
- Returns:
int, the column number.
Examples
>>> from mindquantum.device import GridQubits >>> topology = GridQubits(2, 3) >>> topology.n_col() 3
- n_row() int#
Get row number.
- Returns:
int, the row number.
Examples
>>> from mindquantum.device import GridQubits >>> topology = GridQubits(2, 3) >>> topology.n_row() 2