Skip to content

Commit

Permalink
Merge pull request #799 from qiboteam/fix_extract_feature
Browse files Browse the repository at this point in the history
Hotfix for `extract_feature` function
  • Loading branch information
andrea-pasquale authored Apr 16, 2024
2 parents 7734577 + 7cfa4a6 commit f3fb537
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -251,18 +251,12 @@ def _fit(data: QubitCrosstalkData) -> QubitCrosstalkResults:

for target_flux_qubit, qubit_data in data.data.items():

if data.resonator_type == "3D":
frequencies, biases = utils.extract_min_feature(
qubit_data.freq,
qubit_data.bias,
qubit_data.signal,
)
else:
frequencies, biases = utils.extract_max_feature(
qubit_data.freq,
qubit_data.bias,
qubit_data.signal,
)
frequencies, biases = utils.extract_feature(
qubit_data.freq,
qubit_data.bias,
qubit_data.signal,
"max",
)
target_qubit, flux_qubit = target_flux_qubit

if target_qubit != flux_qubit:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,18 +263,9 @@ def _fit(data: ResCrosstalkData) -> ResCrosstalkResults:
for target_flux_qubit, qubit_data in data.data.items():
target_qubit, flux_qubit = target_flux_qubit

if data.resonator_type == "3D":
frequencies, biases = utils.extract_max_feature(
qubit_data.freq,
qubit_data.bias,
qubit_data.signal,
)
else:
frequencies, biases = utils.extract_min_feature(
qubit_data.freq,
qubit_data.bias,
qubit_data.signal,
)
frequencies, biases = utils.extract_feature(
qubit_data.freq, qubit_data.bias, qubit_data.signal, "min"
)

if target_qubit != flux_qubit:
# fit function needs to be defined here to pass correct parameters
Expand Down

0 comments on commit f3fb537

Please sign in to comment.