https://github.com/epiqc/ScaffCC
Tip revision: 02af1d2c03d4a60dcccd62c989362fc04fb6fdd0 authored by ah744 on 07 October 2016, 02:35:58 UTC
SIMD Scheduler Modifications
SIMD Scheduler Modifications
Tip revision: 02af1d2
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;
}