class QPanda::BasicGridDevice¶
Overview¶
A BasicGirdDevice is a device model that qubits put on nodes of a rectangular grid It is a virtual class because we haven’t dicided how qubits connecting with each other For the simpliest situation, see SimpleGridDevice. More…
Detailed Documentation¶
A BasicGirdDevice is a device model that qubits put on nodes of a rectangular grid It is a virtual class because we haven’t dicided how qubits connecting with each other For the simpliest situation, see SimpleGridDevice.
Construction¶
constructor constructor
m, n: the grid side length
Methods¶
clear all properties except gird side length, re-initialize
get the qubit on (i, j)
Determine whether a double-qubit gate can be applied.
Determine whether a single-qubit gate can be applied.
apply gate and comsume time
apply a double-qubit gate
Check if two qubits are adjacent, location of qubits are (i1, j1) and (i2, j2)
get distance+1 of two qubits
map one qubit
Parameters:
int |
dest: index of the logical qubit |
int |
i: location of the physical qubit |
int |
j: location of the physical qubit |
reset the time
go on next instruction cycle
time when all qubits end up being busy
check if physical qubit on (i, j) free
check if all physical qubits free