mimiqcircuits.operations.gates.generalized.qft

Quantum Fourier Transform (QFT).

Classes

QFT(*args)

Quantum Fourier transform.

class mimiqcircuits.operations.gates.generalized.qft.QFT(*args)[source]

Bases: Gate

Quantum Fourier transform.

Performs the quantum Fourier transform on a register of n qubits.

Parameters:

n (int) – The number of qubits in the quantum register.

Raises:

ValueError – If the number of qubits is less than 1.

Returns:

The Quantum Fourier Transform operation.

Return type:

QFT

name

The name of the operation.

Type:

str

num_qubits

The number of qubits in the quantum register.

Type:

int

qregsizes

The sizes of the quantum registers.

Type:

list of int

Examples

>>> from mimiqcircuits import *
>>> c=Circuit()
>>> c.push(QFT(2),1,2)
3-qubit circuit with 1 instruction:
└── QFT @ q[1:2]
__init__(num_qubits)[source]