Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/Add all MW channel properties #72

Merged
merged 11 commits into from
Sep 4, 2024
Merged

Conversation

nulinspiratie
Copy link
Contributor

This PR adds the following changes

  • Add missing attributes to MWChannel
  • Make Channel an abstract base class
  • Move intermediate_frequency to Channel, meaning that all channels share this property
  • Add smearing, time_of_flight

Copy link
Collaborator

@deanpoulos deanpoulos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey Serwan, the attributes look good, but it looks like the MWChannel is missing the API for creating QUA commands, e.g.,

AttributeError: 'InOutMWChannel' object has no attribute 'measure'

These currently live in e.g., the IQChannel class. Perhaps you could put a separate class which contains just the interface for creating QUA command and have both InOutIQchannel and InOutMWChannel inherit from this.

Copy link
Collaborator

@deanpoulos deanpoulos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another thing is that it wont allow you to add IQ waveforms unless it is an IQChannel, but you should also be able to add IQWaveforms to an MWChannel. So in
quam/components/pulses.py, you could add something like:

                 channel type (SingleChannel, IQChannel, InOutIQChannel).
         """
 
-        from quam.components.channels import SingleChannel, IQChannel
+        from quam.components.channels import SingleChannel, IQChannel, MWChannel
 
         pulse_config = config["pulses"][self.pulse_name]
 
@@ -221,7 +221,7 @@ class Pulse(QuamComponent):
                 "Waveform type 'single' not allowed for IQChannel"
                 f" '{self.channel.name}'"
             )
-        elif "I" in waveforms and not isinstance(self.channel, IQChannel):
+        elif "I" in waveforms and not isinstance(self.channel, (IQChannel, MWChannel)):
             raise ValueError(
                 "Waveform type 'IQ' not allowed for SingleChannel"
                 f" '{self.channel.name}'"

@nulinspiratie
Copy link
Contributor Author

Addressed both issues, @deanpoulos wdyt?

@nulinspiratie nulinspiratie merged commit 26dc263 into main Sep 4, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants