Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ class CalibrateStateDiscriminationData(Data):

lowpass_cutoff: float | None
"""Low-pass cutoff (Hz) for the traces."""
sampling_rate: float | None = None
"""Sampling rate (GSps) of the traces, if the platform provides it."""
intermediate_frequency: dict[QubitId, float] = field(default_factory=dict)
"""Intermediate RO frequency for each qubit."""
data: dict[tuple[QubitId, int], npt.NDArray[np.float64]] = field(
Expand Down Expand Up @@ -100,6 +102,7 @@ def _acquisition(
}
data = CalibrateStateDiscriminationData(
lowpass_cutoff=params.lowpass_cutoff,
sampling_rate=platform.sampling_rate,
intermediate_frequency=intermediate_frequency,
)
for state, ro_pulses in zip([0, 1], all_ro_pulses):
Expand Down Expand Up @@ -140,7 +143,12 @@ def lowpass_filter(signal, cutoff, fs=1e9, order=5):

for state in range(2):
trace = data[qubit, state] @ [1, 1j]
traces.append(trace if cutoff is None else lowpass_filter(trace, cutoff))
if cutoff is None:
traces.append(trace)
elif data.sampling_rate is None:
traces.append(lowpass_filter(trace, cutoff))
else:
traces.append(lowpass_filter(trace, cutoff, data.sampling_rate * 1e9))

# Calculate the optimal kernel
kernel = np.conj(traces[0] - traces[1])
Expand Down
Loading