Skip to content

Minor fixes in VZ protocol#1261

Merged
RoyStegeman merged 6 commits into
mainfrom
fix-vz
Jun 22, 2026
Merged

Minor fixes in VZ protocol#1261
RoyStegeman merged 6 commits into
mainfrom
fix-vz

Conversation

@andrea-pasquale

Copy link
Copy Markdown
Contributor

@codecov

codecov Bot commented Oct 8, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.53086% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.94%. Comparing base (135aa58) to head (d6dba5f).

Files with missing lines Patch % Lines
...ibocal/protocols/two_qubit_interaction/optimize.py 97.01% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1261   +/-   ##
=======================================
  Coverage   91.94%   91.94%           
=======================================
  Files         147      147           
  Lines       11581    11588    +7     
=======================================
+ Hits        10648    10655    +7     
  Misses        933      933           
Flag Coverage Δ
unittests 91.94% <97.53%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...al/protocols/two_qubit_interaction/snz_optimize.py 99.34% <ø> (ø)
...ocols/two_qubit_interaction/snz_optimize_t_idle.py 100.00% <ø> (ø)
..._qubit_interaction/snz_optimize_t_idle_vs_t_tot.py 100.00% <ø> (ø)
...c/qibocal/protocols/two_qubit_interaction/utils.py 96.55% <100.00%> (+0.25%) ⬆️
...rotocols/two_qubit_interaction/virtual_z_phases.py 100.00% <100.00%> (ø)
src/qibocal/update.py 90.35% <100.00%> (+0.08%) ⬆️
...ibocal/protocols/two_qubit_interaction/optimize.py 98.81% <97.01%> (+1.22%) ⬆️

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment on lines +107 to +110
if rec_array:
target_data = data[target, control, setup].target
else:
target_data = data[target, control, setup][0]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Isn't it possible to standardize the usage, and keep it just one in the end?

I see that before was a record array. And, since it has proved being inconvenient, now Qibocal is more or less to regular arrays. Which is certainly reasonable[*].

But, then, why not just transitioning everything to regular arrays? At least in related places, such that we avoid these kinds of forks.

[*]: We may discuss why it has been inconvenient, which are instead the advantages, and whether it is worth to attempt retaining them, changing instead something else. But I assume you already did this assessment, more or less in depth. So, fine, we can certainly go back to regular arrays - if nothing else, just because of simplicity. Which is a good motivation

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'm planning to do that as well. The SNZ protocols are still using recarrays.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done in #1268

f"Qubit {qubits[1]}",
),
)
print(fit)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Leftover print?

Comment on lines +107 to +111
return True
# pairs = {
# (target, control) for target, control, _, _, _ in self.fitted_parameters
# }
# return key in pairs

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Leftover or intended?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah this was used for debugging as well. I will fix it.

@RoyStegeman

RoyStegeman commented Jun 22, 2026

Copy link
Copy Markdown
Member

@scarrazza while we didn't carefully review this, the state of main is also unknown and presumably this is an improvement. Hence it probably makes sense to merge this branch, benefitting from what Andrea did here, rather than to work on top of current main.

@scarrazza

Copy link
Copy Markdown
Member

@RoyStegeman please go ahead.

@RoyStegeman RoyStegeman added this pull request to the merge queue Jun 22, 2026
Merged via the queue into main with commit 15d6ac2 Jun 22, 2026
39 checks passed
@RoyStegeman RoyStegeman deleted the fix-vz branch June 22, 2026 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix VZ experiment plot

4 participants