Giter VIP home page Giter VIP logo

broadbean's Introduction

QCoDeS PyPi DOCS PyPI python versions DOI

Build Status Github Build Status Github Docs Ruff OpenSSF

QCoDeS is a Python-based data acquisition framework developed by the Copenhagen / Delft / Sydney / Microsoft quantum computing consortium. While it has been developed to serve the needs of nanoelectronic device experiments, it is not inherently limited to such experiments, and can be used anywhere a system with many degrees of freedom is controllable by computer. To learn more about QCoDeS, browse our homepage .

To get a feeling of QCoDeS read 15 minutes to QCoDeS, and/or browse the Jupyter notebooks in docs/examples .

QCoDeS is compatible with Python 3.10+. It is primarily intended for use from Jupyter notebooks, but can be used from traditional terminal-based shells and in stand-alone scripts as well. The features in qcodes.utils.magic are exclusively for Jupyter notebooks.

Default branch is now main

The default branch in QCoDeS has been renamed to main. If you are working with a local clone of QCoDeS you should update it as follows:

  • Run git fetch origin and git checkout main
  • Run git symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/main to update your HEAD reference.

Install

In general, refer to here for installation.

Docs

Read it here . Documentation is updated and deployed on every successful build in main.

We use sphinx for documentations, makefiles are provided both for Windows, and *nix, so that you can build the documentation locally.

Make sure that you have the extra dependencies required to install the docs

pip install -r docs_requirements.txt

Go to the directory docs and

make html

This generate a webpage, index.html, in docs/_build/html with the rendered html.

QCoDeS Loop

The modules qcodes.data, qcodes.plots, qcodes.actions, qcodes.loops, qcodes.measure, qcodes.extensions.slack and qcodes.utils.magic that were part of QCoDeS until version 0.37.0. have been moved into an independent package called qcodes_loop. Please see it's repository and documentation for more information.

For the time being it is possible to automatically install the qcodes_loop package when installing qcodes by executing pip install qcodes[loop].

Code of Conduct

QCoDeS strictly adheres to the Microsoft Open Source Code of Conduct

Contributing

The QCoDeS instrument drivers developed by the members of the QCoDeS community but not supported by the QCoDeS developers are contained in

https://github.com/QCoDeS/Qcodes_contrib_drivers

See Contributing for general information about bug/issue reports, contributing code, style, and testing.

License

See License.

broadbean's People

Contributors

aadiyatul avatar astafan8 avatar basnijholt avatar dependabot[bot] avatar dominik-vogel avatar edumur avatar github-merge-queue[bot] avatar giulioungaretti avatar jenshnielsen avatar picarro-yren avatar pre-commit-ci[bot] avatar rasmusbc59 avatar sohailc avatar spauka avatar tjni avatar trevormorgan avatar williamhpnielsen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

broadbean's Issues

incompatible dimensions when plotting

Hi,

I had some trouble when running the following code:

bp1.setSR(1e9)
bp1.insertSegment(0, ramp, (0, 1e-3), name='', ts=1, durs=20e-9)
bp1.insertSegment(1, ramp, ( 1e-3, 1e-3), name='', ts=1, durs=30e-9)
bp1.plot()

One gets the error:
File "C:\ProgramData\Anaconda3\lib\site-packages\matplotlib\axes_base.py", line 244, in _xy_from_xy
"have shapes {} and {}".format(x.shape, y.shape))
ValueError: x and y must have same first dimension, but have shapes (50,) and (49,)

Matching broadbean ch. amplitude and AWG real ch. amplitude

When uploading a sequence BB doesn't check if the real channel amplitude and the one defined from this function ptseq.setChannelAmplitude() are the same.

Could it be possible to implement either of these solutions:

  • raise a flag if the two are different?
  • using the value of ptseq.setChannelAmplitude(i,f) to update AWG. chi_amplitude(f) when uplaoding the sequence?

Rename blueprints

Blueprints should be renamed to waveforms everywhere in the code base.

input structure for custom functions

What is the reason for the npts argument of custom functions? E.g.

    def sine(freq, ampl, off, SR, npts):
        time = np.linspace(0, npts/SR, npts)
        freq *= 2*np.pi
        return (ampl*np.sin(freq*time)+off)

A format more user friendly seems to be:

    def sine(freq, ampl, off, times):
        freq *= 2*np.pi
        return (ampl*np.sin(freq*times)+off)

@WilliamHPNielsen @lucblom

Deprecate outputSEQXfile method (use forge instead)

While working with AWG5208 and using the example notebook from broadbean as the reference, using outputForSEQXFile method of the Sequence object together with makeSEQXFile method of the AWG driver like below resulted in an error 1331 on the AWG device upon loading the successfully created and transmitted SEQX file:

...
seqx_args = sequence.outputForSEQXFile()
seqx_file = awg.makeSEQXFile(**seqx_args)
...

As @WilliamHPNielsen suggested, forging the sequence should be used instead (and it indeed worked):

...
forged_sequnce = sequence.forge()
seqx_file = awg.make_SEQX_from_forged_sequence(forged_sequence)
...

ToDo:

@WilliamHPNielsen @sohailc

Very short durations - what's the correct interpolation?

How should we deal with very short segments? What is closest to what the user needs and how do AWG's usually handle short pulses?

