Solving bugs in qubit_crosstalk routine#1327
Conversation
…tform calibration.json) if no bias point is given in the parameter.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1327 +/- ##
==========================================
- Coverage 97.83% 97.80% -0.04%
==========================================
Files 132 132
Lines 10041 10049 +8
==========================================
+ Hits 9824 9828 +4
- Misses 217 221 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
| """Return all qubits of a given QPU except the ones we want to target in crosstalk routine""" | ||
| return [q for q in qpu_platform.qubits.keys() if q not in target_list] | ||
|
|
||
|
|
There was a problem hiding this comment.
@alecandido should we put drop_targets as a method of QubitCrosstalkParameters class?
There was a problem hiding this comment.
It is an option, but not a mandatory one.
In particular, the call itself
flux_qubits = (
drop_targets(targets, platform)
if params.flux_qubits is None
else params.flux_qubits
)is quite related to the class.
But the content of drop_targets() is completely unrelated, since it is not making use of any information which is in the class.
Since, for the time being, it is meant to be used only internally (to this module), just prepend a _, to make it clear it is not intended for import. I.e. _drop_targets().
There are more or less three levels for top-level variables:
- internal (to the module), which are
_-prefixed - internal (to the
qibocalpackage), just do nothing - public (for
qibocalusers), which should be listed in__all__
this PR aims to solve two bugs in
qubit_crosstalkroutine:if
bias_pointdictionary does not contain bias point for every target qubit_fitroutine crashes since it is taking this dictionary as input for fitting., and aKeyErroris given. I solved this bug by simply inserting default values for the missing qubits, i.e. the sweetspot in thecalibration.jsonfile of the platform. Seefill_bias_pointsmethod.if no list of qubits to flux (
flux_qubitsparam) is given, the following error:TypeError: 'NoneType' object is not iterablearose because the params was not correctly configured. Hence we wrotedrop_targetsfunction for solving this issue: if noflux_qubitis given the function takes all qubits but the target ones.Important
Bug n.2 needs also the Qibolab PR #1350 to be merged, otherwise the routine will still give error (not related to the ones reported here)