zapata-engineering / orqviz

Python package for visualizing the loss landscape of parameterized quantum algorithms.
Apache License 2.0
84 stars 18 forks source link

Utilize tqdm progress bar when verbose=True during scans. #40

Open MSRudolph opened 2 years ago

MSRudolph commented 2 years ago

Is your feature request related to a problem? Please describe. We should replace the print calls when verbose=True in scans with tqdm from the tqdm library. Alternatively, we make it the default and find a way to mute the library's prints.

Describe the solution you'd like

verbose = True  # or False
for it in tqdm(range(n_iters), disable = not verbose):
   ...  # run scans

Additional context Our verbosity options are currently very rudimentary and tqdm is one of the most used Python libraries.

mstechly commented 2 years ago

I would make sure to check in with some other people on what are the tools they're using for logging, as I know some people did some research on that and would be good to make it consistent across the codebase.

MSRudolph commented 2 years ago

@mstechly, what do you mean with tools for logging? This would only print the scan progress in ASCII characters.