From da3670dbd9725e906808e2de2c7c422f17408d23 Mon Sep 17 00:00:00 2001 From: Riddhima Deshmukh <115169787+ridds-io@users.noreply.github.com> Date: Tue, 8 Oct 2024 18:16:07 +0530 Subject: [PATCH] Update q_fourier_transform.py --- quantum/q_fourier_transform.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/quantum/q_fourier_transform.py b/quantum/q_fourier_transform.py index 3df545daa..7849b1150 100644 --- a/quantum/q_fourier_transform.py +++ b/quantum/q_fourier_transform.py @@ -1,21 +1,19 @@ -import math import numpy as np from qiskit import Aer, ClassicalRegister, QuantumCircuit, QuantumRegister, execute - def quantum_fourier_transform(number_of_qubits: int = 3) -> dict: """ - Build and simulate the Quantum Fourier Transform (QFT) circuit + Build and simulate the Quantum Fourier Transform (QFT) circuit for a given number of qubits using the Qiskit framework. - + Args: number_of_qubits (int): The number of qubits for the QFT circuit. Returns: dict: A dictionary containing the counts of measurement results. - + Raises: - ValueError: If the number of qubits is less than or equal to 0, + ValueError: If the number of qubits is less than or equal to 0, greater than 10, or not an integer. TypeError: If the input is not an integer. """