


"""simple docstring"""

import qiskit


def lowerCAmelCase_      (				UpperCamelCase__	: int				,   UpperCamelCase__	: int ):






 """simple docstring"""







 __lowercase									=	qiskit.Aer.get_backend("""aer_simulator""" )

 # Create a Quantum Circuit acting on the q register
 __lowercase									=	qiskit.QuantumCircuit(UpperCamelCase__				,   UpperCamelCase__ )

 # Apply X (NOT) Gate to Qubits 0 & 1
 circuit.x(0 )
 circuit.x(1 )

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

 # Execute the circuit on the qasm simulator
 __lowercase									=	qiskit.execute(UpperCamelCase__				,   UpperCamelCase__				,   shots=1000 )

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


if __name__ == "__main__":
       UpperCAmelCase__  							=single_qubit_measure(2, 2)
       print(f"""Total count for various states are: {counts}""")




"""simple docstring"""

def lowerCAmelCase_      (				UpperCamelCase__	: Optional[Any]				,   UpperCamelCase__	: int				,   UpperCamelCase__	: Optional[Any]				,   UpperCamelCase__	: str ):






 """simple docstring"""







 __lowercase									=	[False] * len(UpperCamelCase__ )
 __lowercase									=	[]
 queue.append(UpperCamelCase__ )
 __lowercase									=	True

 while queue:
  __lowercase									=	queue.pop(0 )
  for ind in range(len(graph[u] ) ):
   if visited[ind] is False and graph[u][ind] > 0:
    queue.append(UpperCamelCase__ )
    __lowercase									=	True
    __lowercase									=	u

 return visited[t]


def lowerCAmelCase_      (				UpperCamelCase__	: str				,   UpperCamelCase__	: Any				,   UpperCamelCase__	: Optional[int] ):






 """simple docstring"""







 __lowercase									=	[-1] * (len(UpperCamelCase__ ))
 __lowercase									=	0
 while bfs(UpperCamelCase__				,   UpperCamelCase__				,   UpperCamelCase__				,   UpperCamelCase__ ):
  __lowercase									=	float("""Inf""" )
  __lowercase									=	sink

  while s != source:
   # Find the minimum value in select path
   __lowercase									=	min(UpperCamelCase__				,   graph[parent[s]][s] )
   __lowercase									=	parent[s]

  max_flow += path_flow
  __lowercase									=	sink

  while v != source:
   __lowercase									=	parent[v]
   graph[u][v] -= path_flow
   graph[v][u] += path_flow
   __lowercase									=	parent[v]
 return max_flow


UpperCAmelCase__  							=[
    [0, 16, 13, 0, 0, 0],
    [0, 0, 10, 12, 0, 0],
    [0, 4, 0, 0, 14, 0],
    [0, 0, 9, 0, 0, 20],
    [0, 0, 0, 7, 0, 4],
    [0, 0, 0, 0, 0, 0],
]

UpperCAmelCase__							,      UpperCAmelCase__  							=0, 5

print(ford_fulkerson(graph, source, sink))
