feat(zhinst): Assert current with new sequence program to skip compilation
Explanation of changes
Closes feature request: [Feature] Upload waveforms without triggering sequencer compilation on the Zhinst instruments in #88 (closed) and #60 (closed)
Adds a branch that compares the sequence program of the Instrument with the newly given sequence program. If those programs are the same then the compilation of the Seqc program can be skipped.
Motivation of changes
Compilation takes relatively a long time, therefore skipping it reduces the time from compiling the backend to arming the instruments.
Example:
For a single HDAWG4 and a UHFQA with the the following schedule takes 3.15sec. Recompiling the same program with the sequence equality comparison decreases zhinst_backend.compile_backend and controlstack.prepare operation time to 1.81sec.
schedule = trace_schedules.two_tone_trace_schedule(
qubit_pulse_amp=0.6e-0,
qubit_pulse_duration=qubit_pulse_duration,
qubit_pulse_frequency=6.0e9,
qubit_pulse_port="q0:mw",
qubit_pulse_clock="q0.01",
ro_pulse_amp= 0.5e-3,
ro_pulse_duration=150e-9,
ro_pulse_delay=100e-9,
ro_pulse_port= "q0:res",
ro_pulse_clock= "q0.ro",
ro_pulse_frequency=6.00e9,
ro_acquisition_delay=qubit_pulse_duration * -1,
ro_integration_time=500e-9,
init_duration=10e-6,
)
Merge checklist
See also merge request guidelines
-
Merge request has been reviewed and approved by a project maintainer. -
Merge request contains a clear description of the proposed changes and the issue it addresses. -
Merge request made onto appropriate branch (develop for most MRs). -
New code is fully tested. -
New code is documented and docstrings use numpydoc format. -
Changelog has been updated (when applicable). -
CI pipelines pass - black code-formatting passes (gitlab-ci),
- test suite passes (gitlab-ci),
- no degradation in code-coverage (codacy),
- no (serious) new pylint code quality issues introduced (codacy),
- documentation builds successfully (CI and readthedocs).