Coder Social home page Coder Social logo

py-qua-tools's People

Contributors

arthurostrauss avatar asafr-quantum avatar bguttel avatar daniellqm avatar deanpoulos avatar galwiner avatar kevinavr avatar liorella-qm avatar lorenzoperi17 avatar matpompili avatar michalgqm avatar nikolaqm avatar nulinspiratie avatar qguyk avatar rozenasf avatar sagiqm avatar samarthh avatar satyabade12 avatar talshani avatar theolaudatqm avatar tomerfqm avatar yomach avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

py-qua-tools's Issues

Missing fields in quantum element

Quantum element in the ConfigBuilder doesn't support the fields:

  • singleInputCollection
  • hold_offset
  • multipleInputCollection
  • outputPulseParameters(measure)
  • thread
  • add oscillator to element
  • digitalOutputs
  • multipleInputs

Missing fields in ports

All ports should have a field "shareable" and AnalogOutputPort should contain "crosstalk"

FluxTunableTransmon and Transmon question

in FluxTunableTransmon and Transmon:

  1. why is mixer optional? We'd always want to upconvert the signals, no? Is it for a scenario where you don't want to do mixer calibration at all? Is it even possible to define an IQ element without mixer in the config schema?
  2. intermediate frequency should not be an int type. Probably the best thing to do is to set it to a float, this leads to desired behavior when you copy-paste into pycharm:
import numpy as np


def foo(x: float):
    print(x)
    

foo(2)
foo(2.3)
foo(4.5 + 1j)  # warning
ar = np.array(3)
foo(ar)  # warning
ar2 = np.array([2, 3])
foo(ar2[0])
foo(ar2)  # warning

Feature request - qm_constants module

There are several values that are constants of the QM environment, for example:

  • minimal time of flight
  • resolution of integers or fixed variables
  • introduced time gaps when performing actions such as entering a new loop or comparing two values

It would be nice to have a module to access them and be up to date with future changes.

definition of Controller object in config builder

when working with qualang_tools.config.components.Controller, I noticed a few things that require attention:

  1. I see two types of methods: analog_input and his friends for output/digital and use_analog_input_port and his friends. For both of them, I don't really understand what they do... For use_..., what does "use" mean? Is it some kind of add? Also the idea that you can add if it doesn't exist, but return if it does, but still the offset parameter is there - that's confusing. Wouldn't it make more sense to just have an add and since the various ports are public members of this class, just be able to get them when needed?
  2. There is no offset parameter in the context of digital outputs - digitals are binary. Does the config schema also define an offset for the digital input/output? If so this is a bug that also exists in QUA.
  3. I am not sure the int option of the __init__ method makes sense... We will never want to add ports "randomly" - ports always correspond to some actual connectivity we'd want...
    image

The length of integration weight needs to be a multiple of 4

Hello,

When I tried to use ConstantIntegrationWeights (

class ConstantWaveform(Waveform):
) in the config builder and run the simulation, for example,

