https://github.com/epiqc/ScaffCC
Tip revision: be5bfe685a7b7268af2ae0344c2ffe444e77f296 authored by ah744 on 20 August 2016, 18:31:59 UTC
Small script changes
Small script changes
Tip revision: be5bfe6
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;
}