





import math

import qiskit
def 					_A	(		SCREAMING_SNAKE_CASE					:       int = 1	,	SCREAMING_SNAKE_CASE					:       int = 1	,	SCREAMING_SNAKE_CASE					:       int = 1						):





  """simple docstring"""



  if (
      isinstance(SCREAMING_SNAKE_CASE	,	SCREAMING_SNAKE_CASE						)
      or isinstance(SCREAMING_SNAKE_CASE	,	SCREAMING_SNAKE_CASE						)
      or isinstance(SCREAMING_SNAKE_CASE	,	SCREAMING_SNAKE_CASE						)
  ):
    raise TypeError("inputs must be integers."						)

  if (input_a < 0) or (input_a < 0) or (carry_in < 0):
    raise ValueError("inputs must be positive."						)

  if (
      (math.floor(SCREAMING_SNAKE_CASE						) != input_a)
      or (math.floor(SCREAMING_SNAKE_CASE						) != input_a)
      or (math.floor(SCREAMING_SNAKE_CASE						) != carry_in)
  ):
    raise ValueError("inputs must be exact integers."						)

  if (input_a > 2) or (input_a > 2) or (carry_in > 2):
    raise ValueError("inputs must be less or equal to 2."						)

  # build registers
  a__     : List[str]  =qiskit.QuantumRegister(4	,	"qr"						)
  a__     : Tuple  =qiskit.ClassicalRegister(2	,	"cr"						)
  # list the entries
  a__     : Any  =[input_a, input_a, carry_in]

  a__     : Optional[int]  =qiskit.QuantumCircuit(SCREAMING_SNAKE_CASE	,	SCREAMING_SNAKE_CASE						)

  for i in range(0	,	3						):
    if entry[i] == 2:
      quantum_circuit.h(SCREAMING_SNAKE_CASE						)  # for hadamard entries
    elif entry[i] == 1:
      quantum_circuit.x(SCREAMING_SNAKE_CASE						)  # for 1 entries
    elif entry[i] == 0:
      quantum_circuit.i(SCREAMING_SNAKE_CASE						)  # for 0 entries

    # build the circuit
  quantum_circuit.ccx(0	,	1	,	3						)  # ccx = toffoli gate
  quantum_circuit.cx(0	,	1						)
  quantum_circuit.ccx(1	,	2	,	3						)
  quantum_circuit.cx(1	,	2						)
  quantum_circuit.cx(0	,	1						)

  quantum_circuit.measure([2, 3]	,	SCREAMING_SNAKE_CASE						)  # measure the last two qbits

  a__     : List[str]  =qiskit.Aer.get_backend("aer_simulator"						)
  a__     : Any  =qiskit.execute(SCREAMING_SNAKE_CASE	,	SCREAMING_SNAKE_CASE	,	shots=1_000						)

  return job.result().get_counts(SCREAMING_SNAKE_CASE						)


if __name__ == "__main__":
     print(F"""Total sum count for state is: {quantum_full_adder(1, 1, 1)}""")













import random
from typing import Any
def 					_A	(		SCREAMING_SNAKE_CASE					:       list						):





  """simple docstring"""



  for _ in range(len(SCREAMING_SNAKE_CASE						)						):
    a__     : Tuple  =random.randint(0	,	len(SCREAMING_SNAKE_CASE						) - 1						)
    a__     : Any  =random.randint(0	,	len(SCREAMING_SNAKE_CASE						) - 1						)
    a__ ,							a__     : Tuple  =data[b], data[a]
  return data


if __name__ == "__main__":
     UpperCAmelCase     :     Dict							=	[0, 1, 2, 3, 4, 5, 6, 7]
     UpperCAmelCase     :     Optional[Any]							=	["""python""", """says""", """hello""", """!"""]
     print("""Fisher-Yates Shuffle:""")
     print("""List""", integers, strings)
     print("""FY Shuffle""", fisher_yates_shuffle(integers), fisher_yates_shuffle(strings))






