CheckerBoardTile¶
- class CheckerBoardTile(origin: array, qubit_count=None, qubit_data=None, operators=None, optype='pXZXZ')[source]¶
Bases:
Tile
Checker Board Tile
The diagram is as follows:
q0 q1 q1 q2 v0 v1 v0 v1 o-----o o-----o | 0 | | 1 | o-----o o-----o v2 v3 v2 v3 q3 q4 q4 q5 .(0,0) q3 q4 q4 q5 v0 v1 v0 v1 o-----o o-----o | 2 | | 3 | o-----o o-----o v2 v3 v2 v3 q6 q7 q7 q8 o-----o-----o | 0 | 1 | o-----o-----o | 2 | 3 | o-----o-----o
Creates a Checker Board Tile (Shell)
q0 q1 q1 q2 v0 v1 v0 v1 o-----o o-----o | 0 | | 1 | o-----o o-----o v2 v3 v2 v3 q3 q4 q4 q5 .(0,0) q3 q4 q4 q5 v0 v1 v0 v1 o-----o o-----o | 2 | | 3 | o-----o o-----o v2 v3 v2 v3 q6 q7 q7 q8 o-----o-----o | 0 | 1 | o-----o-----o | 2 | 3 | o-----o-----o
Face colors for faces [0,1,2,3] are [“yellowgreen”, “tomato”, “tomato”, “yellowgreen”]
Preformatted operators are stored in CheckerBoardTile.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 or Y.
“pXZXZ” -> #0 face is Pauli(“XXXX”) operator, #1 face is Pauli(“ZZZZ”), etc. “cXZZX” -> #0 face is Pauli(“XZZX”) operator, #1 face is Pauli(“XZZX”), etc.
Available precomputed operator layouts are:
"pXZXZ", "pZXZX" "cXXXX", "cZZZZ", "cXZZX", "cZXXZ"
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 CheckerBoardTile can be accessed from [CheckerBoardTile.u_vec, CheckerBoardTile.v_vec]
- Raises:
QiskitError – Unsupported operator type
- Returns:
Returns a Checker Board tile (shell) with provided origin
- Return type:
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 = 9¶
- size = array([2, 2])¶
- u_vec = array([2, 0])¶
- v_vec = array([0, 2])¶
- wf_coordinates = [[[-1, 1], [0, 1], [0, 0], [-1, 0]], [[0, 1], [1, 1], [1, 0], [0, 0]], [[-1, 0], [0, 0], [0, -1], [-1, -1]], [[0, 0], [1, 0], [1, -1], [0, -1]]]¶
- wf_loop_indicator = [True, True, True, True]¶
- wf_operator_dict = {'cXXXX': [PauliList(['XXXX']), PauliList(['XXXX']), PauliList(['XXXX']), PauliList(['XXXX'])], 'cXZZX': [PauliList(['XZZX']), PauliList(['XZZX']), PauliList(['XZZX']), PauliList(['XZZX'])], 'cZXXZ': [PauliList(['ZXXZ']), PauliList(['ZXXZ']), PauliList(['ZXXZ']), PauliList(['ZXXZ'])], 'cZZZZ': [PauliList(['ZZZZ']), PauliList(['ZZZZ']), PauliList(['ZZZZ']), PauliList(['ZZZZ'])], 'pXZXZ': [PauliList(['XXXX']), PauliList(['ZZZZ']), PauliList(['ZZZZ']), PauliList(['XXXX'])], 'pZXZX': [PauliList(['ZZZZ']), PauliList(['XXXX']), PauliList(['XXXX']), PauliList(['ZZZZ'])]}¶
- wf_q_indices = [[0, 1, 4, 3], [1, 2, 5, 4], [3, 4, 7, 6], [4, 5, 8, 7]]¶