Description Usage Arguments Value Examples
Provides the quantum operatios for a full-adder with the specified input and output indices. Uses the circuit developed by Cheng and Tseng <DOI:10.1049/el:20020949>. Uses CNOT and TOFFOLI gates, with the TOFFOLI gates being broken down into H, T, and CNOT gates. The SUM (qu)bit gets places where the b operand (qu)bit is.
1 | FullAdder(n=4,cin=0,a=1,b=2,cout=3)
|
n |
Number of qubits in input quantum state |
cin |
index of the carry in (qu)bit |
a |
Index of the first operand (qu)bit |
b |
Index of the second operand (qu)bit |
cout |
Index where the output carry (qu)bit will be placed |
A list with elements containing the quantum operations (matrices) for the full adder in each cycle.
1 | FullAdder(n=4,cin=0,a=1,b=2,cout=3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.