





"""simple docstring"""




import os






def    _SCREAMING_SNAKE_CASE	(			_lowercase		:					List[Any]      )				->List[str]:






	'''simple docstring'''






	a   :	List[str]			=       len(grid[0]      )
	a   :	Union[str, Any]			=       len(_lowercase      )

	a   :	str			=       0
	a   :	List[str]			=       0
	a   :	List[Any]			=       0

	# Check vertically, horizontally, diagonally at the same time (only works
	# for nxn grid)
	for i in range(_lowercase      ):
		for j in range(n_rows - 3      ):
			a   :	Tuple			=       grid[j][i] * grid[j + 1][i] * grid[j + 2][i] * grid[j + 3][i]
			a   :	Dict			=       grid[i][j] * grid[i][j + 1] * grid[i][j + 2] * grid[i][j + 3]

			# Left-to-right diagonal (\) product
			if i < n_columns - 3:
				a   :	int			=       (
				    grid[i][j]
				    * grid[i + 1][j + 1]
				    * grid[i + 2][j + 2]
				    * grid[i + 3][j + 3]
				)

			# Right-to-left diagonal(/) product
			if i > 2:
				a   :	int			=       (
				    grid[i][j]
				    * grid[i - 1][j + 1]
				    * grid[i - 2][j + 2]
				    * grid[i - 3][j + 3]
				)

			a   :	List[Any]			=       max(
			    _lowercase					, _lowercase					, _lowercase					, _lowercase      )
			if max_product > largest:
				a   :	Any			=       max_product

	return largest






def    _SCREAMING_SNAKE_CASE	(			)				->Union[str, Any]:






	'''simple docstring'''






	a   :	List[str]			=       []
	with open(os.path.dirname(_lowercase      ) + "/grid.txt"      ) as file:
		for line in file:
			grid.append(line.strip("\n"      ).split(" "      )      )

	a   :	Dict			=       [[int(_lowercase      ) for i in grid[j]] for j in range(len(_lowercase      )      )]

	return largest_product(_lowercase      )


if __name__ == "__main__":
		print(solution())









"""simple docstring"""




import qiskit






def    _SCREAMING_SNAKE_CASE	(			_lowercase		:					int					, _lowercase		:					int      )				->qiskit.result.counts.Counts:






	'''simple docstring'''






	a   :	Union[str, Any]			=       qiskit.Aer.get_backend("aer_simulator"      )

	# Create a Quantum Circuit acting on the q register
	a   :	Optional[Any]			=       qiskit.QuantumCircuit(_lowercase					, _lowercase      )

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

	# Execute the circuit on the simulator
	a   :	Optional[int]			=       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)}''')