ro.add( Operation( MeasurePulse( "zero_pulse", [ zero_wf, zero_wf, ], 200, ) .add(DigitalWaveform("ON", [(1,0)])) .add(ConstantIntegrationWeights("integW_cos", 1.0, 0.0, int(1000 / 4))) .add(ConstantIntegrationWeights("integW_sin", 0.0, 1.0, int(1000 / 4))) .add(ConstantIntegrationWeights("integW_minus_sin", 0.0, -1.0, int(1000 / 4))), name='zero' )

I would get the error that

2022-08-04 09:34:29,863 - qm - ERROR - Invalidation ERROR integration [email protected]_minus_sin: Integration weight segment must have a length that is a multiple of 4

I was wondering whether there's a bug or what's the correct way of using it.

Thanks,
Sherry

Fix __init__.py files

Currently, when writing: from qualang_tools.bakery import baking, it gets to the main init.py files and imports the entire library.
This needs to be fixed.

In addition, it might be smart to more to a hierarchy based init files, such that the main init.py only has the next level and not everything

"measure" vs "measurement"

Hello,

I'm not sure if this is really an issue, but I noticed that MeasurePulse class in the config module creates "measure", not "measurement" value for "operation" key as shown below. I don't see any error in running a qua program, so I image both are probably allowed, but the clarification would be appreciated.

"readout_pulse_r0": { "operation": "measure", "length": 5000, "waveforms": { "I": "readout_I_wf_r0", "Q": "readout_Q_wf_r0" },

Thanks,
Jaseung

digital input port id

Hello,

I encountered this issue that even after havingthe digital input in the initialization, it still said ConfigurationError("digital input port must be set first"). I think the problem is in the initialization, the digital input port is labeled 'in1' anyways, but in the set_digital_input_delay function, it was trying to find f'in{port_id}'.

self.dict["digitalInputs"]["in" + str(i + 1)] = {

Thanks,
Sherry

inconsistent type issue of `opx_driver.OPX.qua_program`

the member qua_program returns an QUA program but it is used in get_prog() as if it were an actual QUA program instance

The recommended usage pattern is also to replace the method in the instance with a field containing the qua program instance and not with a callable method.

This causes type checking issues showing up in Pylance (VS Code) which complains about overwriting () -> QuaProgram with just QuaProgram, and the result of respecting the type hints information or as matter of fact leaving the method as-is would cause errors.

My recommendation would be to change this so that qua_program would always be a field created in the constructor and assigned to maybe _default_qua_program which is a @staticmethod.

Original code for context (with added type hints and comment at type error):

    # Empty method that can be replaced by your pulse sequence in the main script
    # This can also be modified so that you can put the sequences here directly...
    def qua_program(self) -> Program:
        """
        Custom QUA program

        :return: QUA program
        """
        with program() as prog:
            pass
        return prog

    # @abstractmethod
    def get_prog(self) -> Program:
        """Get the QUA program from the user"""
        prog = self.qua_program # <--- incorrect type
        return prog

baking.py: digital marker

Hello,
I encountered a problem about digital marker when using baking. First, I tried to play an existing operation in the baking context. That operation has a digital marker 'ON'. However, the baked waveforms don't have 'digital marker' at all. I use the digital marker to trigger some switches so it's important to keep this attribute. I also tried to add_Op with argument digital_marker='ON'. However, it didn't get copied to the final configuration. I found the problem comes from the function _update_config. It didn't have the part to create 'digital_marker' at all. I'm doing some workaround now. Hope it can be fixed in the next version.
Thanks,
Sherry

definition of port object

in qualang_tools.config.primitive_components.Port, controller should not be a member of this class since a port is always associated with a controller.
Right now in the initialization we can do things like this:

cb.add(Controller('con1',
                  analog_outputs=[AnalogOutputPort('con2', 1, offset=0.3)])
       )

Improve readme for config tools

We currently have a readme for the config builder scripts in the main folder, a separate readme for the GUI in the server subfolder, and no information about the integration tools.
We need to have one unified readme with all of the information.

Add digital waveforms to pulses

Dear developers,

I am using the config builder tool, but it seems that it is currently not supporting digital markers.
I would like to add a control pulse that contains both analog and digital waveforms, but this is currently not supported.

BTW I think it is good to have the digital waveforms in the constructor.

Thanks in advance,
Niv

Mixer issues

the mixer type and the mixer definition in the schema are not consistent. The mixer is a list of dictionaries with keys intermediate_frequency, correction, lo_frequency, see here

image

qcodes driver `OPX.set_sweep_parameters()` - support non linear `setpoints` (or document limitation)

in opx_driver.py:

the set_sweep_parameters of axis1 / axis2 only works correctly if the setpoints argument is creatable using np.linspace.
The reason is that internally only the start/stop and number of points are stored and a new np.linspace is generated just before storing the axis into the QCoDeS dataset.

The request is to allow storing the exact setpoint values in an ArrayParameter or similar in case the received sequence is not linear.

Issue is not high priority but at least please document this limitation.

Updates to Pulse objects

  • move digital_marker to Pulse (common for Measure/ControlPulses)
  • rename MeasurePulse type from “measure”’ to “measurement”

Add a digital element

Dear developer,

It will be nice if the element collection on the config tool, will contain a class for a quantum element with only digital input (output of the controller).

Thanks in advance,
Niv

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.