Skip to content

Commit

Permalink
Merge branch 'qickupdate' into fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rodolfocarobene committed Mar 27, 2024
2 parents c5018b4 + 4fb926d commit 8b5484d
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ repos:
- id: check-yaml
- id: debug-statements
- repo: https://github.com/psf/black
rev: 24.2.0
rev: 24.3.0
hooks:
- id: black
- repo: https://github.com/pycqa/isort
Expand All @@ -18,7 +18,7 @@ repos:
- id: isort
args: ["--profile", "black"]
- repo: https://github.com/asottile/pyupgrade
rev: v3.15.0
rev: v3.15.2
hooks:
- id: pyupgrade
- repo: https://github.com/dhruvmanila/remove-print-statements
Expand Down
3 changes: 0 additions & 3 deletions src/qibosoq/programs/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,6 @@ def __init__(
# pylint: disable-next=too-many-function-args
super().__init__(soc, asdict(qpcfg))

self.reps = qpcfg.reps # must be done after QickProgram init
self.soft_avgs = qpcfg.soft_avgs

def declare_nqz_zones(self, pulse_sequence: List[Pulse]):
"""Declare nqz zone (1-2) for a given PulseSequence.
Expand Down
18 changes: 17 additions & 1 deletion src/qibosoq/programs/pulse_sequence.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
"""Program used by qibosoq to execute sequences."""

import logging
from typing import List

from qick import AveragerProgram
from qick import AveragerProgram, QickSoc

import qibosoq.configuration as qibosoq_cfg
from qibosoq.components.base import Config, Qubit
from qibosoq.components.pulses import Element
from qibosoq.programs.flux import FluxProgram

logger = logging.getLogger(qibosoq_cfg.MAIN_LOGGER_NAME)
Expand All @@ -13,6 +16,19 @@
class ExecutePulseSequence(FluxProgram, AveragerProgram):
"""Class to execute arbitrary PulseSequences."""

def __init__(
self,
soc: QickSoc,
qpcfg: Config,
sequence: List[Element],
qubits: List[Qubit],
):
"""Init function, call super.__init__."""
super().__init__(soc, qpcfg, sequence, qubits)

self.reps = qpcfg.reps # must be done after AveragerProgram init
self.soft_avgs = qpcfg.soft_avgs

def initialize(self):
"""Declre nyquist zones for all the DACs and all the readout frequencies.
Expand Down
3 changes: 3 additions & 0 deletions src/qibosoq/programs/sweepers.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ def __init__(
self.sweepers = reversed_sweepers(sweepers)
super().__init__(soc, qpcfg, sequence, qubits)

self.reps = qpcfg.reps # must be done after NDAveragerProgram init
self.soft_avgs = qpcfg.soft_avgs

def validate(self, sweeper: Sweeper):
"""Check if a sweeper is valid.
Expand Down

0 comments on commit 8b5484d

Please sign in to comment.