SquareDiamondTile

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

Bases: Tile

Square Diamond Tile (Square or non-Rotated orientation)

The follow labelling is used:

q0    q1  q1   q2
v0    v1  v0   v1
  o--o     o--o
  |0/       \1|
  |/         \|
  o           o
v2             v2
q3             q4
       .(0,0)
q3            q4
v0            v0
  o           o
  |\         /|
  |2\       /3|
  o--o     o--o
v1    v2 v1    v2
q5    q6 q6    q7

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

Square Diamond Tile

The following labels are used:

q0    q1  q1   q2
v0    v1  v0   v1
  o--o     o--o
  |0/       \1|
  |/         \|
  o           o
v2             v2
q3             q4
       .(0,0)
q3            q4
v0            v0
  o           o
  |\         /|
  |2\       /3|
  o--o     o--o
v1    v2 v1    v2
q5    q6 q6    q7

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

Face colors for faces [0,1,2] are [“yellowgreen”,”tomato”,”steelblue”]

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

"pXZXZ" -> face #0 operator is PauliList(["XXX"]),
           face #1 operator is PauliList(["ZZZ"]),
           face #2 operator is PauliList(["ZZZ"]), and
           face #3 operator is PauliList(["XXX"])]

Available precomputed operator layouts are:

"pXZXZ", "pZXZX", "cXXXX", "cZZZZ"

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 “pXZXZ”.

A appropriately scalled lattice basis for tiling with the HexagonTile can be accessed from [HexagonTile.u_vec, HexagonTile.v_vec]

Raises:

QiskitError – Unsupported operator type

Returns:

Returns a Square Diamond tile (shell) with provided origin

Return type:

Shell

Methods

classmethod draw()

Display the tile

Return type:

None

Attributes

face_colors = ['yellowgreen', 'tomato', 'tomato', 'yellowgreen']
faces_wf_components = [[0], [1], [2], [3]]
num_faces = 4
num_qubits = 8
size = array([2, 2])
u_vec = array([0, 2])
v_vec = array([2, 0])
wf_coordinates = [[[-1, 1], [0, 1], [-1, 0]], [[0, 1], [1, 1], [1, 0]], [[-1, 0], [-1, -1], [0, -1]], [[1, 0], [0, -1], [1, -1]]]
wf_loop_indicator = [True, True, True, True]
wf_operator_dict = {'cXXXX': [PauliList(['XXX']), PauliList(['XXX']), PauliList(['XXX']), PauliList(['XXX'])], 'cZZZZ': [PauliList(['ZZZ']), PauliList(['ZZZ']), PauliList(['ZZZ']), PauliList(['ZZZ'])], 'pXZXZ': [PauliList(['XXX']), PauliList(['ZZZ']), PauliList(['ZZZ']), PauliList(['XXX'])], 'pZXZX': [PauliList(['ZZZ']), PauliList(['XXX']), PauliList(['XXX']), PauliList(['ZZZ'])]}
wf_orientation = [[-1, 1], [1, 1], [-1, -1], [1, -1]]
wf_q_indices = [[0, 1, 3], [1, 2, 4], [3, 5, 6], [4, 6, 7]]