import math

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







def 	UpperCAmelCase       (		lowerCAmelCase_ = 1						,      lowerCAmelCase_ = 1       )	->	qiskit.result.counts.Counts:
     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
     a  :    int				=						QuantumRegister(2						,      '''qr'''       )
     a  :    Any				=						ClassicalRegister(2						,      '''cr'''       )

     a  :    List[Any]				=						QuantumCircuit(lowerCAmelCase_						,      lowerCAmelCase_       )

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

     # send the information
     a  :    Tuple				=						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_       )

     a  :    int				=						Aer.get_backend('''aer_simulator'''       )
     a  :    Any				=						execute(lowerCAmelCase_						,      lowerCAmelCase_						,      shots=1_0_0_0       )

     return job.result().get_counts(lowerCAmelCase_       )


if __name__ == "__main__":
  print(F'''Counts for classical state send: {superdense_coding(1,1)}''')
import unittest

from transformers import BlenderbotTokenizer, BlenderbotTokenizerFast
from transformers.utils import cached_property






class 							_SCREAMING_SNAKE_CASE(   unittest.TestCase	):
   @cached_property
   def _lowercase(    self    )	->List[str]:
        return BlenderbotTokenizer.from_pretrained('''facebook/blenderbot-3B'''    )
   @cached_property
   def _lowercase(    self    )	->str:
        return BlenderbotTokenizerFast.from_pretrained('''facebook/blenderbot-3B'''    )
   def _lowercase(    self    )	->str:
        a  :    Optional[int]				=						self.tokenizer_ab
        a  :    List[Any]				=						''' I am a small frog.'''
        a  :    Optional[Any]				=						tok([src_text]							,     padding=lowerCAmelCase_							,     truncation=lowerCAmelCase_    )['''input_ids''']
        a  :    int				=						tok.batch_decode(lowerCAmelCase_							,     skip_special_tokens=lowerCAmelCase_							,     clean_up_tokenization_spaces=lowerCAmelCase_    )[0]
        assert src_text == decoded
   def _lowercase(    self    )	->Dict:
        a  :    List[Any]				=						self.rust_tokenizer_ab
        a  :    str				=						''' I am a small frog.'''
        a  :    Tuple				=						tok([src_text]							,     padding=lowerCAmelCase_							,     truncation=lowerCAmelCase_    )['''input_ids''']
        a  :    Optional[Any]				=						tok.batch_decode(lowerCAmelCase_							,     skip_special_tokens=lowerCAmelCase_							,     clean_up_tokenization_spaces=lowerCAmelCase_    )[0]
        assert src_text == decoded
   def _lowercase(    self    )	->Tuple:
        assert self.tokenizer_ab.add_prefix_space
        assert self.tokenizer_ab([''' Sam''', '''Sam''']    ).input_ids == [[55_02, 2], [55_02, 2]]


   def _lowercase(    self    )	->Optional[Any]:
        assert self.rust_tokenizer_ab.add_prefix_space
        assert self.rust_tokenizer_ab([''' Sam''', '''Sam''']    ).input_ids == [[55_02, 2], [55_02, 2]]