Expand description
Commonly used quantum circuits.
You can easily use basic operations such as addition and subtraction and major quantum circuits such as quantum Fourier transform.
Functions§
- add_
const - A quantum circuit that directly overwrites the input qubit with the result of adding the value represented by the qubit and a constant.
- add_
const_ 2_ power - |0⟩|b⟩ → |overflow⟩|b + 2^m⟩
- cmm_
const - A circuit that multiplies input qubits by a constant and stores the result of modular operation using the constant in the input qubit.
- full_
adder_ bit - |a⟩|b⟩|C⟩|0⟩ → |a⟩|a+b+c⟩|C⟩|C_out⟩
- full_
adder_ nbits - |a⟩|b⟩|0⟩ → |a⟩|a+b⟩|0⟩
- half_
adder_ bit - Circuit that performs half addition on qubit
- inv_qft
- Circuit that performs inverse quantum Fourier transform
- me_
const - A circuit that outputs the result of modular operation with n_const after raising a_const to the power of the input qubit.
- mod_add
- A quantum circuit that stores the result of addition and modular operation in one input bit.
- mod_
add_ const - A quantum circuit that adds constants and multiplies modular operations using constants, and stores the result in one input bit.
- overflow_
qadd_ const - Add const_a to b and store the result in b. Store overflow results
- overflow_
qadd_ const_ 2_ power - Add the input 2 to the power of m to b and store the result in b. Store overflow results
- overflow_
qsub_ const - Substract const_a to b and store the result in b. Store overflow results
- qft
- Circuit that performs quantum Fourier transform
- sub_
const - |0⟩|b⟩|0⟩ → |sign⟩|b + a⟩|0⟩
- substract_
nbits - swap
- Swap Q-bit between index of a_in and b_in
- wrapping_
qadd_ const - Wrapping add const_a to b and store the result in b.
- wrapping_
qadd_ const_ 2_ power - Wrapping add the input 2 to the power of m to b and store the result in b. |b⟩ → |b + 2^m⟩
- wrapping_
qsub_ const - Wrapping substract const_a to b and store the result in b.