




'''simple docstring'''






from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_tf_available,
    is_tokenizers_available,
    is_torch_available,
)


_lowerCAmelCase				     = {
    '''configuration_deberta_v2''': ['''DEBERTA_V2_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''DebertaV2Config''', '''DebertaV2OnnxConfig'''],
    '''tokenization_deberta_v2''': ['''DebertaV2Tokenizer'''],
}

try:
				if not is_tokenizers_available():
								raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
				pass
else:
				_lowerCAmelCase				     = ['''DebertaV2TokenizerFast''']

try:
				if not is_tf_available():
								raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
				pass
else:
				_lowerCAmelCase				     = [
				    '''TF_DEBERTA_V2_PRETRAINED_MODEL_ARCHIVE_LIST''',
				    '''TFDebertaV2ForMaskedLM''',
				    '''TFDebertaV2ForQuestionAnswering''',
				    '''TFDebertaV2ForSequenceClassification''',
				    '''TFDebertaV2ForTokenClassification''',
				    '''TFDebertaV2Model''',
				    '''TFDebertaV2PreTrainedModel''',
				]

try:
				if not is_torch_available():
								raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
				pass
else:
				_lowerCAmelCase				     = [
				    '''DEBERTA_V2_PRETRAINED_MODEL_ARCHIVE_LIST''',
				    '''DebertaV2ForMaskedLM''',
				    '''DebertaV2ForMultipleChoice''',
				    '''DebertaV2ForQuestionAnswering''',
				    '''DebertaV2ForSequenceClassification''',
				    '''DebertaV2ForTokenClassification''',
				    '''DebertaV2Model''',
				    '''DebertaV2PreTrainedModel''',
				]


if TYPE_CHECKING:
				from .configuration_deberta_va import (
				    DEBERTA_V2_PRETRAINED_CONFIG_ARCHIVE_MAP,
				    DebertaVaConfig,
				    DebertaVaOnnxConfig,
				)
				from .tokenization_deberta_va import DebertaVaTokenizer

				try:
								if not is_tokenizers_available():
												raise OptionalDependencyNotAvailable()
				except OptionalDependencyNotAvailable:
								pass
				else:
								from .tokenization_deberta_va_fast import DebertaVaTokenizerFast

				try:
								if not is_tf_available():
												raise OptionalDependencyNotAvailable()
				except OptionalDependencyNotAvailable:
								pass
				else:
								from .modeling_tf_deberta_va import (
								    TF_DEBERTA_V2_PRETRAINED_MODEL_ARCHIVE_LIST,
								    TFDebertaVaForMaskedLM,
								    TFDebertaVaForQuestionAnswering,
								    TFDebertaVaForSequenceClassification,
								    TFDebertaVaForTokenClassification,
								    TFDebertaVaModel,
								    TFDebertaVaPreTrainedModel,
								)

				try:
								if not is_torch_available():
												raise OptionalDependencyNotAvailable()
				except OptionalDependencyNotAvailable:
								pass
				else:
								from .modeling_deberta_va import (
								    DEBERTA_V2_PRETRAINED_MODEL_ARCHIVE_LIST,
								    DebertaVaForMaskedLM,
								    DebertaVaForMultipleChoice,
								    DebertaVaForQuestionAnswering,
								    DebertaVaForSequenceClassification,
								    DebertaVaForTokenClassification,
								    DebertaVaModel,
								    DebertaVaPreTrainedModel,
								)

else:
				import sys

				_lowerCAmelCase				     = _LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)








'''simple docstring'''






import math

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

def       __lowerCAmelCase (   snake_case__ = 1 ,				snake_case__ = 1						):
			if isinstance(snake_case__ ,				snake_case__						) or isinstance(snake_case__ ,				snake_case__						):
						raise TypeError("inputs must be integers."						)
			if (bit_a < 0) or (bit_a < 0):
						raise ValueError("inputs must be positive."						)
			if (math.floor(snake_case__						) != bit_a) or (math.floor(snake_case__						) != 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				:      Tuple									=       QuantumRegister(2 ,				"qr"						)
			__UpperCamelCase				:      Dict									=       ClassicalRegister(2 ,				"cr"						)

			__UpperCamelCase				:      str									=       QuantumCircuit(snake_case__ ,				snake_case__						)

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

			# send the information
			__UpperCamelCase				:      Optional[Any]									=       str(snake_case__						) + str(snake_case__						)

			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(snake_case__ ,				snake_case__						)

			__UpperCamelCase				:      Dict									=       Aer.get_backend("aer_simulator"						)
			__UpperCamelCase				:      Tuple									=       execute(snake_case__ ,				snake_case__ ,				shots=1_000						)

			return job.result().get_counts(snake_case__						)


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



