QNLP  v1.0
encoder_base.py
Go to the documentation of this file.
1 from abc import ABC, abstractmethod #Abstract base class
2 
3 class EncoderBase(ABC):
4  """Base class for binary encoding bitstring data"""
5  def __init__(self):
6  super().__init__()
7 
8  @abstractmethod
9  def encode(self, bin_val):
10  pass
11 
12  @abstractmethod
13  def decode(self, bin_val):
14  pass