https://github.com/epiqc/ScaffCC
Tip revision: 861c8b60980b0f4d36b101b45346a2e64b0fa390 authored by Pranav Gokhale on 05 February 2018, 05:29:11 UTC
update documentation and release notes
update documentation and release notes
Tip revision: 861c8b6
cat_state.n04.scaffold
module catN ( qbit *bit, const int n ) {
H( bit[0] );
for ( int i=1; i < n; i++ ) {
CNOT( bit[i], bit[i-1] );
}
}
module unCatN ( qbit *bit, const int n ) {
for ( int i=n-1; i > 0; i-- ) {
CNOT( bit[i], bit[i-1] );
}
H( bit[0] );
}
int main () {
qbit bits[4];
catN( bits, 4 );
return 0;
}