ngnrsaa / qflex

Flexible Quantum Circuit Simulator (qFlex) implements an efficient tensor network, CPU-based simulator of large quantum circuits.
Apache License 2.0
97 stars 25 forks source link

execution error #63

Closed alexandrupaler closed 5 years ago

alexandrupaler commented 5 years ago

After the latest commit on the master branch I get the following error

./qflex.x 11 12 2 0.005 ./circuits/ben_11_16_0.txt ./ordering/bristlecone_48.txt ./grid/bristlecone_48.txt
The number of qubits read from the file: 70, does not match I*J: 132.
The second qubit of '1 cz 80 81' references (6, 9) which must be coordinates of an active qubit.
qflex.x: read_circuit.cpp:487: void qflex::circuit_data_to_grid_of_tensors(std::istream*, int, int, int, std::__cxx11::string, std::__cxx11::string, const std::optional<std::vector<std::vector<int> > >&, const std::optional<std::vector<std::vector<int> > >&, std::vector<std::vector<std::vector<qflex::Tensor> > >&, qflex::s_type*): Assertion `!second_qubit_off' failed.
95-martin-orion commented 5 years ago

The circuit file "ben_11_16_0.txt" assumes that you're using bristlecone_70 (thus the "70" at the top of the file). You'll need to use the corresponding ordering and grid files to run that circuit.

This behavior is intentional - the only reason this invocation worked before is because we were silently ignoring bad gates in the input. We'll need to update the relevant examples before resolving this issue.

alexandrupaler commented 5 years ago

i did not look at the file names...my bad...