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


__lowercase											=      logging.get_logger(__name__)

__lowercase											=      {
    '''naver-clova-ix/donut-base''': '''https://huggingface.co/naver-clova-ix/donut-base/resolve/main/config.json''',
    # See all Donut models at https://huggingface.co/models?filter=donut-swin
}


class 			lowerCamelCase_  (     UpperCAmelCase_				):






   '''simple docstring'''






   a__			:		int      			=   """donut-swin"""

   a__			:		Union[str, Any]      			=   {
       """num_attention_heads""": """num_heads""",
       """num_hidden_layers""": """num_layers""",
   }







   def __init__(			self				,				__lowercase=224				,				__lowercase=4				,				__lowercase=3				,				__lowercase=96				,				__lowercase=[2, 2, 6, 2]				,				__lowercase=[3, 6, 12, 24]				,				__lowercase=7				,				__lowercase=4.0				,				__lowercase=True				,				__lowercase=0.0				,				__lowercase=0.0				,				__lowercase=0.1				,				__lowercase="gelu"				,				__lowercase=False				,				__lowercase=0.02				,				__lowercase=1E-5				,				**__lowercase				,				) ->			str:
       super().__init__(**__lowercase)

       __UpperCamelCase  :List[str]    						=	image_size
       __UpperCamelCase  :List[str]    						=	patch_size
       __UpperCamelCase  :Any    						=	num_channels
       __UpperCamelCase  :Optional[Any]    						=	embed_dim
       __UpperCamelCase  :Optional[Any]    						=	depths
       __UpperCamelCase  :Optional[int]    						=	len(__lowercase)
       __UpperCamelCase  :Any    						=	num_heads
       __UpperCamelCase  :Union[str, Any]    						=	window_size
       __UpperCamelCase  :str    						=	mlp_ratio
       __UpperCamelCase  :Any    						=	qkv_bias
       __UpperCamelCase  :Tuple    						=	hidden_dropout_prob
       __UpperCamelCase  :List[Any]    						=	attention_probs_dropout_prob
       __UpperCamelCase  :List[Any]    						=	drop_path_rate
       __UpperCamelCase  :str    						=	hidden_act
       __UpperCamelCase  :List[Any]    						=	use_absolute_embeddings
       __UpperCamelCase  :List[str]    						=	layer_norm_eps
       __UpperCamelCase  :Optional[int]    						=	initializer_range
       # we set the hidden_size attribute in order to make Swin work with VisionEncoderDecoderModel
       # this indicates the channel dimension after the last stage of the model
       __UpperCamelCase  :Union[str, Any]    						=	int(embed_dim * 2 ** (len(__lowercase) - 1))






import qiskit



def lowerCamelCase						(     SCREAMING_SNAKE_CASE						,    SCREAMING_SNAKE_CASE			):
    '''simple docstring'''







    __UpperCamelCase  :Dict    						=	qiskit.Aer.get_backend('''aer_simulator'''			)

    __UpperCamelCase  :Tuple    						=	qiskit.QuantumCircuit(4						,    2			)
    # encode inputs in qubits 0 and 1
    if bita == 1:
        qc_ha.x(0			)
    if bita == 1:
        qc_ha.x(1			)
    qc_ha.barrier()

    # use cnots to write XOR of the inputs on qubit2
    qc_ha.cx(0						,    2			)
    qc_ha.cx(1						,    2			)

    # use ccx / toffoli gate to write AND of the inputs on qubit3
    qc_ha.ccx(0						,    1						,    3			)
    qc_ha.barrier()

    # extract outputs
    qc_ha.measure(2						,    0			)  # extract XOR value
    qc_ha.measure(3						,    1			)  # extract AND value

    # Execute the circuit on the qasm simulator
    __UpperCamelCase  :Optional[Any]    						=	qiskit.execute(SCREAMING_SNAKE_CASE						,    SCREAMING_SNAKE_CASE						,    shots=1_000			)

    # Return the histogram data of the results of the experiment
    return job.result().get_counts(SCREAMING_SNAKE_CASE			)


if __name__ == "__main__":
    __lowercase											=      half_adder(1, 1)
    print(F'Half Adder Output Qubit Counts: {counts}')





