
'''simple docstring'''

from ...configuration_utils import PretrainedConfig
from ...utils import logging


UpperCAmelCase__ :			str											=		logging.get_logger(__name__)

UpperCAmelCase__ :			int											=		{
    "weiweishi/roc-bert-base-zh": "https://huggingface.co/weiweishi/roc-bert-base-zh/resolve/main/config.json",
}






class  A  (						SCREAMING_SNAKE_CASE__     ):
	snake_case__   :str   =  'roc_bert'





	def __init__(       self      :							int   ,				__magic_name__      :							Optional[int]=30522   ,				__magic_name__      :							Optional[Any]=768   ,				__magic_name__      :							Dict=12   ,				__magic_name__      :							int=12   ,				__magic_name__      :							Tuple=3072   ,				__magic_name__      :							Optional[int]="gelu"   ,				__magic_name__      :							List[Any]=0.1   ,				__magic_name__      :							Dict=0.1   ,				__magic_name__      :							Optional[Any]=512   ,				__magic_name__      :							List[Any]=2   ,				__magic_name__      :							Optional[Any]=0.02   ,				__magic_name__      :							Tuple=1E-12   ,				__magic_name__      :							List[Any]=True   ,				__magic_name__      :							List[Any]=0   ,				__magic_name__      :							List[str]="absolute"   ,				__magic_name__      :							Dict=None   ,				__magic_name__      :							List[Any]=True   ,				__magic_name__      :							Optional[Any]=True   ,				__magic_name__      :							Dict=768   ,				__magic_name__      :							int=910   ,				__magic_name__      :							Optional[Any]=512   ,				__magic_name__      :							int=24858   ,				__magic_name__      :							Dict=True   ,				**__magic_name__      :							Union[str, Any]   ,				):


				"""simple docstring"""

				lowerCAmelCase__										=				vocab_size
				lowerCAmelCase__										=				max_position_embeddings
				lowerCAmelCase__										=				hidden_size
				lowerCAmelCase__										=				num_hidden_layers
				lowerCAmelCase__										=				num_attention_heads
				lowerCAmelCase__										=				intermediate_size
				lowerCAmelCase__										=				hidden_act
				lowerCAmelCase__										=				hidden_dropout_prob
				lowerCAmelCase__										=				attention_probs_dropout_prob
				lowerCAmelCase__										=				initializer_range
				lowerCAmelCase__										=				type_vocab_size
				lowerCAmelCase__										=				layer_norm_eps
				lowerCAmelCase__										=				use_cache
				lowerCAmelCase__										=				enable_pronunciation
				lowerCAmelCase__										=				enable_shape
				lowerCAmelCase__										=				pronunciation_embed_dim
				lowerCAmelCase__										=				pronunciation_vocab_size
				lowerCAmelCase__										=				shape_embed_dim
				lowerCAmelCase__										=				shape_vocab_size
				lowerCAmelCase__										=				concat_input
				lowerCAmelCase__										=				position_embedding_type
				lowerCAmelCase__										=				classifier_dropout
				super().__init__(pad_token_id=__magic_name__   ,				**__magic_name__				)













'''simple docstring'''







import math

import qiskit


def       __UpperCamelCase					(      lowercase_       :  int = 1   ,       lowercase_       :  int = 1   ,       lowercase_       :  int = 1   ):
       """simple docstring"""




       if (
           isinstance(lowercase_   ,       lowercase_   )
           or isinstance(lowercase_   ,       lowercase_   )
           or isinstance(lowercase_   ,       lowercase_   )
       ):
              raise TypeError('inputs must be integers.'   )

       if (input_a < 0) or (input_a < 0) or (carry_in < 0):
              raise ValueError('inputs must be positive.'   )

       if (
           (math.floor(lowercase_   ) != input_a)
           or (math.floor(lowercase_   ) != input_a)
           or (math.floor(lowercase_   ) != carry_in)
       ):
              raise ValueError('inputs must be exact integers.'   )

       if (input_a > 2) or (input_a > 2) or (carry_in > 2):
              raise ValueError('inputs must be less or equal to 2.'   )

       # build registers
       a_						     =			qiskit.QuantumRegister(4   ,       'qr'   )
       a_						     =			qiskit.ClassicalRegister(2   ,       'cr'   )
       # list the entries
       a_						     =			[input_a, input_a, carry_in]

       a_						     =			qiskit.QuantumCircuit(lowercase_   ,       lowercase_   )

       for i in range(0   ,       3   ):
              if entry[i] == 2:
                     quantum_circuit.h(lowercase_   )  # for hadamard entries
              elif entry[i] == 1:
                     quantum_circuit.x(lowercase_   )  # for 1 entries
              elif entry[i] == 0:
                     quantum_circuit.i(lowercase_   )  # for 0 entries

    # build the circuit
       quantum_circuit.ccx(0   ,       1   ,       3   )  # ccx = toffoli gate
       quantum_circuit.cx(0   ,       1   )
       quantum_circuit.ccx(1   ,       2   ,       3   )
       quantum_circuit.cx(1   ,       2   )
       quantum_circuit.cx(0   ,       1   )

       quantum_circuit.measure([2, 3]   ,       lowercase_   )  # measure the last two qbits

       a_						     =			qiskit.Aer.get_backend('aer_simulator'   )
       a_						     =			qiskit.execute(lowercase_   ,       lowercase_   ,       shots=1_000   )

       return job.result().get_counts(lowercase_   )


if __name__ == "__main__":
  print(f"""Total sum count for state is: {quantum_full_adder(1, 1, 1)}""")




