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

Register Layout use in the Basic Usage example #53

Open
sebgrijalva opened this issue Dec 5, 2022 · 0 comments
Open

Register Layout use in the Basic Usage example #53

sebgrijalva opened this issue Dec 5, 2022 · 0 comments

Comments

@sebgrijalva
Copy link

sebgrijalva commented Dec 5, 2022

In the readme.md there is a SquareLatticeLayout object begin imported as a special layout. But later it is never used.

from pulser.register.special_layouts import SquareLatticeLayout
# ...
# Define a register for your sequence
register = Register.square(2, spacing=5, prefix="q")
# Create a sequence for that register
sequence = Sequence(register, devices.IroiseMVP)

When I try to run the example sequence I'm getting a "Bad Request" with:

"code": 400,
  "data": {
    "body": {
      "sequence_builder": [
        "The received sequence's register was not defined from a RegisterLayout."
      ]
    }
  },
  "message": "Bad request.",
  "status": "fail"

I have been able to send the batch by changing the register creation to:

square_layout = SquareLatticeLayout(3, 3, spacing=6)
register = square_layout.define_register(0,1,2)
# Create a sequence for that register
sequence = Sequence(register, devices.IroiseMVP)

Is this something to be updated about this example? I can make a PR if so.

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

No branches or pull requests

1 participant