Skip to content

Commit

Permalink
Merge pull request #375 from qiboteam/punchout_behavior
Browse files Browse the repository at this point in the history
Improve punchout routine
  • Loading branch information
andrea-pasquale authored Jun 6, 2023
2 parents bc1614c + 088d8e8 commit 63484ee
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/qibocal/protocols/characterization/resonator_punchout.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ class ResonatorPunchoutParameters(Parameters):
"""Maximum amplitude multiplicative factor."""
step_amp_factor: float
"""Step amplitude multiplicative factor."""
amplitude: float = None
"""Initial readout amplitude."""
nshots: Optional[int] = None
"""Number of shots."""
relaxation_time: Optional[int] = None
Expand Down Expand Up @@ -86,6 +88,8 @@ def _acquisition(
ro_pulses = {}
for qubit in qubits:
ro_pulses[qubit] = platform.create_qubit_readout_pulse(qubit, start=0)
if params.amplitude is not None:
ro_pulses[qubit].amplitude = params.amplitude
sequence.add(ro_pulses[qubit])

# define the parameters to sweep and their range:
Expand Down
3 changes: 3 additions & 0 deletions src/qibocal/protocols/characterization/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,9 @@ def spectroscopy_plot(data, fit: Results, qubit):

if fit.amplitude[qubit] is not None:
fitting_report += f"{qubit} | amplitude: {fit.amplitude[qubit]} <br>"
if data.power_level is PowerLevel.high:
# TODO: find better solution for not updating amplitude in high power
fit.amplitude.pop(qubit)

if data.__class__.__name__ == "ResonatorSpectroscopyAttenuationData":
if fit.attenuation[qubit] is not None and fit.attenuation[qubit] != 0:
Expand Down
1 change: 1 addition & 0 deletions tests/runcards/single_routines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ actions:
parameters:
freq_width: 10_000_000
freq_step: 1_000_000
amplitude: 0.04
min_amp_factor: 0.005
max_amp_factor: 0.3
step_amp_factor: 0.005
Expand Down

0 comments on commit 63484ee

Please sign in to comment.