Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resurrect Model learning #117

Merged
merged 25 commits into from
Jun 30, 2021
Merged

Conversation

lazyoracle
Copy link
Member

@lazyoracle lazyoracle commented Jun 29, 2021

What

Fill missing gaps in Model Learning code, test, docs and examples

Why

Fixes #91

How

  • Fix broken sections in c3/optimizers/c3.py
  • Remove unused big dataset and provide new small dataset
  • Update test/c3.cfg to be compatible with dataset
  • Provide new system model c2_blackbox_exp.hjson
  • New integration tests for checking C3 Model Learning run
  • Updated test/test_optim_init.py for model learning optimization objects
  • New example notebook for Model Learning
  • Data analysis and visualization for Model Learning logs
  • New docs section on Model Learning based on example notebook

@lazyoracle lazyoracle added bug Something isn't working enhancement New feature or request labels Jun 29, 2021
@lazyoracle lazyoracle added this to the 1.3 milestone Jun 29, 2021
@lazyoracle lazyoracle self-assigned this Jun 29, 2021
@lazyoracle lazyoracle force-pushed the model-learning branch 2 times, most recently from ae085d4 to ce9e3b7 Compare June 29, 2021 18:09
Blackbox freq 5e9 and anhar -210e6
Model freq:
{
value: 5000100000.0
min_val: 4995000000.0
max_val: 5005000000.0
unit: Hz 2pi
symbol: \alpha
}

Model  anhar:
{
value: -210001000.0
min_val: -380000000.0
max_val: -120000000.00000003
unit: Hz 2pi
symbol: \alpha
}
The dataset is an ORBIT experiment with 20 ORBIT sequences, and
altogether 30 experiments (calibration runs) were performed.
The blackbox is a 1 qubit device with freq 5e9 and anhar -210e6
@codecov
Copy link

codecov bot commented Jun 29, 2021

Codecov Report

Merging #117 (8dfd606) into dev (54fa0a6) will increase coverage by 4.81%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev     #117      +/-   ##
==========================================
+ Coverage   58.82%   63.63%   +4.81%     
==========================================
  Files          36       36              
  Lines        5326     5327       +1     
==========================================
+ Hits         3133     3390     +257     
+ Misses       2193     1937     -256     
Impacted Files Coverage Δ
c3/optimizers/c3.py 76.86% <100.00%> (+57.39%) ⬆️
c3/parametermap.py 84.71% <0.00%> (+0.43%) ⬆️
c3/utils/utils.py 66.01% <0.00%> (+0.97%) ⬆️
c3/optimizers/optimizer.py 81.86% <0.00%> (+2.32%) ⬆️
c3/experiment.py 74.73% <0.00%> (+9.25%) ⬆️
c3/libraries/sampling.py 43.58% <0.00%> (+10.25%) ⬆️
c3/libraries/estimators.py 39.53% <0.00%> (+10.46%) ⬆️
c3/libraries/tasks.py 67.74% <0.00%> (+12.90%) ⬆️
c3/libraries/algorithms.py 36.36% <0.00%> (+17.13%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 54fa0a6...8dfd606. Read the comment docs.

@lazyoracle lazyoracle marked this pull request as ready for review June 30, 2021 07:56
@lazyoracle lazyoracle requested a review from nwittler June 30, 2021 07:56
Copy link
Collaborator

@nwittler nwittler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. The comment is optional. We might go over the example notebook and the docs in more detail after the merge.

m_shots = data_set["shots"][:seqs_pp]
sequences = data_set["seqs"][:seqs_pp]
with open(self.logdir + self.logname, "a") as logfile:
logfile.write(
f"\n Parameterset {ipar + 1}, #{count} of {len(indeces)}:\n"
f"{str(self.exp.pmap)}\n"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing str(self.exp.pmap) is correct, but do we instead want to print the current parameters in human-readable form here? exp.str_parameters() should do the trick.

@lazyoracle lazyoracle merged commit 8dbe25c into q-optimize:dev Jun 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No complete notebook showing Model Learning using c3-toolset
2 participants