-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modifications to GenQASM to support RKQC output
- Loading branch information
ah744
committed
Jul 14, 2016
1 parent
141cd3d
commit ba74577
Showing
4 changed files
with
36 additions
and
641 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
rkqc reverseBits32(qint a[32]){ | ||
zero_to_garbage ancilla[32]; | ||
int i; | ||
for (i=0;i<32;i++){ | ||
// assign_value_of_b_to_a(ancilla[32-i-1],a[i],1); | ||
NOT(a[i]); | ||
toffoli(a[i%4],a[i],ancilla[i]); | ||
} | ||
} | ||
rkqc encrypt(){ | ||
qbit h0[32]; | ||
reverseBits32(h0); | ||
} | ||
|
||
int main() { | ||
encrypt(); | ||
return 0; | ||
} |
Oops, something went wrong.