Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[POC] Testing qibolab 0.2 #809

Closed
wants to merge 38 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
b7e9c9a
refactor: update classification, rabi amplitude and resonator spectro…
stavros11 Jul 13, 2024
418f7ed
chore: update T1, T2 signal and rabi length routines
stavros11 Jul 15, 2024
ac561bc
chore: update single shot
stavros11 Aug 6, 2024
e355ef2
chore: update rabi amplitude
stavros11 Aug 6, 2024
1ab6ef8
chore: update resonator spectroscopy
stavros11 Aug 6, 2024
4626eaa
chore: update routines for the new sequence layout
stavros11 Aug 11, 2024
3c55512
fix: update Rabi length for new sequence layout
stavros11 Aug 13, 2024
d93cd26
fix: update Rabi length signal for new sequence layout
stavros11 Aug 13, 2024
e9afb6b
chore: update single shot for new qibolab serialization
stavros11 Aug 16, 2024
fec9029
chore: change PulseSequence import to qibolab.sequence
stavros11 Aug 18, 2024
c97ef7d
chore: update Rabi routines
stavros11 Aug 18, 2024
bb31186
chore: update with new acquisition format
stavros11 Aug 20, 2024
b423327
chore: implement duration interpolated sweeper
stavros11 Aug 22, 2024
367070b
chore: update Rabi routines for acquisition
stavros11 Aug 22, 2024
cf22451
build: Update qibolab version with git dependency
alecandido Aug 25, 2024
3fb247b
fix: unrolling result indexing
stavros11 Aug 27, 2024
9a06651
chore: update QubitId and QubitPairId imports to identifier
stavros11 Aug 28, 2024
9b1fbb6
chore: drop SweeperType
stavros11 Aug 28, 2024
9d11fa3
chore: drop outdated updates
stavros11 Aug 28, 2024
695fbaf
chore: drop sweeper type from rabi
stavros11 Aug 28, 2024
1c558b4
chore: convert Rabi amplitude to absolute sweeper
stavros11 Aug 31, 2024
c852f5a
fix: Update channel names retrieval in classification
alecandido Aug 26, 2024
7a0b147
fix: Use readout id, not acquisition
alecandido Aug 26, 2024
ad8fa48
fix: Add delays on acquisition in classification
alecandido Aug 30, 2024
8ea41f7
chore: update Rabi routines
stavros11 Aug 31, 2024
b67c150
chore: update resonator spectroscopy
stavros11 Sep 3, 2024
99723d0
chore: update for new result structure
stavros11 Sep 3, 2024
cceb5fb
chore: move result manipulation functions from qibolab
stavros11 Sep 3, 2024
6c0ee02
chore: update resonator spectroscopy after moving results to qibocal
stavros11 Sep 9, 2024
9fe167e
fix: Rabi length for new result shapes
stavros11 Sep 13, 2024
4c92929
chore: move QubitId and QubitPairId to qibocal
stavros11 Sep 18, 2024
6804d7e
chore: update for new qibolab public API
stavros11 Sep 18, 2024
158c756
refactor: use sequence creation helpers in single shot routine
stavros11 Sep 18, 2024
f378a45
fix: fixes for hardware execution
stavros11 Sep 18, 2024
4ff947a
chore: drop usage of ExecutionParameters
stavros11 Sep 20, 2024
7fbd637
fix: drop ExecutionParameters from Parameters
stavros11 Sep 20, 2024
fb75465
fix: drop create_sequence
stavros11 Sep 20, 2024
1cf3bdd
fix: resonator spectroscopy errors
stavros11 Sep 20, 2024
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
Prev Previous commit
Next Next commit
chore: implement duration interpolated sweeper
  • Loading branch information
stavros11 committed Sep 20, 2024
commit b4233279868ed86cb03bc370df66c2b502d7c360
24 changes: 17 additions & 7 deletions src/qibocal/protocols/rabi/length.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ class RabiLengthParameters(Parameters):
"""Step pi pulse duration [ns]."""
pulse_amplitude: Optional[float] = None
"""Pi pulse amplitude. Same for all qubits."""
interpolated_sweeper: bool = False
"""Use real-time interpolation if supported by instruments."""


@dataclass
Expand Down Expand Up @@ -66,7 +68,7 @@ def _acquisition(
"""

sequence, qd_pulses, delays, ro_pulses, amplitudes = utils.sequence_length(
targets, params, platform
targets, params, platform, use_align=params.interpolated_sweeper
)
# define the parameter to sweep and its range:
# qubit drive pulse duration time
Expand All @@ -76,12 +78,20 @@ def _acquisition(
params.pulse_duration_step,
)

sweeper = Sweeper(
Parameter.duration,
qd_pulse_duration_range,
[qd_pulses[q] for q in targets] + [delays[q] for q in targets],
type=SweeperType.ABSOLUTE,
)
if params.interpolated_sweeper:
sweeper = Sweeper(
Parameter.duration_interpolated,
qd_pulse_duration_range,
[qd_pulses[q] for q in targets],
type=SweeperType.ABSOLUTE,
)
else:
sweeper = Sweeper(
Parameter.duration,
qd_pulse_duration_range,
[qd_pulses[q] for q in targets] + [delays[q] for q in targets],
type=SweeperType.ABSOLUTE,
)

data = RabiLengthData(amplitudes=amplitudes)

Expand Down
8 changes: 7 additions & 1 deletion src/qibocal/protocols/rabi/length_signal.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ class RabiLengthSignalParameters(Parameters):
"""Step pi pulse duration [ns]."""
pulse_amplitude: Optional[float] = None
"""Pi pulse amplitude. Same for all qubits."""
interpolated_sweeper: bool = False
"""Use real-time interpolation if supported by instruments."""


@dataclass
Expand Down Expand Up @@ -81,7 +83,11 @@ def _acquisition(
)

sweeper = Sweeper(
Parameter.duration,
(
Parameter.duration_interpolated
if params.interpolated_sweeper
else Parameter.duration
),
qd_pulse_duration_range,
[qd_pulses[q] for q in targets] + [delays[q] for q in targets],
type=SweeperType.ABSOLUTE,
Expand Down
13 changes: 9 additions & 4 deletions src/qibocal/protocols/rabi/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,10 @@ def sequence_amplitude(


def sequence_length(
targets: list[QubitId], params: Parameters, platform: Platform
targets: list[QubitId],
params: Parameters,
platform: Platform,
use_align: bool = False,
) -> tuple[PulseSequence, dict, dict, dict]:
"""Return sequence for rabi length."""
sequence = PulseSequence()
Expand All @@ -270,12 +273,14 @@ def sequence_length(
qd_pulses[q].amplitude = params.pulse_amplitude
amplitudes[q] = qd_pulses[q].amplitude

delays[q] = Delay(duration=16)
ro_pulses[q] = ro_sequence[0][1]

qubit = platform.qubits[q]
sequence.append((qubit.drive.name, qd_pulses[q]))
sequence.append((qubit.probe.name, delays[q]))
if use_align:
sequence.align([qubit.drive.name, qubit.probe.name])
else:
delays[q] = Delay(duration=16)
sequence.append((qubit.probe.name, delays[q]))
sequence.append((qubit.probe.name, ro_pulses[q]))

return sequence, qd_pulses, delays, ro_pulses, amplitudes
Expand Down