qat.devices: The device library
Predefined devices
The qat.devices
module contains the topologies of various superconducting
quantum processors. The following architectures are available:
Rigetti Agave (RIGETTI_AGAVE)
from qat.devices import RIGETTI_AGAVE
print(RIGETTI_AGAVE)
1 -- 0 -- 7
| |
2 6
| |
3 -- 4 -- 5
Rigetti Aspen (RIGETTI_ASPEN)
from qat.devices import RIGETTI_ASPEN
print(RIGETTI_ASPEN)
4 -- 3 12 -- 11
/ \ / \
5 2 -- 13 10
| | | |
6 1 -- 14 9
\ / \ /
7 -- 0 15 -- 8
IBM Burlington (IBM_BURLINGTON)
from qat.devices import IBM_BURLINGTON
print(IBM_BURLINGTON)
0 -- 1 -- 2
|
3
|
4
IBM Yorktown (IBM_YORKTOWN)
from qat.devices import IBM_YORKTOWN
print(IBM_YORKTOWN)
1
/\
/ \
0 -- 2 -- 3
\ /
\/
4
IBM Melbourne (IBM_MELBOURNE)
from qat.devices import IBM_MELBOURNE
print(IBM_MELBOURNE)
0 -- 1 -- 2 -- 3 -- 4 -- 5 -- 6
| | | | | |
| | | | | |
13 -- 12 -- 11 -- 10 -- 9 -- 8 -- 7
IBM Rueschlikon (IBM_RUESCHLIKON)
from qat.devices import IBM_RUESCHLIKON
print(IBM_RUESCHLIKON)
1 -- 2 -- 3 -- 4 -- 5 -- 6 -- 7 -- 8
| | | | | | | |
| | | | | | | |
0 -- 15 -- 14 -- 13 -- 12 -- 11 -- 10 -- 9
IBM Tokyo (IBM_TOKYO)
from qat.devices import IBM_TOKYO
print(IBM_TOKYO)
0 -- 1 -- 2 -- 3 -- 4
| | | | X |
5 -- 6 -- 7 -- 8 -- 9
| X | | X |
10 -- 11 -- 12 -- 13 -- 14
| | X | X |
15 -- 16 -- 17 18 19
IBM Singapore (IBM_SINGAPORE)
from qat.devices import IBM_SINGAPORE
print(IBM_SINGAPORE)
0 -- 1 -- 2 -- 3 -- 4
| |
5 -- 6 -- 7 -- 8 -- 9
| | |
10 -- 11 -- 12 -- 13 -- 14
| |
15 -- 16 -- 17 -- 18 -- 19
IBM Johannesburg (IBM_JOHANNESBURG)
from qat.devices import IBM_JOHANNESBURG
print(IBM_JOHANNESBURG)
0 -- 1 -- 2 -- 3 -- 4
| |
5 -- 6 -- 7 -- 8 -- 9
| | |
10 -- 11 -- 12 -- 13 -- 14
| |
15 -- 16 -- 17 -- 18 -- 19
Google Sycamore (GOOGLE_SYCAMORE)
from qat.devices import GOOGLE_SYCAMORE
print(GOOGLE_SYCAMORE)
0 9 18 35 44
/ \ / \ / \ / \
5 14 23 31 40 49
/ \ / \ / \ / \ / \ /
1 10 19 27 36 45
\ / \ / \ / \ / \ / \
6 15 24 32 41 50
/ \ / \ / \ / \ / \ /
2 11 20 28 37 46
\ / \ / \ / \ / \ / \
7 16 25 33 42 51
/ \ / \ / \ / \ / \ /
3 12 21 29 38 47
\ / \ / \ / \ / \ / \
8 17 26 34 43 52
/ \ / \ / \ / \ / \ /
4 13 22 30 39 48
Zuchongzhi chip (ZUCHONGZHI)
from qat.devices import ZUCHONGZHI
print(ZUCHONGZHI)
0 1 2 3 4 5
/ \ / \ / \ / \ / \ /
6 7 8 9 10 11
\ / \ / \ / \ / \ / \
12 13 14 15 16 17
/ \ / \ / \ / \ / \ /
18 19 20 21 22 23
\ / \ / \ / \ / \ / \
24 25 26 27 28 29
/ \ / \ / \ / \ / \ /
30 31 32 33 34 35
\ / \ / \ / \ / \ / \
36 37 38 39 40 41
/ \ / \ / \ / \ / \ /
42 43 44 45 46 47
\ / \ / \ / \ / \ / \
48 49 50 51 52 53
/ \ / \ / \ / \ / \ /
54 55 56 57 58 59
\ / \ / \ / \ / \ / \
60 61 62 63 64 65
Each architecture is described via a HardwareSpecs
object.
For instance, to access the connectivity of Rigetti’s Aspen chip:
from qat.devices import RIGETTI_ASPEN
print(RIGETTI_ASPEN)
print("Type:", type(RIGETTI_ASPEN))
4 -- 3 12 -- 11
/ \ / \
5 2 -- 13 10
| | | |
6 1 -- 14 9
\ / \ /
7 -- 0 15 -- 8
Type: <class 'qat.core.wrappers.hardware_specs.HardwareSpecs'>
Device generators
Additionally, the module also provides generators for regular topologies:
- class qat.devices.LineDevice(length)
A device with linear nearest neighbor connectivity.
from qat.devices import LineDevice device = LineDevice(7) print(device.description) print(device)
A LNN device with 7 qubits 0 -- 1 -- 2 -- 3 -- 4 -- 5 -- 6
- Parameters
length (int) – the number of qubits of the device
- class qat.devices.GridDevice(dimx, dimy)
A device with grid connectivity.
from qat.devices import GridDevice device = GridDevice(3, 2) print(device.description) print(device)
A device with a 3x2 grid connectivity 0 -- 1 | | | | 2 -- 3 | | | | 4 -- 5
- Parameters
dimx (int) – the first dimension
dimy (int) – the second dimension
- class qat.devices.SquareGridDevice(dim)
A device with a square grid connectivity.
from qat.devices import SquareGridDevice device = SquareGridDevice(3) print(device.description) print(device)
A device with a 3x3 grid connectivity 0 -- 1 -- 2 | | | | | | 3 -- 4 -- 5 | | | | | | 6 -- 7 -- 8
- Parameters
dim (int) – the dimension of the square
- class qat.devices.AllToAll(nbqbits)
A device with all-to-all connectivity.
from qat.devices import AllToAll device = AllToAll(10) assert device.topology.to_nx().number_of_edges() == 45 print(device.description)
A fully connected device with 10 qubits
- Parameters
nbqbits (int) – the number of qubits