






"""simple docstring"""



import math

import qiskit
from qiskit import Aer, ClassicalRegister, QuantumCircuit, QuantumRegister, execute




def       snake_case__		(   _SCREAMING_SNAKE_CASE = 1       ,	_SCREAMING_SNAKE_CASE = 1			)    ->qiskit.result.counts.Counts:
 if isinstance(_SCREAMING_SNAKE_CASE       ,	_SCREAMING_SNAKE_CASE			) or isinstance(_SCREAMING_SNAKE_CASE       ,	_SCREAMING_SNAKE_CASE			):
  raise TypeError("""inputs must be integers."""			)
 if (bit_a < 0) or (bit_a < 0):
  raise ValueError("""inputs must be positive."""			)
 if (math.floor(_SCREAMING_SNAKE_CASE			) != bit_a) or (math.floor(_SCREAMING_SNAKE_CASE			) != bit_a):
  raise ValueError("""inputs must be exact integers."""			)
 if (bit_a > 1) or (bit_a > 1):
  raise ValueError("""inputs must be less or equal to 1."""			)

 # build registers
 UpperCAmelCase__ 						=				QuantumRegister(2       ,	"""qr"""			)
 UpperCAmelCase__ 						=				ClassicalRegister(2       ,	"""cr"""			)

 UpperCAmelCase__ 						=				QuantumCircuit(_SCREAMING_SNAKE_CASE       ,	_SCREAMING_SNAKE_CASE			)

 # entanglement the qubits
 quantum_circuit.h(1			)
 quantum_circuit.cx(1       ,	0			)

 # send the information
 UpperCAmelCase__ 						=				str(_SCREAMING_SNAKE_CASE			) + str(_SCREAMING_SNAKE_CASE			)

 if c_information == "11":
  quantum_circuit.x(1			)
  quantum_circuit.z(1			)
 elif c_information == "10":
  quantum_circuit.z(1			)
 elif c_information == "01":
  quantum_circuit.x(1			)
 else:
  quantum_circuit.i(1			)

 # unentangled the circuit
 quantum_circuit.cx(1       ,	0			)
 quantum_circuit.h(1			)

 # measure the circuit
 quantum_circuit.measure(_SCREAMING_SNAKE_CASE       ,	_SCREAMING_SNAKE_CASE			)

 UpperCAmelCase__ 						=				Aer.get_backend("""aer_simulator"""			)
 UpperCAmelCase__ 						=				execute(_SCREAMING_SNAKE_CASE       ,	_SCREAMING_SNAKE_CASE       ,	shots=1_0_0_0			)

 return job.result().get_counts(_SCREAMING_SNAKE_CASE			)


if __name__ == "__main__":
 print(F'''Counts for classical state send: {superdense_coding(1,1)}''')











"""simple docstring"""



import itertools
from pathlib import Path




def       snake_case__		(   _SCREAMING_SNAKE_CASE			)    ->int:
 UpperCAmelCase__ 						=				[tuple(_SCREAMING_SNAKE_CASE			) for login in logins]

 UpperCAmelCase__ 						=				{char for login in split_logins for char in login}

 for permutation in itertools.permutations(_SCREAMING_SNAKE_CASE			):
  UpperCAmelCase__ 						=				True
  for login in logins:
   if not (
       permutation.index(login[0]			)
       < permutation.index(login[1]			)
       < permutation.index(login[2]			)
   ):
    UpperCAmelCase__ 						=				False
    break

  if satisfied:
   return int("""""".join(_SCREAMING_SNAKE_CASE			)			)

 raise Exception("""Unable to find the secret passcode"""			)




def       snake_case__		(   _SCREAMING_SNAKE_CASE = "keylog.txt"			)    ->int:
 UpperCAmelCase__ 						=				Path(_SCREAMING_SNAKE_CASE			).parent.joinpath(_SCREAMING_SNAKE_CASE			).read_text().splitlines()

 return find_secret_passcode(_SCREAMING_SNAKE_CASE			)


if __name__ == "__main__":
 print(F'''{solution() = }''')



