Skip to content

Commit

Permalink
Release 2.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
hodgestar committed Jun 8, 2023
1 parent 4ec806f commit dd2cb0a
Show file tree
Hide file tree
Showing 110 changed files with 5,523 additions and 1,749 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/jira_sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Sync GitHub issues to Jira
on: [issues, issue_comment]

jobs:
sync-issues:
name: Sync issues to Jira
runs-on: ubuntu-latest
steps:
- uses: canonical/sync-issues-github-jira@v1
with:
webhook-url: ${{ secrets.JIRA_WEBHOOK_URL }}
4 changes: 3 additions & 1 deletion examples/00_reference/04_pulse_library.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
"\n",
"- How to use pre-defined pulses out of the box, and how to sweep their parameters [here](#sweep-parameters-of-an-out-of-the-box-pulse)\n",
"- How to define your own, parameterized pulses and sweep their parameters [here](#define-a-new-pulse-type-and-sweep-it)\n",
"- How to define sampled pulses, e.g., from a `numpy` array [here](#create-a-sampled-pulse-from-an-array-of-sampling-points)"
"- How to define sampled pulses, e.g., from a `numpy` array [here](#create-a-sampled-pulse-from-an-array-of-sampling-points)\n",
"\n",
"A demonstration of this notebook is also available on our Youtube channel [here](https://www.youtube.com/watch?v=20sqtgs281Y&list=PLjxUCNDRYw8k1_HTzXDohUHKhYKYFQrbn&index=3&ab_channel=ZurichInstruments)"
]
},
{
Expand Down
4 changes: 3 additions & 1 deletion examples/00_reference/09_output_simulator.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
"\n",
"LabOne Q can simulate the output of each channel in a sample-precise way. This feature can be used to check experiments even before they are executed on hardware. Combine it with the pulse sheet viewer to get a multi-scale overview over pulses and sequences.\n",
"\n",
"This notebook will use an amplitude Rabi experiment to demonstrate some use cases of the output simulator."
"This notebook will use an amplitude Rabi experiment to demonstrate some use cases of the output simulator.\n",
"\n",
"For more examples also have a look at the demo video on our Youtube channel [here](https://www.youtube.com/watch?v=hov1pY-XyOY&list=PLjxUCNDRYw8k1_HTzXDohUHKhYKYFQrbn&index=2&ab_channel=ZurichInstruments)"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
"source": [
"# Resonator Spectroscopy with SHFQA or SHFQC\n",
"\n",
"This notebook shows you how to perform CW resonator spectroscopy in LabOne Q with a SHFQA or the quantum analyzer channels of a SHFQC. Here, you'll find the resonance frequency of the qubit readout resonator by looking at the transmission or reflection of a probe signal applied through the readout line."
"This notebook shows you how to perform CW resonator spectroscopy in LabOne Q with a SHFQA or the quantum analyzer channels of a SHFQC. Here, you'll find the resonance frequency of the qubit readout resonator by looking at the transmission or reflection of a probe signal applied through the readout line.\n",
"\n",
"A demonstration of this notebook, starting from the basics of installing LabOne Q, is also available on our Youtube channel [here](https://www.youtube.com/watch?v=aRaGHNZeVkI&list=PLjxUCNDRYw8k1_HTzXDohUHKhYKYFQrbn&index=1&ab_channel=ZurichInstruments)"
]
},
{
Expand Down Expand Up @@ -282,9 +284,9 @@
],
"metadata": {
"kernelspec": {
"display_name": "L1Q_local",
"display_name": "develop",
"language": "python",
"name": "python3"
"name": "develop"
},
"language_info": {
"codemirror_mode": {
Expand All @@ -296,7 +298,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.11"
"version": "3.11.0"
},
"orig_nbformat": 4
},
Expand Down
2 changes: 1 addition & 1 deletion laboneq/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.7.0
2.8.0
2 changes: 2 additions & 0 deletions laboneq/application_management/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Copyright 2023 Zurich Instruments AG
# SPDX-License-Identifier: Apache-2.0
68 changes: 68 additions & 0 deletions laboneq/application_management/application_manager.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Copyright 2023 Zurich Instruments AG
# SPDX-License-Identifier: Apache-2.0

import logging
from dataclasses import dataclass

from lagom import Container, Singleton

from laboneq.implementation.compilation_service.compilation_service_legacy import (
CompilationServiceLegacy,
)
from laboneq.implementation.experiment_workflow import ExperimentWorkflow
from laboneq.implementation.payload_builder.payload_builder import PayloadBuilder
from laboneq.implementation.runner.runner_legacy import RunnerLegacy
from laboneq.interfaces.application_management.laboneq_settings import LabOneQSettings
from laboneq.interfaces.compilation_service.compilation_service_api import (
CompilationServiceAPI,
)
from laboneq.interfaces.experiment.experiment_api import ExperimentAPI
from laboneq.interfaces.payload_builder.payload_builder_api import PayloadBuilderAPI
from laboneq.interfaces.runner.runner_api import RunnerAPI
from laboneq.interfaces.runner.runner_control_api import RunnerControlAPI

_logger = logging.getLogger(__name__)


@dataclass(init=False)
class LaboneQDefaultSettings(LabOneQSettings):
def __init__(self):
self.runner_is_local = True
self.compilation_service_is_local = True

# TODO: use a configration file or environment variables to set these values
# Maybe use dotenv (see https://pypi.org/project/python-dotenv/)
# and/or dynaconf (see https://www.dynaconf.com/)
runner_is_local: bool
compilation_service_is_local: bool


class ApplicationManager:
_instance = None

def __init__(self):
self._experimenter_api = None

def start(self):
if self._experimenter_api is not None:
_logger.warning("ApplicationManager already started.")
return
container = Container(log_undefined_deps=True)
container[LabOneQSettings] = LaboneQDefaultSettings
container[RunnerControlAPI] = Singleton(RunnerLegacy)
# RunnerControlAPI and the RunnerAPI are currently implemented by the same object:
container[RunnerAPI] = container[RunnerControlAPI]
container[CompilationServiceAPI] = CompilationServiceLegacy
container[PayloadBuilderAPI] = PayloadBuilder
container[ExperimentAPI] = ExperimentWorkflow
self._experimenter_api = container[ExperimentAPI]

def laboneq(self) -> ExperimentAPI:
return self._experimenter_api

@staticmethod
def instance() -> "ApplicationManager":
if ApplicationManager._instance is None:
ApplicationManager._instance = ApplicationManager()
ApplicationManager._instance.start()
return ApplicationManager._instance
12 changes: 6 additions & 6 deletions laboneq/compiler/code_generator/analyze_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,9 +293,9 @@ def analyze_set_oscillator_times(
signal_obj: SignalObj,
) -> AWGSampledEventSequence:
signal_id = signal_obj.id
device_id = signal_obj.device_id
device_type = signal_obj.device_type
sampling_rate = signal_obj.sampling_rate
device_id = signal_obj.awg.device_id
device_type = signal_obj.awg.device_type
sampling_rate = signal_obj.awg.sampling_rate
delay = signal_obj.total_delay
set_oscillator_events = [
event
Expand Down Expand Up @@ -356,9 +356,9 @@ def analyze_acquire_times(
) -> AWGSampledEventSequence:

signal_id = signal_obj.id
sampling_rate = signal_obj.sampling_rate
sampling_rate = signal_obj.awg.sampling_rate
delay = signal_obj.total_delay
sample_multiple = signal_obj.device_type.sample_multiple
sample_multiple = signal_obj.awg.device_type.sample_multiple
channels = signal_obj.channels

_logger.debug(
Expand Down Expand Up @@ -465,7 +465,7 @@ def analyze_trigger_events(
and signal.id == event["signal"]
]
delay = signal.total_delay
sampling_rate = signal.sampling_rate
sampling_rate = signal.awg.sampling_rate
device_type = signal.awg.device_type

sampled_digital_signal_change_events = AWGSampledEventSequence()
Expand Down
2 changes: 1 addition & 1 deletion laboneq/compiler/code_generator/analyze_playback.py
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ def _make_pulse_signature(pulse_iv: Interval, wave_iv: Interval, signal_ids: Lis
def _interval_start_after_oscillator_reset(
events, signals, compacted_intervals: IntervalTree, delay, sampling_rate
):
device_id = next(iter(signals.values())).device_id
device_id = next(iter(signals.values())).awg.device_id

osc_reset_event_time = [
length_to_samples(event["time"] + delay, sampling_rate)
Expand Down
Loading

0 comments on commit dd2cb0a

Please sign in to comment.