"""simple docstring"""




import qiskit






def      UpperCAmelCase    (		UpperCamelCase__ = 2 ):






							"""simple docstring"""





							A__		   =							qubits

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

							# Creating a Quantum Circuit acting on the q register
							A__		   =							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
							A__		   =							qiskit.execute(SCREAMING_SNAKE_CASE_				,			SCREAMING_SNAKE_CASE_				,			shots=1_000 )

							return job.result().get_counts(SCREAMING_SNAKE_CASE_ )


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








def 	snake_case__			(    SCREAMING_SNAKE_CASE_		:    str			):



     '''simple docstring'''





     if not all(char in '01' for char in bin_string			):
          raise ValueError('Non-binary value was passed to the function'			)
     if not bin_string:
          raise ValueError('Empty string was passed to the function'			)
     lowercase__    :   Union[str, Any]      =       ''
     while len(SCREAMING_SNAKE_CASE_			) % 3 != 0:
          lowercase__    :   List[str]      =       '0' + bin_string
     lowercase__    :   Any      =       [
         bin_string[index : index + 3]
         for index in range(len(SCREAMING_SNAKE_CASE_			)			)
         if index % 3 == 0
     ]
     for bin_group in bin_string_in_3_list:
          lowercase__    :   str      =       0
          for index, val in enumerate(SCREAMING_SNAKE_CASE_			):
               oct_val += int(2 ** (2 - index) * int(SCREAMING_SNAKE_CASE_			)			)
          oct_string += str(SCREAMING_SNAKE_CASE_			)
     return oct_string


if __name__ == "__main__":
       from doctest import testmod

       testmod()

