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 24 forks source link

Fix memory cmd argument. #254

Closed s-mandra closed 4 years ago

s-mandra commented 4 years ago

At the moment, --memory requires an integer representing the maximum amount of memory (in bytes) allowed during the simulation. This PR fixes the issues by allowing human-readable strings as 10GB.

s-mandra commented 4 years ago

This change looks fine - it shouldn't be causing the test failures. Maybe a sync is needed?

Yeah .. not sure why. Looking into it.

s-mandra commented 4 years ago

This change looks fine - it shouldn't be causing the test failures. Maybe a sync is needed?

The problem seems to be related to some issues with Docker (it compiles and run all the tests in my linux machine).

s-mandra commented 4 years ago

This change looks fine - it shouldn't be causing the test failures. Maybe a sync is needed?

The problem seems to be related to some issues with Docker (it compiles and run all the tests in my linux machine).

Found the error: when called directly, qFlex library tries to access qflex::global::memory_limit which is uninitialized (because, for regular calls, docopt does it). In Docker containers, qflex::global::memory_limit is set to zero, which makes the simulation throw an error. Fixing it.