import qiskit







def 						A__  (					__A = 2	):







    '''simple docstring'''
    _lowerCamelCase     :		str 						=						qubits

    # Using Aer's simulator
    _lowerCamelCase     :		Optional[Any] 						=						qiskit.Aer.get_backend("""aer_simulator"""	)

    # Creating a Quantum Circuit acting on the q register
    _lowerCamelCase     :		Dict 						=						qiskit.QuantumCircuit(__A   , __A	)

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

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

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

    # 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
    _lowerCamelCase     :		Dict 						=						qiskit.execute(__A   , __A   , shots=1_000	)

    return job.result().get_counts(__A	)


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





def 						A__  (					__A	):







    '''simple docstring'''
    _lowerCamelCase     :		Tuple 						=						0
    for ch in input_str:
        _lowerCamelCase     :		Optional[Any] 						=						ord(__A	)
        _lowerCamelCase     :		List[str] 						=						pow(2   , __A	)

        # If we already turned on bit for current character's unicode
        if bitmap >> ch_unicode & 1 == 1:
            return False
        bitmap |= ch_bit_index_on
    return True


if __name__ == "__main__":
    import doctest

    doctest.testmod()




