





"""simple docstring"""


import qiskit

def      UpperCamelCase							(SCREAMING_SNAKE_CASE							,     SCREAMING_SNAKE_CASE     ):
						UpperCamelCase				:		Union[str, Any]				   =			qiskit.Aer.get_backend("""aer_simulator"""     )

						# Create a Quantum Circuit acting on the q register
						UpperCamelCase				:		List[Any]				   =			qiskit.QuantumCircuit(SCREAMING_SNAKE_CASE							,     SCREAMING_SNAKE_CASE     )

						# 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
						UpperCamelCase				:		Tuple				   =			qiskit.execute(SCREAMING_SNAKE_CASE							,     SCREAMING_SNAKE_CASE							,     shots=1000     )

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


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










"""simple docstring"""


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


__magic_name__       :					Dict						=			logging.get_logger(__name__)

__magic_name__       :					List[str]						=			{
    """microsoft/swinv2-tiny-patch4-window8-256""": (
        """https://huggingface.co/microsoft/swinv2-tiny-patch4-window8-256/resolve/main/config.json"""
    ),
}






class 							lowercase__			(   __SCREAMING_SNAKE_CASE	):

			"""simple docstring"""
			__lowerCAmelCase     :				List[str]										=  """swinv2"""

			__lowerCAmelCase     :				Optional[Any]										=  {
			    """num_attention_heads""": """num_heads""",
			    """num_hidden_layers""": """num_layers""",
			}







			def __init__(      self						,   _A=2_2_4						,   _A=4						,   _A=3						,   _A=9_6						,   _A=[2, 2, 6, 2]						,   _A=[3, 6, 1_2, 2_4]						,   _A=7						,   _A=4.0						,   _A=True						,   _A=0.0						,   _A=0.0						,   _A=0.1						,   _A="gelu"						,   _A=False						,   _A=0.02						,   _A=1e-5						,   _A=3_2						,   **_A						,   ):






									'''simple docstring'''







									super().__init__(**_A    )

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



