Qft¶
Here are a couple of functions that implement the quantum fourier transform:
As the conditional rotations are defined by a parameter k we have a convenience function for this: theta = (+/-) 2pi/2^(|k|) :param k: the integer for the angle :return: the angle |
|
Applies the Quantum Fourier Transform to q :param self: the circuit to which the qft is applied :param q: the quantum register or list of quantum register/index tuples :return: the circuit with applied qft |
|
Applies the inverse Quantum Fourier Transform to q :param self: the circuit to which the qft_dag is applied :param q: the quantum register or list of quantum register/index tuples :return: the circuit with applied qft_dag |
See below for a description of the different functions to apply a quantum fourier transform
get_theta¶
qft¶
qft_dg¶
-
dc_qiskit_algorithms.Qft.
qft_dg
(self, q)[source]¶ Applies the inverse Quantum Fourier Transform to q :param self: the circuit to which the qft_dag is applied :param q: the quantum register or list of quantum register/index tuples :return: the circuit with applied qft_dag
-
dc_qiskit_algorithms.Qft.
get_theta
(k)[source]¶ As the conditional rotations are defined by a parameter k we have a convenience function for this: theta = (+/-) 2pi/2^(|k|) :param k: the integer for the angle :return: the angle
-
class
dc_qiskit_algorithms.Qft.
QuantumFourierTransformGate
(num_qubits)[source]¶ -
inverse
()[source]¶ Invert this instruction.
If the instruction is composite (i.e. has a definition), then its definition will be recursively inverted.
Special instructions inheriting from Instruction can implement their own inverse (e.g. T and Tdg, Barrier, etc.)
- Returns
a fresh instruction for the inverse
- Return type
qiskit.circuit.Instruction
- Raises
CircuitError – if the instruction is not composite and an inverse has not been implemented for it.
-