


'''simple docstring'''
def     a   (    __a     )						->			list[int]:



					'''simple docstring'''






					if length <= 0 or not isinstance(__a				,      __a     ):
										raise ValueError('''Length must be a positive integer.'''     )
					return [n * (2 * n - 1) for n in range(__a     )]


if __name__ == "__main__":
		print(hexagonal_numbers(length=5))
		print(hexagonal_numbers(length=10))



'''simple docstring'''
import qiskit


def     a   (    __a				,      __a     )						->			qiskit.result.counts.Counts:



					'''simple docstring'''






					UpperCamelCase__     :int							      =				qiskit.Aer.get_backend('''aer_simulator'''     )

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

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

					# Execute the circuit on the simulator
					UpperCamelCase__     :Optional[int]							      =				qiskit.execute(__a				,      __a				,      shots=1000     )

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


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