Skip to content

Commit

Permalink
Merge branch 'main' into pre-commit-ci-update-config
Browse files Browse the repository at this point in the history
  • Loading branch information
andrea-pasquale committed Apr 16, 2024
2 parents b4fbae7 + f3fb537 commit 126fe2c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 27 deletions.
6 changes: 3 additions & 3 deletions src/qibocal/cli/autocalibration.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ def autocalibrate(runcard, folder, force, update):

# run protocols
for _ in executor.run(mode=ExecutionMode.autocalibration):
report = ReportBuilder(path, runcard.targets, executor, meta, executor.history)
report.run(path)
# meta needs to be updated after each report to show correct end-time
# meta needs to be updated before each report to show correct end-time
e = datetime.datetime.now(datetime.timezone.utc)
meta["end-time"] = e.strftime("%H:%M:%S")
# dump updated meta
meta = add_timings_to_meta(meta, executor.history)
report = ReportBuilder(path, runcard.targets, executor, meta, executor.history)
report.run(path)
(path / META).write_text(json.dumps(meta, indent=4))

# stop and disconnect platform
Expand Down
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 126fe2c

Please sign in to comment.