threshold flips correctly now.
Explanation of changes
The discriminating line is now calculated correctly from the LDA discriminator. Additionally, the plot now draws color patches to indicate the direction of the line, which should help discover this bug earlier.
Motivation of changes
Qblox-instrumens FW 0.11.0
Qblox-insrtuments 0.16.0
Quantify-scheduler 0.23.0
Quantify-core 0.8.1
With the help of @rnavarathna I have found a bug in ReadoutCalibrationAnalysis for quantify-core. It works fine if your |1> is in the positive in relation to the |0> state but it they are reversed on the IQ plane it produces exactly opposite results creating an exactly opposite confusion matrix essentially breaking any conditional operations as the threshold acquisition results are inverted, quantify thinks it is in |0> state when in |1> and vice versa.
I have attached a notebook that demonstrates this by modifying the readout_calibration schedule to measure with different pulse amplitude depending depending on the state to make an artificial two state system and have created two functions with opposites orientations. The first function creates the confusion matrix correctly. The second one discriminates correctly but then the confusion matrix is completely inverted.This analysis is used on public documentation here. Minimum failing Example
readout_calibration_error_mfw.ipynb
Merge checklist
See also merge request guidelines
-
Merge request has been reviewed (in-depth by a knowledgeable contributor), and is approved by a project maintainer. -
New code is covered by unit tests (or N/A). -
New code is documented and docstrings use numpydoc format (or N/A). -
New functionality: considered making private instead of extending public API (or N/A). -
Public API changed: added @deprecated
(or N/A). -
Newly added/adjusted documentation and docstrings render properly (or N/A). -
Pipeline fix or dependency update: post in #software-for-developers
channel to mergemain
back in or update local packages (or N/A). -
Tested on hardware (or N/A). -
AUTHORS.md
has been updated (or N/A). -
Windows tests in CI pipeline pass (manually triggered by maintainers before merging). - Maintainers do not hit Auto-merge, we need to actively check as manual tests do not block pipeline
For reference, the issues workflow is described in the contribution guidelines.