



'''simple docstring'''




def        lowerCAmelCase_     (			_lowerCamelCase:     Dict      ):
		return [
		    {
		        0: [1, 2],
		        1: [0, 2],
		        2: [0, 1, 3, 5],
		        3: [2, 4],
		        4: [3],
		        5: [2, 6, 8],
		        6: [5, 7],
		        7: [6, 8],
		        8: [5, 7],
		    },
		    {
		        0: [6],
		        1: [9],
		        2: [4, 5],
		        3: [4],
		        4: [2, 3],
		        5: [2],
		        6: [0, 7],
		        7: [6],
		        8: [],
		        9: [1],
		    },
		    {
		        0: [4],
		        1: [6],
		        2: [],
		        3: [5, 6, 7],
		        4: [0, 6],
		        5: [3, 8, 9],
		        6: [1, 3, 4, 7],
		        7: [3, 6, 8, 9],
		        8: [5, 7],
		        9: [5, 7],
		    },
		    {
		        0: [1, 3],
		        1: [0, 2, 4],
		        2: [1, 3, 4],
		        3: [0, 2, 4],
		        4: [1, 2, 3],
		    },
		][index]


def        lowerCAmelCase_     (			_lowerCamelCase:     dict[int, list[int]]      ):
		__SCREAMING_SNAKE_CASE :	List[str]					 =	0
		__SCREAMING_SNAKE_CASE :	Dict					 =	len(_lowerCamelCase      )  # No of vertices in graph
		__SCREAMING_SNAKE_CASE :	str					 =	[0] * n
		__SCREAMING_SNAKE_CASE :	Any					 =	[False] * n

		def dfs(_lowerCamelCase:     List[Any] ,   _lowerCamelCase:     List[Any] ,   _lowerCamelCase:     List[Any] ,   _lowerCamelCase:     Tuple      ):
				__SCREAMING_SNAKE_CASE :	Optional[Any]					 =	True
				__SCREAMING_SNAKE_CASE :	Tuple					 =	id_
				id_ += 1
				for to in graph[at]:
						if to == parent:
								pass
						elif not visited[to]:
								dfs(_lowerCamelCase ,   _lowerCamelCase ,   _lowerCamelCase ,   id_      )
								__SCREAMING_SNAKE_CASE :	int					 =	min(low[at] ,   low[to]      )
								if id_ <= low[to]:
										bridges.append((at, to) if at < to else (to, at)      )
						else:
								# This edge is a back edge and cannot be a bridge
								__SCREAMING_SNAKE_CASE :	Tuple					 =	min(low[at] ,   low[to]      )

		__SCREAMING_SNAKE_CASE :	list[tuple[int, int]]					 =	[]
		for i in range(_lowerCamelCase      ):
				if not visited[i]:
						dfs(_lowerCamelCase ,   -1 ,   _lowerCamelCase ,   id_      )
		return bridges


if __name__ == "__main__":
						import doctest

						doctest.testmod()




'''simple docstring'''




import qiskit


def        lowerCAmelCase_     (			_lowerCamelCase:     int = 2      ):
		__SCREAMING_SNAKE_CASE :	Dict					 =	qubits

		# Using Aer's simulator
		__SCREAMING_SNAKE_CASE :	Optional[Any]					 =	qiskit.Aer.get_backend("""aer_simulator"""      )

		# Creating a Quantum Circuit acting on the q register
		__SCREAMING_SNAKE_CASE :	str					 =	qiskit.QuantumCircuit(_lowerCamelCase ,   _lowerCamelCase      )

		# Adding a H gate on qubit 0 (now q0 in superposition)
		circuit.h(0      )

		for i in range(1 ,   _lowerCamelCase      ):
				# Adding CX (CNOT) gate
				circuit.cx(i - 1 ,   _lowerCamelCase      )

		# Mapping the quantum measurement to the classical bits
		circuit.measure(list(range(_lowerCamelCase      )      ) ,   list(range(_lowerCamelCase      )      )      )

		# Now measuring any one qubit would affect other qubits to collapse
		# their super position and have same state as the measured one.

		# Executing the circuit on the simulator
		__SCREAMING_SNAKE_CASE :	str					 =	qiskit.execute(_lowerCamelCase ,   _lowerCamelCase ,   shots=10_00      )

		return job.result().get_counts(_lowerCamelCase      )


if __name__ == "__main__":
						print(f"Total count for various states are: {quantum_entanglement(3)}")