Skip to content

Waveform Parameters not writeable? #528

Description

@edyounis

I have the following python code:

            if not isinstance(instruction, Instruction.Pulse):
                continue

            waveform = instruction._0.waveform
            waveform.parameters["scale"] = quil.expression.Expression.Number(1.0 + 0.0j)
            # cache this waveform

The goal here is to cache all the waveform shapes regardless of the scale. If you throw away the scale, there is a lot of compression potential in my use case. However, the waveform.parameters don't change after the write. Additionally, this doesn't show as an error, the code executes fine.

Edit:

Trying to explore workarounds, I found the following code errors:

            waveform2 = quil.waveform.Waveform.from_quil(waveform.to_quil())

with:

TypeError: argument 'invocation': 'str' object cannot be cast as 'WaveformInvocation'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions