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

Improve failure-case behavior #33

Closed 95-martin-orion closed 5 years ago

95-martin-orion commented 5 years ago

In the event of a test failure, it's important that users get a clear idea of how and why the test failed. Steps to achieve this include:

  1. Unit-testing all assert() calls, to build user confidence in code correctness.
  2. Providing clear and unique error messages for each failure case, so users can tell at a glance where the test failed and why.
  3. Adding assertions and log messages to unprotected segfault locations, since segfaults are notoriously difficult to track down.
95-martin-orion commented 5 years ago

Work on this has progressed sufficiently for the sake of initial release. Further work on moving away from assert() is tracked by issue #40.