





"""simple docstring"""





import os
from pathlib import Path
def 					__A  ()   ->List[str]:





  """simple docstring"""


  from torch.utils.cpp_extension import load

  lowerCAmelCase__     :List[Any]											=				Path(_SCREAMING_SNAKE_CASE     ).resolve().parent.parent.parent / 'kernels' / 'deformable_detr'
  lowerCAmelCase__     :int											=				[
      root / filename
      for filename in [
          'vision.cpp',
          os.path.join('cpu'	,  'ms_deform_attn_cpu.cpp'     ),
          os.path.join('cuda'	,  'ms_deform_attn_cuda.cu'     ),
      ]
  ]

  load(
      'MultiScaleDeformableAttention'	,  _SCREAMING_SNAKE_CASE	,  with_cuda=_SCREAMING_SNAKE_CASE	,  extra_include_paths=[str(_SCREAMING_SNAKE_CASE     )]	,  extra_cflags=['-DWITH_CUDA=1']	,  extra_cuda_cflags=[
          '-DCUDA_HAS_FP16=1',
          '-D__CUDA_NO_HALF_OPERATORS__',
          '-D__CUDA_NO_HALF_CONVERSIONS__',
          '-D__CUDA_NO_HALF2_OPERATORS__',
      ]	,  )

  import MultiScaleDeformableAttention as MSDA

  return MSDA






import qiskit

def lowercase    (  SCREAMING_SNAKE_CASE = 2 )			->							qiskit.result.counts.Counts:


			'''simple docstring'''







			SCREAMING_SNAKE_CASE_								=						qubits

			# Using Aer's simulator
			SCREAMING_SNAKE_CASE_								=						qiskit.Aer.get_backend('aer_simulator' )

			# Creating a Quantum Circuit acting on the q register
			SCREAMING_SNAKE_CASE_								=						qiskit.QuantumCircuit(SCREAMING_SNAKE_CASE       ,    SCREAMING_SNAKE_CASE )

			# Adding a H gate on qubit 0 (now q0 in superposition)
			circuit.h(0 )

			for i in range(1       ,    SCREAMING_SNAKE_CASE ):
						# Adding CX (CNOT) gate
						circuit.cx(i - 1       ,    SCREAMING_SNAKE_CASE )

			# Mapping the quantum measurement to the classical bits
			circuit.measure(list(range(SCREAMING_SNAKE_CASE ) )       ,    list(range(SCREAMING_SNAKE_CASE ) ) )

			# Now measuring any one qubit would affect other qubits to collapse
			# their super position and have same state as the measured one.

			# Executing the circuit on the simulator
			SCREAMING_SNAKE_CASE_								=						qiskit.execute(SCREAMING_SNAKE_CASE       ,    SCREAMING_SNAKE_CASE       ,    shots=10_00 )

			return job.result().get_counts(SCREAMING_SNAKE_CASE )


if __name__ == "__main__":
				print(f"""Total count for various states are: {quantum_entanglement(3)}""")
