The Quipper System

Safe HaskellNone

Quipper.Algorithms.GSE.GSE

Contents

Description

This module provides the main circuit for the GSE algorithm. This circuit consists of a state preparation, followed by a large number of Hamiltonian simulation terms for small time steps, followed by an inverse Quantum Fourier Transform and a final measurement.

Synopsis

Basic time step

These functions provide one- and two-electron operators for an individual Trotter time step θ. Each operator consists of a large number of individual Hamiltonian terms.

exp_pq :: ((Int, Int) -> Double) -> Double -> [Qubit] -> Qubit -> Circ () Source #

Apply the one-electron operator e-iθH, where H = hpq apaq if p = q and H = hpq (apaq + aqap) otherwise, to every pair of qubits pq in a register |ψ〉. The inputs are Hamiltonian data h, the angle θ, the register |ψ〉, and a control qubit.

exp_pqrs :: ((Int, Int, Int, Int) -> Double) -> Double -> [Qubit] -> Qubit -> Circ () Source #

Apply the two-electron operator e-iθH, where H = hpqrs apaqaras if (p,q) = (s,r) and H = apaqaras + asaraqap otherwise, to every quadruple (p, q, r, s) of qubits in a register |ψ〉. To ensure that terms are enumerated exactly once, we only consider indices where (p, q) ≥ (s, r) in the lexicographic order (i.e., p>s or (p=s and qr). The inputs are Hamiltonian data h, the angle θ, the register |ψ〉, and a control qubit.

exp_pqrs_orthodox :: ((Int, Int, Int, Int) -> Double) -> Double -> [Qubit] -> Qubit -> Circ () Source #

Like exp_pqrs, but use the "orthodox" circuit template for the Coulomb operator.

Iteration

The following function iterates the basic Trotter timestep Nk times, and also normalizes the maximum energy Emax.

unitary_hat_at Source #

Arguments

:: GSEData

The integral data hpq and hpqrs.

-> Int

The Trotter iteration count Nk.

-> Double

The Hamiltonian scaling parameter τ.

-> Double

The maximum energy Emax.

-> Bool

Use the "orthodox" Coulomb operator?

-> Int

The control qubit index k.

-> [Qubit]

The state |ψ〉.

-> Qubit

The control qubit bk.

-> Circ () 

Apply the operator ÛkeiEmaxτ2ke-iHτ2k to |ψ〉.

Main circuit

The main circuit for the GSE Algorithm. This consists of the initial state preparation, the Trotterized phase estimation circuit, the Quantum Fourier Transform, and the final measurement.

gse Source #

Arguments

:: Int

The number of precision qubits b.

-> Int

The number of basis functions M.

-> Int

The number of occupied orbitals N.

-> GSEData

The integral data hpq and hpqrs.

-> Double

The Hamiltonian scaling parameter τ.

-> Double

The maximum energy Emax.

-> (Int -> Int)

The function kNk.

-> Bool

Use the "orthodox" Coulomb operator?

-> Circ [Bit] 

The main circuit for the GSE Algorithm.