Revision 0c99b1003662bd784e6c4d9d5053874918cc5ade authored by EPiQC on 08 July 2019, 21:28:06 UTC, committed by GitHub on 08 July 2019, 21:28:06 UTC
Segmentation Faults and Fixes to Run main branch on macOS
cSWAP.scaffold
module cSWAP (
qbit ctrl,
qbit a,
qbit b
) {
CNOT(b, a);
Toffoli(ctrl, a, b);
CNOT(b, a);
}
// Scaffold doesn't allow overloading module names based on module parameter signature
// cSWAPs is vector of gates on vectors of qubits
module cSWAPs (
qbit ctrl,
const unsigned int width,
qbit a[],
qbit b[]
) {
for (int i=0; i<width; i++) {
CNOT(b[i], a[i]);
Toffoli(ctrl, a[i], b[i]);
CNOT(b[i], a[i]);
}
}

Computing file changes ...