diff --git a/torchquantum/algorithm/qft.py b/torchquantum/algorithm/qft.py index f8773678..704736e0 100644 --- a/torchquantum/algorithm/qft.py +++ b/torchquantum/algorithm/qft.py @@ -3,6 +3,7 @@ __all__ = ["QFT"] + class QFT(object): def __init__( self, n_wires: int = None, wires: Iterable = None, do_swaps=True @@ -23,7 +24,9 @@ def __init__( def construct_qft_circuit(self) -> tq.QuantumModule: """Construct the QFT circuit.""" - return tq.layer.QFTLayer(n_wires=self.n_wires, wires=self.wires, do_swaps=self.do_swaps) + return tq.layer.QFTLayer( + n_wires=self.n_wires, wires=self.wires, do_swaps=self.do_swaps + ) def construct_inverse_qft_circuit(self) -> tq.QuantumModule: """Construct the inverse of a QFT circuit."""