





"""simple docstring"""





import qiskit


def       lowerCamelCase_       (   UpperCAmelCase_ = 2  )						->qiskit.result.counts.Counts:





  """simple docstring"""


  __UpperCAmelCase    :						Any       =						qubits

  # Using Aer's simulator
  __UpperCAmelCase    :						str       =						qiskit.Aer.get_backend('''aer_simulator'''  )

  # Creating a Quantum Circuit acting on the q register
  __UpperCAmelCase    :						Any       =						qiskit.QuantumCircuit(UpperCAmelCase_  ,			UpperCAmelCase_  )

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

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

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

  # 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
  __UpperCAmelCase    :						Tuple       =						qiskit.execute(UpperCAmelCase_  ,			UpperCAmelCase_  ,			shots=10_00  )

  return job.result().get_counts(UpperCAmelCase_  )


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






"""simple docstring"""





# flake8: noqa
# Lint as: python3
lowercase__				:Tuple				   =       [
    'VerificationMode',
    'Version',
    'disable_progress_bar',
    'enable_progress_bar',
    'is_progress_bar_enabled',
    'experimental',
]

from .info_utils import VerificationMode
from .logging import disable_progress_bar, enable_progress_bar, is_progress_bar_enabled
from .version import Version
from .experimental import experimental