qua-platform / py-qua-tools Goto Github PK
View Code? Open in Web Editor NEWTools for enhancing your quantum experiments
License: BSD 3-Clause "New" or "Revised" License
Tools for enhancing your quantum experiments
License: BSD 3-Clause "New" or "Revised" License
Quantum element in the ConfigBuilder doesn't support the fields:
All ports should have a field "shareable" and AnalogOutputPort should contain "crosstalk"
in FluxTunableTransmon
and Transmon
:
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?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
There are several values that are constants of the QM environment, for example:
It would be nice to have a module to access them and be up to date with future changes.
The final configuration generated by ConfigBuilder shouldn't contain empty dictionaries
when working with qualang_tools.config.components.Controller, I noticed a few things that require attention:
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?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.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...Hello,
When I tried to use ConstantIntegrationWeights
(
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
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
qm-qua support 3.10 (and claims <4.0)
Can we see if anything limits us in qualang_tools?
I found the behaviour of unit().ns
quite unituitive as it gives the wrong result when called inside a qua program as 'unit().ns == 1'
As discussed with @TheoLaudatQM in Cambridge I have an sketch of implementation of the correct behaviour, but wanted to double-check if a Pull Request would be welcome :)
@nikolaqm - We got a request from a customer to downgrade docutils. Guy already opened a branch for it (downgrade-docutils)
Can you please make sure that everything works?
And in the meanwhile, check that the readme for the GUI is correct
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
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}'.
Thanks,
Sherry
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
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
we should support adding a list of tuples (value, duration) --> add piece wise constant integration weights class
config GUI currently uses 8050 as default port for serving.
this clashes with Entropy default port.
Let's change it to something else.
@qguyk, is there a more robust solution?
If the original config has an element without analog inputs (only digital), then the delete_samples crashes
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)])
)
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.
Using a negative wait which leads to a time smaller than 0 will cause an infinite recursion and a crash.
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
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
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.
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
Currently it's: from qualang_tools.bakery.randomized_benchmark_c1 import c1_table
Need to move it to a better location
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.