diff --git a/.github/workflows/actions-test.yml b/.github/workflows/actions-test.yml index 3fd99d83..09e91cdd 100644 --- a/.github/workflows/actions-test.yml +++ b/.github/workflows/actions-test.yml @@ -2,6 +2,7 @@ name: Python Package using Conda on: [push] + jobs: build-linux: runs-on: ubuntu-latest @@ -23,7 +24,7 @@ jobs: echo $GITHUB_PATH - name: pip cache - uses: actions/cache@v2 + uses: actions/cache@v4 id: cache with: path: /usr/share/miniconda/lib/python3.8/site-packages/* @@ -47,11 +48,12 @@ jobs: - name: Install BBN dependencies run: | + sudo apt-get install pandoc export GIT_LFS_SKIP_SMUDGE=1 pip install git+https://github.com/BBN-Q/bbndb.git pip install git+https://github.com/BBN-Q/QGL.git@develop pip install git+https://github.com/spatialaudio/nbsphinx.git@master - pip install pyvisa coveralls scikit-learn pyusb future python-usbtmc setproctitle progress serial + pip install pyvisa coveralls scikit-learn pyusb future python-usbtmc setproctitle progress serial pandoc export GIT_LFS_SKIP_SMUDGE=0 - name: Test with unittest diff --git a/src/auspex/data_format.py b/src/auspex/data_format.py index 5b750fcc..c632a3b9 100644 --- a/src/auspex/data_format.py +++ b/src/auspex/data_format.py @@ -79,7 +79,7 @@ def new_dataset(self, groupname, datasetname, descriptor): descriptor: `DataStreamDescriptor` that describes the dataset that is to be added. """ self._create_meta(groupname, datasetname, descriptor) - mmap = self._create_memmap(groupname, datasetname, (np.product(descriptor.dims()),), descriptor.dtype) + mmap = self._create_memmap(groupname, datasetname, (np.prod(descriptor.dims()),), descriptor.dtype) self.groups[groupname][datasetname] = mmap return mmap @@ -158,7 +158,7 @@ def open_dataset(self, groupname, datasetname): filename = os.path.join(self.base_path,groupname,datasetname+'.dat') assert os.path.exists(filename), "Could not find dataset. Is this the correct name?" - flat_shape = (np.product(meta['shape']),) + flat_shape = (np.prod(meta['shape']),) mm = np.memmap(filename, dtype=meta['dtype'], mode='r', shape=flat_shape) data = np.array(mm).reshape(tuple(meta['shape'])) del mm diff --git a/src/auspex/qubit/pipeline.py b/src/auspex/qubit/pipeline.py index 84b19fc3..3754e765 100644 --- a/src/auspex/qubit/pipeline.py +++ b/src/auspex/qubit/pipeline.py @@ -17,6 +17,7 @@ from functools import reduce from IPython.display import HTML, display from sqlalchemy import inspect +from sqlalchemy.orm import aliased import auspex.config as config import auspex.instruments @@ -79,7 +80,11 @@ def __init__(self, force_new=False): def add_qubit_pipeline(self, qubit_label, stream_type, auto_create=True, buffers=False): # if qubit_label not in self.stream_selectors: m = bbndb.qgl.Measurement - mqs = [l[0] for l in self.session.query(m.label).join(m.channel_db, aliased=True).filter_by(label="working").all()] + #n1 = aliased(m.label) + + #mqs = [l[0] for l in self.session.query(m.label).join(m.channel_db.of_type(n1)).filter_by(n1.name == "working").all()] + mqs = [l[0] for l in self.session.query(m.label).join(m.channel_db).filter_by(label="working").all()] + #mqs = [l[0] for l in self.session.query(m.label).join(m.channel_db, aliased=True).filter_by(label="working").all()] if f'M-{qubit_label}' not in mqs: raise Exception(f"Could not find qubit {qubit_label} in pipeline...") diff --git a/src/auspex/qubit/qubit_exp.py b/src/auspex/qubit/qubit_exp.py index 4a3622b2..c7ba2d25 100644 --- a/src/auspex/qubit/qubit_exp.py +++ b/src/auspex/qubit/qubit_exp.py @@ -534,6 +534,12 @@ def add_qubit_sweep(self, qubit, measure_or_control, attribute, values): exp = QubitExpFactory.create(PulsedSpec(q1)) self.add_qubit_sweep(q1, "measure", "frequency", np.linspace(6e9, 6.5e9, 500)) self.run_sweeps() + + Parameters: + qubit the qubit to sweep + measure_or_control measure or control channel + attribute the attribute to sweep + values the values to sweep through """ param = FloatParameter() # Create the parameter param.name = f"{qubit.label} {measure_or_control} {attribute}"