Closed ryanxw closed 4 years ago
I have the same problem, but does it happen to QFT only? I tried to compile a toy code with -o option and I got the same segmentation fault.
This is the toy code:
int main() {
qbit a[1];
cbit m[1];
int ang = 15;
X(a[0]);
H(a[0]);
Rz(a[0], ang);
Rz(a[0], ang*2);
H(a[0]);
X(a[0]);
m[0] = MeasX(a[0]);
return 0;
}
Fixed in #41, Pull latest version
Thank you for the rapid update, but I was on the ScaffCC_OSX branch and I think the checkout to origin/master changes some settings so that it no longer works on macOS. How can I pull the latest version and at the same time maintain the compatibility on macOS?
The latest version of the master should be compatible on macOS and Ubuntu, the README is not correct. It does require that you have CMake and Ninja installed so that LLVM can be installed correctly.
Is there a particular issue you’re having?
I was not able to run ./build.sh, so I cloned the git repo again and rebuilt. Now it works, thank you!
$ ./scaffold.sh -o Algorithms/QFT/qft.scaffold
/bin/bash: line 5: 104 Segmentation fault ./build/Release+Asserts/bin/opt -load ./build/Release+Asserts/lib/Scaffold.so -Optimize qft12.inlined.ll 2> qft_optimized.qasmf > /dev/null [Scaffold.makefile] Optimized circuit written to qft_optimized.qasmf ...