Skip to main contentIBM Quantum Documentation
This page is from an old version of Qiskit SDK and does not exist in the latest version. We recommend you migrate to the latest version. See the release notes for more information.
Important

IBM Quantum Platform is moving and this version will be sunset on July 1. To get started on the new platform, read the migration guide.

Approximate

class Approximate(num_qubits, degree=0)

GitHub

The Approximate QFT.

This is an Approximate Quantum Fourier Transform as described in https://arxiv.org/abs/1803.04933.

Parameters

  • num_qubits (int) – The number of qubits
  • degree (int) – The degree of approximation. 0 is the minimum value and causes no approximation so will in fact be the same as a StandardQFT.

Methods

construct_circuit

Approximate.construct_circuit(mode='circuit', qubits=None, circuit=None, do_swaps=True)

Construct the circuit.

Parameters

  • mode (str) – ‘matrix’ or ‘circuit’
  • qubits (QuantumRegister or qubits) – register or qubits to build the circuit on.
  • circuit (QuantumCircuit) – circuit for construction.
  • do_swaps (bool) – include the swaps.

Returns

The matrix or circuit depending on the specified mode.

Return type

numpy.ndarray

Raises

AquaError – ‘Unrecognized mode

Was this page helpful?
Report a bug or request content on GitHub.