


"""simple docstring"""






lowercase  		=			{
    """A""": ("""ABCDEFGHIJKLM""", """NOPQRSTUVWXYZ"""),
    """B""": ("""ABCDEFGHIJKLM""", """NOPQRSTUVWXYZ"""),
    """C""": ("""ABCDEFGHIJKLM""", """ZNOPQRSTUVWXY"""),
    """D""": ("""ABCDEFGHIJKLM""", """ZNOPQRSTUVWXY"""),
    """E""": ("""ABCDEFGHIJKLM""", """YZNOPQRSTUVWX"""),
    """F""": ("""ABCDEFGHIJKLM""", """YZNOPQRSTUVWX"""),
    """G""": ("""ABCDEFGHIJKLM""", """XYZNOPQRSTUVW"""),
    """H""": ("""ABCDEFGHIJKLM""", """XYZNOPQRSTUVW"""),
    """I""": ("""ABCDEFGHIJKLM""", """WXYZNOPQRSTUV"""),
    """J""": ("""ABCDEFGHIJKLM""", """WXYZNOPQRSTUV"""),
    """K""": ("""ABCDEFGHIJKLM""", """VWXYZNOPQRSTU"""),
    """L""": ("""ABCDEFGHIJKLM""", """VWXYZNOPQRSTU"""),
    """M""": ("""ABCDEFGHIJKLM""", """UVWXYZNOPQRST"""),
    """N""": ("""ABCDEFGHIJKLM""", """UVWXYZNOPQRST"""),
    """O""": ("""ABCDEFGHIJKLM""", """TUVWXYZNOPQRS"""),
    """P""": ("""ABCDEFGHIJKLM""", """TUVWXYZNOPQRS"""),
    """Q""": ("""ABCDEFGHIJKLM""", """STUVWXYZNOPQR"""),
    """R""": ("""ABCDEFGHIJKLM""", """STUVWXYZNOPQR"""),
    """S""": ("""ABCDEFGHIJKLM""", """RSTUVWXYZNOPQ"""),
    """T""": ("""ABCDEFGHIJKLM""", """RSTUVWXYZNOPQ"""),
    """U""": ("""ABCDEFGHIJKLM""", """QRSTUVWXYZNOP"""),
    """V""": ("""ABCDEFGHIJKLM""", """QRSTUVWXYZNOP"""),
    """W""": ("""ABCDEFGHIJKLM""", """PQRSTUVWXYZNO"""),
    """X""": ("""ABCDEFGHIJKLM""", """PQRSTUVWXYZNO"""),
    """Y""": ("""ABCDEFGHIJKLM""", """OPQRSTUVWXYZN"""),
    """Z""": ("""ABCDEFGHIJKLM""", """OPQRSTUVWXYZN"""),
}



def 			A__		(					_UpperCAmelCase    :      str	)							->	list[tuple[str, str]]:

	'''simple docstring'''


	return [alphabet[char] for char in key.upper()]



def 			A__		(					_UpperCAmelCase    :      str				,    _UpperCAmelCase    :      str	)							->	str:

	'''simple docstring'''


	snake_case__  :						Tuple		=      ""
	snake_case__  :						Dict		=      0
	snake_case__  :						List[str]		=      generate_table(_UpperCAmelCase	)
	for char in words.upper():
		cipher += get_opponent(table[count]				,    _UpperCAmelCase	)
		snake_case__  :						List[Any]		=      (count + 1) % len(_UpperCAmelCase	)
	return cipher



def 			A__		(					_UpperCAmelCase    :      str				,    _UpperCAmelCase    :      str	)							->	str:

	'''simple docstring'''


	return encrypt(_UpperCAmelCase				,    _UpperCAmelCase	)



def 			A__		(					_UpperCAmelCase    :      tuple[str, str]				,    _UpperCAmelCase    :      str	)							->	tuple[int, int]:

	'''simple docstring'''


	snake_case__  :						List[Any]		=      0 if char in table[0] else 1
	snake_case__  :						List[Any]		=      table[row].index(_UpperCAmelCase	)
	return row, col



def 			A__		(					_UpperCAmelCase    :      tuple[str, str]				,    _UpperCAmelCase    :      str	)							->	str:

	'''simple docstring'''


	snake_case__,					snake_case__  :						Union[str, Any]		=      get_position(_UpperCAmelCase				,    char.upper()	)
	if row == 1:
		return table[0][col]
	else:
		return table[1][col] if row == 0 else char


if __name__ == "__main__":
					import doctest

					doctest.testmod()  # Fist ensure that all our tests are passing...
					lowercase  		=			input("""Enter key: """).strip()
					lowercase  		=			input("""Enter text to encrypt: """).strip()
					lowercase  		=			encrypt(key, text)

					print(f"Encrypted: {cipher_text}")
					print(f"Decrypted with key: {decrypt(key, cipher_text)}")












'''simple docstring'''


import numpy as np
import qiskit
from qiskit import Aer, ClassicalRegister, QuantumCircuit, QuantumRegister, execute




def       A							(      _UpperCAmelCase   :				float = np.pi / 2						,_UpperCAmelCase   :				float = np.pi / 2						,_UpperCAmelCase   :				float = np.pi / 2					)  ->				qiskit.result.counts.Counts:


  '''simple docstring'''




  __lowerCAmelCase		:    Optional[int]			     =  QuantumRegister(3						,'qr'					)  # Define the number of quantum bits
  __lowerCAmelCase		:    Optional[int]			     =  ClassicalRegister(1						,'cr'					)  # Define the number of classical bits

  __lowerCAmelCase		:    List[Any]			     =  QuantumCircuit(_UpperCAmelCase						,_UpperCAmelCase					)  # Define the quantum circuit.

  # Build the circuit
  quantum_circuit.u(_UpperCAmelCase						,_UpperCAmelCase						,_UpperCAmelCase						,0					)  # Quantum State to teleport
  quantum_circuit.h(1					)  # add hadamard gate
  quantum_circuit.cx(
      1						,2					)  # add control gate with qubit 1 as control and 2 as target.
  quantum_circuit.cx(0						,1					)
  quantum_circuit.h(0					)
  quantum_circuit.cz(0						,2					)  # add control z gate.
  quantum_circuit.cx(1						,2					)

  quantum_circuit.measure([2]						,[0]					)  # measure the qubit.

  # Simulate the circuit using qasm simulator
  __lowerCAmelCase		:    List[str]			     =  Aer.get_backend('aer_simulator'					)
  __lowerCAmelCase		:    Optional[Any]			     =  execute(_UpperCAmelCase						,_UpperCAmelCase						,shots=1_0_0_0					)

  return job.result().get_counts(_UpperCAmelCase					)


if __name__ == "__main__":
    print(
        "Total count for teleported state is: "
        F'''{quantum_teleportation(np.pi/2, np.pi/2, np.pi/2)}'''
    )





