





"""simple docstring"""




import qiskit






def    _SCREAMING_SNAKE_CASE	(			_lowercase		:					Optional[int] = 2      )				->qiskit.result.counts.Counts:






 '''simple docstring'''






 a   :	Optional[int]			=       qubits

 # Using Aer's simulator
 a   :	Dict			=       qiskit.Aer.get_backend("aer_simulator"      )

 # Creating a Quantum Circuit acting on the q register
 a   :	int			=       qiskit.QuantumCircuit(__lowerCAmelCase					, __lowerCAmelCase      )

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

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

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

 # 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
 a   :	Optional[int]			=       qiskit.execute(__lowerCAmelCase					, __lowerCAmelCase					, shots=1000      )

 return job.result().get_counts(__lowerCAmelCase      )


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









"""simple docstring"""




a		:				str  			=    8.314_4598






def    _SCREAMING_SNAKE_CASE	(			_lowercase		:					float					, _lowercase		:					float      )				->float:






	'''simple docstring'''






	if temperature < 0:
		raise Exception("Temperature cannot be less than 0 K"      )
	if molar_mass <= 0:
		raise Exception("Molar mass cannot be less than or equal to 0 kg/mol"      )
	else:
		return (3 * UNIVERSAL_GAS_CONSTANT * temperature / molar_mass) ** 0.5


if __name__ == "__main__":
		import doctest

		# run doctest
		doctest.testmod()

		# example
		a		:				Any  			=    300
		a		:				Dict  			=    28
		a		:				Dict  			=    rms_speed_of_molecule(temperature, molar_mass)
		print(F'''Vrms of Nitrogen gas at 300 K is {vrms} m/s''')


