Skip to content

Commit

Permalink
Merge pull request #684 from qiboteam/fit_flux_matrix
Browse files Browse the repository at this point in the history
Implement crosstalk flux matrix fit
  • Loading branch information
andrea-pasquale authored Apr 15, 2024
2 parents 808e23f + 5191875 commit 45289e7
Show file tree
Hide file tree
Showing 10 changed files with 728 additions and 120 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,16 @@ def _acquisition(
sequence = PulseSequence()
ro_pulses = {}
qd_pulses = {}
offset = {}
couplers = []
for i, pair in enumerate(targets):
ordered_pair = order_pair(pair, platform)
measured_qubit = params.measured_qubits[i]

qubit = platform.qubits[measured_qubit].name
couplers.append(platform.pairs[tuple(sorted(ordered_pair))].coupler)
offset[qubit] = platform.pairs[tuple(sorted(ordered_pair))].coupler.sweetspot
coupler = platform.pairs[tuple(sorted(ordered_pair))].coupler.name
couplers.append(coupler)

ro_pulses[qubit] = platform.create_qubit_readout_pulse(
qubit, start=params.drive_duration
Expand Down Expand Up @@ -84,9 +87,11 @@ def _acquisition(
(
delta_bias_flux_range,
sweepers,
sequences,
) = resonator_flux_dependence.create_flux_pulse_sweepers(
params, platform, couplers, sequence
)
sequence = sequences[0]
else:
delta_bias_flux_range = np.arange(
-params.bias_width / 2, params.bias_width / 2, params.bias_step
Expand All @@ -103,6 +108,7 @@ def _acquisition(
data = CouplerSpectroscopyData(
resonator_type=platform.resonator_type,
flux_pulses=params.flux_pulses,
offset=offset,
)

for bias_sweeper in sweepers:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,15 @@ def _acquisition(

sequence = PulseSequence()
ro_pulses = {}
offset = {}
couplers = []
for i, pair in enumerate(targets):
ordered_pair = order_pair(pair, platform)
measured_qubit = params.measured_qubits[i]

qubit = platform.qubits[measured_qubit].name
coupler = platform.pairs[tuple(sorted(ordered_pair))].coupler
offset[qubit] = platform.pairs[tuple(sorted(ordered_pair))].coupler.sweetspot
coupler = platform.pairs[tuple(sorted(ordered_pair))].coupler.name
couplers.append(coupler)
# TODO: May measure both qubits on the pair
ro_pulses[qubit] = platform.create_qubit_readout_pulse(qubit, start=0)
Expand All @@ -72,12 +74,12 @@ def _acquisition(

if params.flux_pulses:
# TODO: Add delay
(
delta_bias_flux_range,
sweepers,
) = resonator_flux_dependence.create_flux_pulse_sweepers(
params, platform, couplers, sequence
(delta_bias_flux_range, sweepers, sequences) = (
resonator_flux_dependence.create_flux_pulse_sweepers(
params, platform, couplers, sequence
)
)
sequence = sequences[0]
else:
delta_bias_flux_range = np.arange(
-params.bias_width / 2, params.bias_width / 2, params.bias_step
Expand All @@ -94,6 +96,7 @@ def _acquisition(
data = CouplerSpectroscopyData(
resonator_type=platform.resonator_type,
flux_pulses=params.flux_pulses,
offset=offset,
)

for bias_sweeper in sweepers:
Expand Down
2 changes: 2 additions & 0 deletions src/qibocal/protocols/characterization/couplers/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ class CouplerSpectroscopyData(Data):
"""Resonator type."""
flux_pulses: bool
"""True if sweeping flux pulses, False if sweeping bias."""
offset: dict[QubitId, float] = field(default_factory=dict)
"""Qubit bias offset."""
data: dict[QubitId, npt.NDArray[CouplerSpecType]] = field(default_factory=dict)
"""Raw data acquired."""

Expand Down
Loading

0 comments on commit 45289e7

Please sign in to comment.