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

dfs fixed #414

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft

dfs fixed #414

wants to merge 5 commits into from

Conversation

GuillermoAbadLopez
Copy link
Contributor

@GuillermoAbadLopez GuillermoAbadLopez commented Jun 8, 2023

ORIGINALY

In our DataFrames, perviously we had a normal index, and then columns to represent the different index before concatenating df's, such as:

  • loop_indexes
  • results_index
  • acquisition_index
  • bin_index

which were just copies of the previous indices, and the name after concatenating should now be read as:
acquisition_index = index this sub-df had when we were at acquisition df's level (before concatenating at acquisition level)

NOW

But after this PR, we will also have columns representing in which of those concatenated objects they were:

  • circuit_index
  • qubit_index
  • bins_index

So now for each level, we have two types of indices, ones that tells you in which df of the list[df] they were [new added indices], and another one that tells you the previous indices they had inside those df (before concatenation) [old indices].

Notice that bins_index is in both, this is because it is the lowest level we can go, if we could go even lower, this would be split into two indices too.

Screenshot 2023-05-26 at 21 23 23

REDUNDANCY

And actually now, with these new columns there is redundancy in the information of the dataframe, since:

  • df['qubit_number']=(df['acquisition_index'] - df['bin_index']) / num_bin)
  • df['circuit_number']=(df['acquisition_index'] - df['bin_index']) / (num_qubits*num_bin)

But I still consider worth it for small df, since it is way more visual now. (For larger DF, we should consider reducing this redundancy)

LINKED PRs/Issues

PR on dummy_pulsar
https://github.com/qilimanjaro-tech/qililab-tools/pull/13
Ana's Issues
#402
#403

TO DO:

  • Trespass everything from new-main PR to this PR
  • Delete acquisition_index
  • Think what to do with result_index
  • Check to_dataframe() method (You removed result_index)
  • Check that loop_indexs work correctly
  • Fix tests
  • Understand the structure of the dictionary in data.py, to change and make the test more complex
  • Add threshold column, at the same level of the q,i
    (you need to see how to pass threshold parameters into binary_classification in qblox library)
  • Decide until whihc depth is gonna be threshold or classification.
  • Check if deleting the sequence_index & software_avg_index columns
  • In the test_qblox_result implement/delete commented code after understanding it
  • Edit the description of this PR and the changelog
  • Check docstring and edit them if necessary
  • Check compatibility of the ideas from Ana to this PR!

@GuillermoAbadLopez GuillermoAbadLopez changed the title Df fixed dfs fixed Jun 8, 2023
@GuillermoAbadLopez GuillermoAbadLopez marked this pull request as draft June 8, 2023 15:27
@GuillermoAbadLopez GuillermoAbadLopez self-assigned this Jun 8, 2023
@GuillermoAbadLopez GuillermoAbadLopez added bug Something isn't working enhancement New feature or request labels Jun 8, 2023
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] The dataframes of Results-acquisitions get the concatenation indexes wrong
1 participant