
from ...configuration_utils import PretrainedConfig
from ...utils import logging
from ...utils.backbone_utils import BackboneConfigMixin, get_aligned_output_features_output_indices


__lowercase							:   Dict					=     logging.get_logger(__name__)

__lowercase							:   Any					=     {
    '''shi-labs/nat-mini-in1k-224''': '''https://huggingface.co/shi-labs/nat-mini-in1k-224/resolve/main/config.json''',
    # See all Nat models at https://huggingface.co/models?filter=nat
}

class 	__lowercase				(  a__      ,     a__    ):
			lowerCamelCase			:		Optional[int]	      =			"""nat"""

			lowerCamelCase			:		int	      =			{
			    """num_attention_heads""": """num_heads""",
			    """num_hidden_layers""": """num_layers""",
			}

			def __init__(self			,   A=4			,   A=3			,   A=6_4			,   A=[3, 4, 6, 5]			,   A=[2, 4, 8, 1_6]			,   A=7			,   A=3.0			,   A=True			,   A=0.0			,   A=0.0			,   A=0.1			,   A="gelu"			,   A=0.02			,   A=1E-5			,   A=0.0			,   A=None			,   A=None			,   **A			,   ):
								super().__init__(**lowerCAmelCase__      )

								lowerCamelCase_					:      Optional[Any]     =		patch_size
								lowerCamelCase_					:      Optional[int]     =		num_channels
								lowerCamelCase_					:      List[str]     =		embed_dim
								lowerCamelCase_					:      List[Any]     =		depths
								lowerCamelCase_					:      Optional[Any]     =		len(lowerCAmelCase__      )
								lowerCamelCase_					:      Any     =		num_heads
								lowerCamelCase_					:      Dict     =		kernel_size
								lowerCamelCase_					:      Optional[Any]     =		mlp_ratio
								lowerCamelCase_					:      Optional[Any]     =		qkv_bias
								lowerCamelCase_					:      List[Any]     =		hidden_dropout_prob
								lowerCamelCase_					:      int     =		attention_probs_dropout_prob
								lowerCamelCase_					:      Tuple     =		drop_path_rate
								lowerCamelCase_					:      int     =		hidden_act
								lowerCamelCase_					:      Any     =		layer_norm_eps
								lowerCamelCase_					:      List[str]     =		initializer_range
								# we set the hidden_size attribute in order to make Nat work with VisionEncoderDecoderModel
								# this indicates the channel dimension after the last stage of the model
								lowerCamelCase_					:      List[str]     =		int(embed_dim * 2 ** (len(lowerCAmelCase__      ) - 1)      )
								lowerCamelCase_					:      str     =		layer_scale_init_value
								lowerCamelCase_					:      Dict     =		["stem"] + [F"""stage{idx}""" for idx in range(1			,   len(lowerCAmelCase__      ) + 1      )]
								lowerCamelCase_					:      Optional[Any]     =		get_aligned_output_features_output_indices(
								    out_features=lowerCAmelCase__			,   out_indices=lowerCAmelCase__			,   stage_names=self.stage_names      )




'''simple docstring'''


import qiskit




def lowercase_	(   _lowercase			,       _lowercase				)     ->							qiskit.result.counts.Counts:
					'''simple docstring'''

					lowerCamelCase_					:      Optional[Any]     =		qiskit.Aer.get_backend('''aer_simulator'''				)

					# Create a Quantum Circuit acting on the q register
					lowerCamelCase_					:      Optional[int]     =		qiskit.QuantumCircuit(_lowercase			,       _lowercase				)

					# Apply X (NOT) Gate to Qubits 0 & 1
					circuit.x(0				)
					circuit.x(1				)

					# Map the quantum measurement to the classical bits
					circuit.measure([0, 1]			,       [0, 1]				)

					# Execute the circuit on the qasm simulator
					lowerCamelCase_					:      Optional[int]     =		qiskit.execute(_lowercase			,       _lowercase			,       shots=1_000				)

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


if __name__ == "__main__":
					__lowercase							:   List[Any]					=     single_qubit_measure(2, 2)
					print(f'Total count for various states are: {counts}')


