

import math

import qiskit
from qiskit import Aer, ClassicalRegister, QuantumCircuit, QuantumRegister, execute

def      a__	(						UpperCAmelCase				:     int = 1							,					UpperCAmelCase				:     int = 1     )    ->		List[str]:



  if isinstance(__lowerCamelCase							,					__lowerCamelCase     ) or isinstance(__lowerCamelCase							,					__lowerCamelCase     ):
    raise TypeError('''inputs must be integers.'''     )
  if (bit_a < 0) or (bit_a < 0):
    raise ValueError('''inputs must be positive.'''     )
  if (math.floor(__lowerCamelCase     ) != bit_a) or (math.floor(__lowerCamelCase     ) != bit_a):
    raise ValueError('''inputs must be exact integers.'''     )
  if (bit_a > 1) or (bit_a > 1):
    raise ValueError('''inputs must be less or equal to 1.'''     )

  # build registers
  UpperCAmelCase			:				Dict										=					QuantumRegister(2							,					'''qr'''     )
  UpperCAmelCase			:				List[str]										=					ClassicalRegister(2							,					'''cr'''     )

  UpperCAmelCase			:				Optional[int]										=					QuantumCircuit(__lowerCamelCase							,					__lowerCamelCase     )

  # entanglement the qubits
  quantum_circuit.h(1     )
  quantum_circuit.cx(1							,					0     )

  # send the information
  UpperCAmelCase			:				int										=					str(__lowerCamelCase     ) + str(__lowerCamelCase     )

  if c_information == "11":
    quantum_circuit.x(1     )
    quantum_circuit.z(1     )
  elif c_information == "10":
    quantum_circuit.z(1     )
  elif c_information == "01":
    quantum_circuit.x(1     )
  else:
    quantum_circuit.i(1     )

  # unentangled the circuit
  quantum_circuit.cx(1							,					0     )
  quantum_circuit.h(1     )

  # measure the circuit
  quantum_circuit.measure(__lowerCamelCase							,					__lowerCamelCase     )

  UpperCAmelCase			:				Any										=					Aer.get_backend('''aer_simulator'''     )
  UpperCAmelCase			:				Optional[Any]										=					execute(__lowerCamelCase							,					__lowerCamelCase							,					shots=1_000     )

  return job.result().get_counts(__lowerCamelCase     )


if __name__ == "__main__":
     print(f"""Counts for classical state send: {superdense_coding(1,1)}""")









from typing import Callable, Optional, Union

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


SCREAMING_SNAKE_CASE__       			=				logging.get_logger(__name__)

SCREAMING_SNAKE_CASE__       			=				{
    """microsoft/prophetnet-large-uncased""": (
        """https://huggingface.co/microsoft/prophetnet-large-uncased/resolve/main/config.json"""
    ),
}







class     __lowerCamelCase     (  snake_case_     ):


							"""simple docstring"""

							lowerCAmelCase__          =				"prophetnet"
							lowerCAmelCase__          =				["past_key_values"]
							lowerCAmelCase__          =				{
							    "num_attention_heads": "num_encoder_attention_heads",
							}




							def __init__(  self						,       UpperCAmelCase = 0.1						,       UpperCAmelCase = "gelu"						,       UpperCAmelCase = 30522						,       UpperCAmelCase = 1024						,       UpperCAmelCase = 4096						,       UpperCAmelCase = 12						,       UpperCAmelCase = 16						,       UpperCAmelCase = 4096						,       UpperCAmelCase = 12						,       UpperCAmelCase = 16						,       UpperCAmelCase = 0.1						,       UpperCAmelCase = 0.1						,       UpperCAmelCase = 512						,       UpperCAmelCase = 0.02						,       UpperCAmelCase = True						,       UpperCAmelCase = True						,       UpperCAmelCase = 0						,       UpperCAmelCase = 2						,       UpperCAmelCase = 32						,       UpperCAmelCase = 128						,       UpperCAmelCase = False						,       UpperCAmelCase = 0.0						,       UpperCAmelCase = True						,       UpperCAmelCase = 0						,       UpperCAmelCase = 1						,       UpperCAmelCase = 2						,       **UpperCAmelCase						,       )     ->       Dict:






								'''simple docstring'''






								lowercase_			 = vocab_size
								lowercase_			 = hidden_size
								lowercase_			 = encoder_ffn_dim
								lowercase_			 = num_encoder_layers
								lowercase_			 = num_encoder_attention_heads
								lowercase_			 = decoder_ffn_dim
								lowercase_			 = num_decoder_layers
								lowercase_			 = num_decoder_attention_heads
								lowercase_			 = max_position_embeddings
								lowercase_			 = init_std  # Normal(0, this parameter)
								lowercase_			 = activation_function

								# parameters for prophetnet
								lowercase_			 = ngram
								lowercase_			 = num_buckets
								lowercase_			 = relative_max_distance
								lowercase_			 = disable_ngram_loss
								lowercase_			 = eps

								# 3 Types of Dropout
								lowercase_			 = attention_dropout
								lowercase_			 = activation_dropout
								lowercase_			 = dropout

								lowercase_			 = use_cache

								super().__init__(
								    pad_token_id=UpperCAmelCase						,       bos_token_id=UpperCAmelCase						,       eos_token_id=UpperCAmelCase						,       is_encoder_decoder=UpperCAmelCase						,       add_cross_attention=UpperCAmelCase						,       decoder_start_token_id=UpperCAmelCase						,       **UpperCAmelCase						,       )




							@property
							def 				A__      (  self  )     ->       int:






								'''simple docstring'''






								return self.num_encoder_layers + self.num_decoder_layers




							@num_hidden_layers.setter
							def 				A__      (  self						,       UpperCAmelCase  )     ->       Any:






								'''simple docstring'''






								raise NotImplementedError(
								    "This model does not support the setting of `num_hidden_layers`. Please set `num_encoder_layers` and"
								    " `num_decoder_layers`."  )

