Skip to content

Latest commit

 

History

History
31 lines (23 loc) · 765 Bytes

quantum_algorithms.rst

File metadata and controls

31 lines (23 loc) · 765 Bytes

Quantum Algorithms

Functions to set up common quantum algorithms in Qiskit for a given number of qubits.

All functions take the number of qubits as argument and return the corresponding Qiskit circuit. One can then use the Qiskit backend to transpile the circuit for a specific quantum device.

from quantum_gates.quantum_algorithms import (
    hadamard_reverse_qft_circ,
    ghz_circ,
    qft_circ
    qaoa_circ
)

nqubit = 2
circuit = hadamard_reverse_qft_circ(nqubit=2)
circ.draw('mpl')

quantum_gates.quantum_algorithms