






from collections import deque


def   lowerCamelCase__			(     lowercase				):

  """simple docstring"""






  SCREAMING_SNAKE_CASE       :      Dict							=    len(lowercase				)
  SCREAMING_SNAKE_CASE       :      Any							=    deque()
  SCREAMING_SNAKE_CASE       :      List[Any]							=    [False for _ in range(lowercase				)]
  SCREAMING_SNAKE_CASE       :      Any							=    [-1 for _ in range(lowercase				)]
  SCREAMING_SNAKE_CASE       :      Optional[int]							=    index_of[:]

  def strong_connect(lowercase						,     lowercase						,     lowercase				):
    SCREAMING_SNAKE_CASE       :      str							=    index  # the number when this node is seen
    SCREAMING_SNAKE_CASE       :      Optional[int]							=    index  # lowest rank node reachable from here
    index += 1
    stack.append(lowercase				)
    SCREAMING_SNAKE_CASE       :      Any							=    True

    for w in g[v]:
      if index_of[w] == -1:
        SCREAMING_SNAKE_CASE       :      Union[str, Any]							=    strong_connect(lowercase						,     lowercase						,     lowercase				)
        SCREAMING_SNAKE_CASE       :      List[str]							=    (
            lowlink_of[w] if lowlink_of[w] < lowlink_of[v] else lowlink_of[v]
        )
      elif on_stack[w]:
        SCREAMING_SNAKE_CASE       :      Any							=    (
            lowlink_of[w] if lowlink_of[w] < lowlink_of[v] else lowlink_of[v]
        )

    if lowlink_of[v] == index_of[v]:
      SCREAMING_SNAKE_CASE       :      Any							=    []
      SCREAMING_SNAKE_CASE       :      int							=    stack.pop()
      SCREAMING_SNAKE_CASE       :      List[str]							=    False
      component.append(lowercase				)
      while w != v:
        SCREAMING_SNAKE_CASE       :      Tuple							=    stack.pop()
        SCREAMING_SNAKE_CASE       :      List[str]							=    False
        component.append(lowercase				)
      components.append(lowercase				)
    return index

  SCREAMING_SNAKE_CASE       :      Optional[int]							=    []
  for v in range(lowercase				):
    if index_of[v] == -1:
      strong_connect(lowercase						,     0						,     lowercase				)

  return components


def   lowerCamelCase__			(     lowercase						,     lowercase				):

  """simple docstring"""






  SCREAMING_SNAKE_CASE       :      str							=    [[] for _ in range(lowercase				)]
  for u, v in edges:
    g[u].append(lowercase				)
  return g


if __name__ == "__main__":
   # Test
   snake_case    				=		7
   snake_case    				=		[0, 0, 1, 2, 3, 3, 4, 4, 6]
   snake_case    				=		[1, 3, 2, 0, 1, 4, 5, 6, 5]
   snake_case    				=		[(u, v) for u, v in zip(source, target)]
   snake_case    				=		create_graph(n_vertices, edges)

   assert [[5], [6], [4], [3, 2, 1, 0]] == tarjan(g)














import qiskit


def   lowerCamelCase__			(     lowercase						,     lowercase				):

  """simple docstring"""






  SCREAMING_SNAKE_CASE       :      List[str]							=    qiskit.Aer.get_backend("aer_simulator"				)

  # Create a Quantum Circuit acting on the q register
  SCREAMING_SNAKE_CASE       :      Dict							=    qiskit.QuantumCircuit(lowercase						,     lowercase				)

  # Map the quantum measurement to the classical bits
  circuit.measure([0]						,     [0]				)

  # Execute the circuit on the simulator
  SCREAMING_SNAKE_CASE       :      Union[str, Any]							=    qiskit.execute(lowercase						,     lowercase						,     shots=1000				)

  # Return the histogram data of the results of the experiment.
  return job.result().get_counts(lowercase				)


if __name__ == "__main__":
   print(F"""Total count for various states are: {single_qubit_measure(1, 1)}""")






