


import math





def   _lowerCAmelCase				(   ) ->   None:





 """simple docstring"""







 A								=				input("""Enter message: """						)
 A								=				int(input(f'Enter key [2-{len(_lowercase						) - 1}]: '						)						)
 A								=				input("""Encryption/Decryption [e/d]: """						)

 if mode.lower().startswith("""e"""						):
  A								=				encrypt_message(_lowercase							,					_lowercase						)
 elif mode.lower().startswith("""d"""						):
  A								=				decrypt_message(_lowercase							,					_lowercase						)

 # Append pipe symbol (vertical bar) to identify spaces at the end.
 print(f'Output:\n{text + "|"}'						)





def   _lowerCAmelCase				(   UpperCamelCase__:     int							,					UpperCamelCase__:     str						) ->   str:





 """simple docstring"""







 A								=				[""] * key
 for col in range(_lowercase						):
  A								=				col
  while pointer < len(_lowercase						):
   cipher_text[col] += message[pointer]
   pointer += key
 return "".join(_lowercase						)





def   _lowerCAmelCase				(   UpperCamelCase__:     int							,					UpperCamelCase__:     str						) ->   str:





 """simple docstring"""







 A								=				math.ceil(len(_lowercase						) / key						)
 A								=				key
 A								=				(num_cols * num_rows) - len(_lowercase						)
 A								=				[""] * num_cols
 A								=				0
 A								=				0

 for symbol in message:
  plain_text[col] += symbol
  col += 1

  if (
      (col == num_cols)
      or (col == num_cols - 1)
      and (row >= num_rows - num_shaded_boxes)
  ):
   A								=				0
   row += 1

 return "".join(_lowercase						)


if __name__ == "__main__":
    import doctest

    doctest.testmod()
    main()







import qiskit





def   _lowerCAmelCase				(   UpperCamelCase__:     int = 2						) ->   qiskit.result.counts.Counts:





	"""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(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
	A								=				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)}''')



