-
Notifications
You must be signed in to change notification settings - Fork 36
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
Further tests and reading loading config checks #89
Conversation
Is this file redundant (and not where it should be)? - https://github.com/q-optimize/c3/blob/dev/c3/test_transmon_expanded.py |
…ghtly more complex json files inncluding ocmplex numbers
Tests that use that |
Codecov Report
@@ Coverage Diff @@
## dev #89 +/- ##
==========================================
+ Coverage 67.51% 70.81% +3.30%
==========================================
Files 36 36
Lines 5162 5222 +60
==========================================
+ Hits 3485 3698 +213
+ Misses 1677 1524 -153
Continue to review full report at Codecov.
|
This is currently not the way it is implemented. The main problem was that reading the config file of the Instruction did not include parsing the targets. I guess currently the index is only not necessary to be given if no target is specified. |
You are correct. Also, the drive channels and the target are not necessarily the same thing. You could have a single qubit operation with a correction pulse other qubits for example. That would read
As we get more QASMy, we can do this properly. |
superA = tf.matmul(tf_spre(A), tf_spost(tf.linalg.adjoint(A))) | ||
superA = tf.matmul( | ||
tf_spre(A), tf_spost(tf.linalg.matrix_transpose(A, conjugate=True)) | ||
) | ||
return superA |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can this be further simplified to do a simply kron(A,A*)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test_transmon_expanded.pickle
and test_tf_utils.pickle
are files that are several MBs in size. Amounting to ~20 MB. This should in general be avoided - adding large binary files to the repository. Is it possible to use a pytest
fixture to generate the required data on demand? We want to avoid keeping big binary data files in the code repository as much as possible.
Make dependencies less strict - Less strict requirements with >= - test/test_envelopes.py has been updated to include a variable atol which is calculated based on the desired data. This was outlined in #89 and the same has been adopted here after some refactoring to allow for easy updating and maintenance.
The updates to |
� Conflicts: � c3/optimizers/optimalcontrol_robust.py � c3/utils/utils.py � test/test_envelopes.py
I've made the files smaller, around 1MB max |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's squash and merge this.
* add more tests * Add save and read test * fix and add tests * Save all information of instruction to config and be able to save slightly more complex json files inncluding ocmplex numbers * added further decode hooks * add tolerance bounds for testing * rewrite spre and spost * clean merge problems * Add target qubit in parametermap * mute unnecessary warning * remove merge garbage * flake changes * black pre-commit adjustments * removing import incorrectly merged * made test pickles smaller and updated test to make retaking data easier Co-authored-by: Federico Roy <federicoaroy@gmail.com>
add tests transmon_expanded, tf_utils, parametermap features
Enable more tolerances on several tests.
We are now testing at least some asdict and from_config functionality!:
transmon_expanded fitting of EJ EC fixed
change functions in tf_utils to be batch compatible and more straight forward
added hjson_encode function. Being able to save some more functionality with hjson, including complex numbers