Commit e7f9e716 authored by Victor Negîrneac's avatar Victor Negîrneac
Browse files

Merge branch 'rename_averages_param' into 'develop'

Rename averages parameter on quantum device

Closes #195

See merge request quantify-os/quantify-scheduler!205
parents ead84327 9cef3c3c
Loading
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -13,7 +13,8 @@ Breaking changes
~~~~~~~~~~~~~~~~
* Mixer corrections in Qblox backend are broken because of the switch to real-time modulation. The support of mixer corrections in the Qblox firmware is under development.
* The `schedules.timedomain_schedules.allxy_sched` function no longer accepts the string "All" as an argument to the `element_select_idx` keyword.
* * The call signature of `gettables.ScheduleVectorAcqGettable` has been renamed to `gettables.ScheduleGettableSingleChannel`, and the call signature has been updated according to #36 to no longer accept several keyword arguments.
* The `QuantumDevice.cfg_nr_averages` parameter was renamed to `QuantumDevice.cfg_sched_repetitions`
* The call signature of `gettables.ScheduleVectorAcqGettable` has been renamed to `gettables.ScheduleGettableSingleChannel`, and the call signature has been updated according to #36 to no longer accept several keyword arguments.

Merged branches and closed issues
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+4 −3
Original line number Diff line number Diff line
@@ -63,12 +63,13 @@ class QuantumDevice(Instrument):
        )

        self.add_parameter(
            "cfg_nr_averages",
            "cfg_sched_repetitions",
            initial_value=1024,
            parameter_class=ManualParameter,
            docstring=(
                "The number of averages when performing experiments. Used to"
                " set the repetitions attribute of a Schedule."
                "The number of times execution of the schedule gets repeated when "
                "performing experiments, i.e. used to set the repetitions attribute of "
                "the Schedule objects generated."
            ),
            vals=validators.Ints(min_value=1),
        )
+6 −2
Original line number Diff line number Diff line
@@ -62,7 +62,8 @@ class ScheduleGettableSingleChannel:
            The qcodes instrument representing the quantum device under test (DUT)
            containing quantum device properties and setup configuration information.
        schedule_function
            A function which returns a :class:`~quantify_scheduler.types.Schedule`.
            A function which returns a :class:`~quantify_scheduler.types.Schedule`. The
            function is required to have the `repetitions` keyword argument.
        schedule_kwargs
            The schedule function keyword arguments, when a value in this dictionary is
            a :class:`~qcodes.instrument.parameter.Parameter`, this parameter will be
@@ -115,7 +116,10 @@ class ScheduleGettableSingleChannel:
        self._evaluated_sched_kwargs = _evaluate_parameter_dict(self.schedule_kwargs)

        # generate a schedule using the evaluated keyword arguments dict
        sched = self.schedule_function(**self._evaluated_sched_kwargs)
        sched = self.schedule_function(
            **self._evaluated_sched_kwargs,
            repetitions=self.quantum_device.cfg_sched_repetitions(),
        )

        compiled_schedule = qcompile(
            schedule=sched,
+1 −4
Original line number Diff line number Diff line
@@ -45,7 +45,6 @@ def test_ScheduleGettableSingleChannel_iterative_heterodyne_spec(mock_setup, moc
        "port": qubit.ro_port,
        "clock": qubit.ro_clock,
        "init_duration": qubit.init_duration,
        "repetitions": quantum_device.cfg_nr_averages(),
    }

    # Prepare the mock data the spectroscopy schedule
@@ -102,7 +101,6 @@ def test_ScheduleGettableSingleChannel_batched_allxy(mock_setup, mocker):
    sched_kwargs = {
        "element_select_idx": index_par,
        "qubit": qubit.name,
        "repetitions": 256,
    }
    indices = np.repeat(np.arange(21), 2)
    # Prepare the mock data the ideal AllXY data
@@ -170,10 +168,9 @@ def test_ScheduleGettableSingleChannel_append_readout_cal(mock_setup, mocker):
    sched_kwargs = {
        "qubit": qubit.name,
        "prepared_states": [0, 1],
        "repetitions": repetitions,
    }

    quantum_device.cfg_nr_averages(repetitions)
    quantum_device.cfg_sched_repetitions(repetitions)

    # Prepare the mock data the ideal SSRO data
    ssro_sched = readout_calibration_sched("q0", [0, 1], repetitions=repetitions)