nBitAddition {QuantumOps}R Documentation

nBitAddition

Description

Strings together output from FullAdder function to create multi-(qu)bit addition. It assumes the input operands are laid out as in <DOI:10.1049/el:20020949>. From left to right (top to bottom) the order is C0, a1, b1, C1, a2, b2, C2, .... bn-1, Cn. There must be 3n+1 qubits in order to perform n-(qu)bit addition.

Usage

nBitAddition(n)

Arguments

n

Length of input (qu)bit strings.

Value

A list containing the quantum circuit (each elemented is one cycle of the circuit) performing n-bit addition.

Examples

## Not run: 
 nBitAddition(2)

## End(Not run)

[Package QuantumOps version 3.0.1 Index]