Source code for qiskit_qec.geometry.tiles.tile

# This code is part of Qiskit.
#
# (C) Copyright IBM 2017, 2020
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivative works of this code must retain this
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.
"""Tile base class"""


from abc import ABC

from qiskit_qec.geometry.model.qubit_count import QubitCount
from qiskit_qec.geometry.model.qubit_data import QubitData
from qiskit_qec.geometry.model.shell import Shell


[docs] class Tile(ABC): """Base class for Tiles"""
[docs] @classmethod def draw(cls) -> None: """Display the tile""" qubit_count = QubitCount() qubit_data = QubitData() shell: Shell = cls(origin=(0, 0), qubit_count=qubit_count, qubit_data=qubit_data) # pylint: disable=unexpected-keyword-arg shell.draw(qubit_data=qubit_data, show_axis=False, figsize=(2, 2), face_colors=True)