The Quipper System

Safe HaskellNone

Quipper.Algorithms.BWT.Definitions

Contents

Description

This module provides some convenient definitions for the Binary Welded Tree algorithm implementation.

Synopsis

Some convenient gates

wGate :: (Qubit, Qubit) -> Circ () Source #

Apply the binary W-gate to a pair of qubits. The W-gate diagonalizes the SWAP operation.

wGateInverse :: (Qubit, Qubit) -> Circ () Source #

Apply the inverse of the W-gate. Note: since the W-gate is self-inverse, this is really the same as wGate. However, we define this as a separate function for clarity.

toffoliGate :: (Qubit, Qubit, Qubit) -> Circ () Source #

Apply a doubly-controlled not gate to a triple of qubits (a, b, c). Here the qubit c is negated if a=1 and b=0.

controlledExpGate :: (Timestep, Qubit, Qubit) -> Circ () Source #

controlledExpGate(t, r, h): Apply the eiZt gate to the qubit h, provided that r=0.