
"""simple docstring"""







from .imports import is_tqdm_available


if is_tqdm_available():
					from tqdm.auto import tqdm as _tqdm

from ..state import PartialState
def    __lowerCAmelCase    (_UpperCamelCase = True	,  *_UpperCamelCase	,  **_UpperCamelCase		):
	if not is_tqdm_available():
		raise ImportError('Accelerate\'s `tqdm` module requires `tqdm` to be installed. Please run `pip install tqdm`.'		)
	__lowerCAmelCase      :						Optional[Any]						      =				False
	if main_process_only:
		__lowerCAmelCase      :						str						      =				PartialState().local_process_index == 0
	return _tqdm(*_UpperCamelCase	,  **_UpperCamelCase	,  disable=_UpperCamelCase		)

"""simple docstring"""







import qiskit
def    __lowerCAmelCase    (_UpperCamelCase	,  _UpperCamelCase		):
	__lowerCAmelCase      :						Union[str, Any]						      =				qiskit.Aer.get_backend('aer_simulator'		)

	# Create a Quantum Circuit acting on the q register
	__lowerCAmelCase      :						str						      =				qiskit.QuantumCircuit(_UpperCamelCase	,  _UpperCamelCase		)

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

	# Execute the circuit on the simulator
	__lowerCAmelCase      :						Optional[int]						      =				qiskit.execute(_UpperCamelCase	,  _UpperCamelCase	,  shots=1000		)

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


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