DiagonalHourGlassTile

class DiagonalHourGlassTile(origin: array, qubit_count=None, qubit_data=None, operators=None, optype='pXXZZXX')[source]

Bases: Tile

Diagonal Hour Glass Tile

The diagram is as follows:

q0           q1     q1           q2
v0           v0     v0           v1
o- - - - - -o       o- - - - - -o
|\   q3    /|       |           |
|  \ v1  /  |       |           |
| 0 o   o 1 |       |     2     |
|  /   v2\  |       |           |
|/     q3  \|       |           |
o- - - - - -o       o- - - - - -o
v2           v1     v3           v2
q4           q5     q5           q6


q4           q5     q5           q6
v0           v1     v0           v0
o- - - - - -o      o- - - - - -o
|           |      |\   q7    /|
|           |      |  \ v1  /  |
|     3     |      | 4 o   o 5 |
|           |      |  /   v2\  |
|           |      |/     q7  \|
o- - - - - -o      o- - - - - -o
v3           v2    v2           v1
v8           v9    q9           q10

Diagonal Hour Glass Tile

The diagram is as follows:

 o- - - - - -o- - - - - -o
 |\         /|           |
 |  \     /  |           |
 | 0 o   o 1 |     2     |
 |  /     \  |           |
 |/         \|           |
 o- - - - - -o- - - - - -o
 |           |\         /|
 |           |  \     /  |
 |     3     | 4 o   o 5 |
 |           |  /     \  |
 |           |/         \|
 o- - - - - -o- - - - - -o


q0           q1     q1           q2
v0           v0     v0           v1
 o- - - - - -o       o- - - - - -o
 |\   q3    /|       |           |
 |  \ v1  /  |       |           |
 | 0 o   o 1 |       |     2     |
 |  /   v2\  |       |           |
 |/     q3  \|       |           |
 o- - - - - -o       o- - - - - -o
v2           v1     v3           v2
q4           q5     q5           q6


q4           q5     q5           q6
v0           v1     v0           v0
 o- - - - - -o      o- - - - - -o
 |           |      |\   q7    /|
 |           |      |  \ v1  /  |
 |     3     |      | 4 o   o 5 |
 |           |      |  /   v2\  |
 |           |      |/     q7  \|
 o- - - - - -o      o- - - - - -o
v3           v2    v2           v1
v8           v9    q9           q10

Face colors for faces [0,1,2,3,4,5] are [“yellowgreen”, “yellowgreen”, “tomato”, “tomato”, “yellowgreen”,”yellowgreen”]

Preformatted operators are stored in DiagonalHourGlassTile.op_dict. Keys for op_dict are of the form [p|c]PPPP… where p = pattern and c = copy and P is a Pauli opertor X, Z, Y:

"pXXZZXX" -> #0 face is Pauli('XXX') operator,
             #1 face is Pauli('XXX'),
             #3 face is Pauli('ZZZZ') etc.

Available precomputed operator layouts are:

"pXXZZXX", "pZZXXZZ"

The operator variable may be used to define the operators specifically. The operator must be a list of PauliList objects where each PauliList describes the opertors to be built for the faces as indexed above 0,1,2,3, … If the PauliList contains k Paulis then k operators will be created for the given face.

Parameters:
  • origin (np.array) – Coordinates of origin of tile (shell)

  • qubit_count – Qubit counter. Defaults to None.

  • qubit_data – Qubit data. Defaults to None.

  • operators – Operators for tile faces. Defaults to None.

  • optype (optional) – Which of the listed opertor mapppings to used. Defaults to “pXXZZXX”.

Raises:

QiskitError – Unsupported operator type

Returns:

Returns a Diagonal Hour Glass tile (shell) with provided origin

Return type:

Shell

Methods

classmethod draw()

Display the tile

Return type:

None

Attributes

face_colors = ['yellowgreen', 'yellowgreen', 'tomato', 'tomato', 'yellowgreen', 'yellowgreen']
faces_wf_components = [[0], [1], [2], [3], [4], [5]]
num_faces = 6
num_qubits = 11
size = array([4, 4])
u_vec = array([4, 0])
v_vec = array([0, 4])
wf_coordinates = [[[-2, 2], [-1, 1], [-2, 0]], [[0, 2], [0, 0], [-1, 1]], [[0, 2], [2, 2], [2, 0], [0, 0]], [[-2, 0], [0, 0], [0, -2], [-2, -2]], [[0, 0], [1, -1], [0, -2]], [[2, 0], [2, -2], [1, -1]]]
wf_loop_indicator = [True, True, True, True, True, True]
wf_operator_dict = {'pXXZZXX': [PauliList(['XXX']), PauliList(['XXX']), PauliList(['ZZZZ']), PauliList(['ZZZZ']), PauliList(['XXX']), PauliList(['XXX'])], 'pZZXXZZ': [PauliList(['ZZZ']), PauliList(['ZZZ']), PauliList(['XXXX']), PauliList(['XXXX']), PauliList(['ZZZ']), PauliList(['ZZZ'])]}
wf_q_indices = [[0, 3, 4], [1, 5, 3], [1, 2, 6, 5], [4, 5, 9, 8], [5, 7, 9], [6, 10, 7]]