qiskit-documentation/docs/api/qiskit/qiskit.transpiler.passes.sy...

44 lines
2.8 KiB
Plaintext

---
title: QFTSynthesisLine (latest version)
description: API reference for qiskit.transpiler.passes.synthesis.hls_plugins.QFTSynthesisLine in the latest version of qiskit
in_page_toc_min_heading_level: 1
python_api_type: class
python_api_name: qiskit.transpiler.passes.synthesis.hls_plugins.QFTSynthesisLine
---
# QFTSynthesisLine
<Class id="qiskit.transpiler.passes.synthesis.hls_plugins.QFTSynthesisLine" isDedicatedPage={true} github="https://github.com/Qiskit/qiskit/tree/stable/1.3/qiskit/transpiler/passes/synthesis/hls_plugins.py#L802-L850" signature="qiskit.transpiler.passes.synthesis.hls_plugins.QFTSynthesisLine" modifiers="class">
Bases: [`HighLevelSynthesisPlugin`](qiskit.transpiler.passes.synthesis.plugin.HighLevelSynthesisPlugin "qiskit.transpiler.passes.synthesis.plugin.HighLevelSynthesisPlugin")
Synthesis plugin for QFT gates using linear connectivity.
This plugin name is :`qft.line` which can be used as the key on an [`HLSConfig`](qiskit.transpiler.passes.HLSConfig "qiskit.transpiler.passes.HLSConfig") object to use this method with [`HighLevelSynthesis`](qiskit.transpiler.passes.HighLevelSynthesis "qiskit.transpiler.passes.HighLevelSynthesis").
Note that the plugin mechanism is not applied if the gate is called `qft` but is not an instance of `QFTGate`. This allows users to create custom gates with name `qft`.
The plugin supports the following additional options:
* **reverse\_qubits (bool): Whether to synthesize the “QFT” operation (if `False`,**
which is the default) or the “QFT-with-reversal” operation (if `True`). Some implementation of the `QFTGate` include a layer of swap gates at the end of the synthesized circuit, which can in principle be dropped if the `QFTGate` itself is the last gate in the circuit.
* **approximation\_degree (int): the degree of approximation (0 for no approximation).**
It is possible to implement the QFT approximately by ignoring controlled-phase rotations with the angle beneath a threshold. This is discussed in more detail in \[1] or \[2].
**References**
1. Adriano Barenco, Artur Ekert, Kalle-Antti Suominen, and Päivi Törmä, *Approximate Quantum Fourier Transform and Decoherence*, Physical Review A (1996). [arXiv:quant-ph/9601018 \[quant-ph\]](https://arxiv.org/abs/quant-ph/9601018)
2. Donny Cheung, *Improved Bounds for the Approximate QFT* (2004), [arXiv:quant-ph/0403071 \[quant-ph\]](https://https://arxiv.org/abs/quant-ph/0403071)
## Methods
### run
<Function id="qiskit.transpiler.passes.synthesis.hls_plugins.QFTSynthesisLine.run" github="https://github.com/Qiskit/qiskit/tree/stable/1.3/qiskit/transpiler/passes/synthesis/hls_plugins.py#L834-L850" signature="run(high_level_object, coupling_map=None, target=None, qubits=None, **options)">
Run synthesis for the given QFTGate.
</Function>
</Class>