Skip to content

Commit

Permalink
Log reader section added.
Browse files Browse the repository at this point in the history
  • Loading branch information
nwittler committed Aug 18, 2021
1 parent 0bf3c92 commit 05b893b
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ When combined in sequence, these three procedures represent a recipe for system
optimal_control
Simulated_calibration
Simulated_Model_Learning
log_reader
c3_qiskit_example
c3

Expand Down
48 changes: 48 additions & 0 deletions docs/log_reader.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
Logs and current optimization status
====================================

During optimizations (optimal control, calibration, model learning), a
current best point is stored in the log folder to monitor progress.
Called on a log file it will print a
`rich <https://github.com/willmcgugan/rich>`__ table of the current
status. With the ``-w`` or ``-- watch`` options the table will keep
updating.

.. code:: bash
c3/utils/log_reader.py -h
.. code-block::
usage: log_reader.py [-h] [-w WATCH] log_file
positional arguments:
log_file
optional arguments:
-h, --help show this help message and exit
-w WATCH, --watch WATCH
Update the table every WATCH seconds.
Using the example log from the test folder:

.. code:: bash
c3/utils/log_reader.py test/sample_optim_log.log
.. parsed-literal::
Optimization reached 0.00462 at Tue Aug 17 15:28:09 2021
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━┓
┃ Parameter ┃ Value ┃ Gradient ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━┩
│ rx90p[0]-d1-gauss-amp │ 497.311 mV │ 18.720 mV │
│ rx90p[0]-d1-gauss-freq_offset │ -52.998 MHz 2pi │ -414.237 µHz 2pi │
│ rx90p[0]-d1-gauss-xy_angle │ -47.409 mrad │ 2.904 mrad │
│ rx90p[0]-d1-gauss-delta │ -1.077 │ 6.648 m │
└───────────────────────────────┴─────────────────┴──────────────────┘

0 comments on commit 05b893b

Please sign in to comment.