If we supply an array of voltages [0, 0, 1, 1, 0, 0, 1, 1] at a given sample rate, when do we expect voltage changes to happen?

Given the following input:
short_pulse_raw

Which of the three following scenarios do we expect the AWG to (attempt to) realise? How should broadbean's plotting reflect that?

short_pulse_01
pshort_pulse_02
short_pulse_03

@dmtvanzanten @Dominik-Vogel @nataliejpg

adding blueprints relative to another

Is it possible to add a Blueprint relative to another one? E.g.

bp1 = bb.BluePrint()  
bp1.insertSegment(0, ramp, (0, 1e-3), name='wave1', dur=3.001e-6)
bp1.insertSegmentOffset(relative='wave1', offset=1e-6, ramp, (0, 1e-3), name='wave2', dur=3.001e-6)

Liberate the markers

The bundling together of N markers and one analogue channel is somewhat artificial (although some AWGs actually bundle them together in hardware). It would be a good simplification to simply have waveforms and channels, where a waveform then may be 1-bit, 12-bit, 14-bit or whatever. It should only matter when assigning a waveform to an output of an instrument, where the instrument (driver) should then complain if one tries to assign a non-binary waveform to a marker channel. Just like the driver should complain if the waveform specifies too large a voltage etc.

For the plotting, however, it certainly does make sense to distinguish a marker from a "real" waveform, so I would propose that the plotter takes a list of channels to visualise as markers. They should then get a smaller plot window or something like that.

Channel order

As of now channels are not given in any particular order:

    @property
    def channels(self):
        """
        The channels that has something on them
        """
        chans = [key for key in self._data.keys()]
        return chans

Installing broadbean pip installs PyQt5 on top of Conda version

Windows 10 in an environment installed with the qcodes-dk installer script which has installed PyQT5.6 from Conda

pip install git+https://github.com/QCoDeS/broadbean.git
Collecting git+https://github.com/QCoDeS/broadbean.git
  Cloning https://github.com/QCoDeS/broadbean.git to c:\users\qcodes~4\appdata\local\temp\pip-r0ge38lm-build
Requirement already satisfied: numpy>=1.12.1 in c:\users\qcodes-davewecker\anaconda3\envs\qcodes-qdev-master\lib\site-packages (from broadbean==0.9)
Requirement already satisfied: matplotlib>=2.0.1 in c:\users\qcodes-davewecker\anaconda3\envs\qcodes-qdev-master\lib\site-packages (from broadbean==0.9)
Collecting PyQt5 (from broadbean==0.9)
  Using cached PyQt5-5.8.2-5.8.0-cp35.cp36.cp37-none-win_amd64.whl
Requirement already satisfied: six>=1.10 in c:\users\qcodes-davewecker\anaconda3\envs\qcodes-qdev-master\lib\site-packages (from matplotlib>=2.0.1->broadbean==0.9)
Requirement already satisfied: python-dateutil in c:\users\qcodes-davewecker\anaconda3\envs\qcodes-qdev-master\lib\site-packages (from matplotlib>=2.0.1->broadbean==0.9)
Requirement already satisfied: pytz in c:\users\qcodes-davewecker\anaconda3\envs\qcodes-qdev-master\lib\site-packages (from matplotlib>=2.0.1->broadbean==0.9)
Requirement already satisfied: cycler>=0.10 in c:\users\qcodes-davewecker\anaconda3\envs\qcodes-qdev-master\lib\site-packages (from matplotlib>=2.0.1->broadbean==0.9)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=1.5.6 in c:\users\qcodes-davewecker\anaconda3\envs\qcodes-qdev-master\lib\site-packages (from matplotlib>=2.0.1->broadbean==0.9)
Collecting sip<4.20,>=4.19 (from PyQt5->broadbean==0.9)
  Using cached sip-4.19.2-cp35-none-win_amd64.whl
Installing collected packages: sip, PyQt5, broadbean
  Running setup.py install for broadbean ... done
Successfully installed PyQt5-5.8.2 broadbean-0.9 sip-4.19.2

Named arguments for PulseAtoms

Allow named arguments for PulseAtoms.
Current call signature

BluePrint.insertSegment(pos, func, args=(), dur=None, name=None, durs=None)

does not allow to use PulseAtoms with named arguments. I my opinion the named arguments should even be the default in order to avoid human error when calling a method like

bp.insertSegment(-1, monteCarloZeta, args=(12.3, 12.5, 59.76, 21.4 , 43.56, 3*pi))

Time to set samplerate

Currently the sample rate has to be specified for every Blueprint. It is desirable to build entire sequences without having to specify the sample rate and set it once it needs to be forged.
We should think about the implications of setting the sample rate at that later stage.

Wrong channel order returned by Sequence.outputForAWGFile()

BluePrints are assigned to channel depending on order in which they were added using addBluePrint, instead of channel numbers specified in addBluePrint.

Eg.

element = bb.Element()
element.addBluePrint(2, pulse2)
element.addBluePrint(1, pulse1)
seq = bb.Sequence()
seq.addElement(1, element)
...
seq.outputForAWGFile()
awg.make_send_and_load_awg_file(*awgfile[:])

will assign pulse2 to channel 1 and pulse1 to channel 2.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.