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

Update tutorial_noisy_circuits.py to port default.mixed free of legacy interfaces #1284

Closed
wants to merge 5 commits into from

Conversation

JerryChen97
Copy link
Contributor

Before submitting

Please complete the following checklist when submitting a PR:

  • Ensure that your tutorial executes correctly, and conforms to the
    guidelines specified in the README.

  • Remember to do a grammar check of the content you include.

  • All tutorials conform to
    PEP8 standards.
    To auto format files, simply pip install black, and then
    run black -l 100 path/to/file.py.

When all the above are checked, delete everything above the dashed
line and fill in the pull request template.


Title:
Update tutorial_noisy_circuits.py to port default.mixed free of legacy interfaces

Summary:
In the Tutorial of Noisy Circuits, there's a call dev.state which is a legacy-only interface. In our current standard, the device object will not store the state any more and we should return the latest state via the corresponding measure.

Relevant references:

Possible Drawbacks:

Related GitHub Issues:


If you are writing a demonstration, please answer these questions to facilitate the marketing process.

  • GOALS — Why are we working on this now?

    Eg. Promote a new PL feature or show a PL implementation of a recent paper.

  • AUDIENCE — Who is this for?

    Eg. Chemistry researchers, PL educators, beginners in quantum computing.

  • KEYWORDS — What words should be included in the marketing post?

  • Which of the following types of documentation is most similar to your file?
    (more details here)

  • Tutorial
  • Demo
  • How-to

Copy link

👋 Hey, looks like you've updated some demos!

🐘 Don't forget to update the dateOfLastModification in the associated metadata files so your changes are reflected in Glass Onion (search and recommendations).

Please hide this comment once the field(s) are updated. Thanks!

@JerryChen97
Copy link
Contributor Author

@isaacdevlugt

Copy link
Contributor

@andrijapau andrijapau left a comment

Choose a reason for hiding this comment

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

Nice!

@andrijapau andrijapau marked this pull request as ready for review December 18, 2024 16:56
Co-authored-by: Andrija Paurevic <[email protected]>
@JerryChen97 JerryChen97 changed the base branch from master to dev December 18, 2024 16:58
Copy link
Contributor

@isaacdevlugt isaacdevlugt left a comment

Choose a reason for hiding this comment

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

Looks good to me! Let's just verify that the CI passes and the demo build is fine

@JerryChen97
Copy link
Contributor Author

Looks good to me! Let's just verify that the CI passes and the demo build is fine

oops thanks for reminider seems I missed half bracket

@JerryChen97
Copy link
Contributor Author

Oh no the current method won't pass the legacy _qubit_device test........ We might need to hold on until the new api merged into PL master.

@JerryChen97 JerryChen97 self-assigned this Dec 18, 2024
@isaacdevlugt
Copy link
Contributor

Oh no the current method won't pass the legacy _qubit_device test........ We might need to hold on until the new api merged into PL master.

Good catch!

@isaacdevlugt
Copy link
Contributor

cc @PietropaoloFrisoni to keep your eyes on this for the v0.40 release 👀

@JerryChen97
Copy link
Contributor Author

Close due to potential conflict with 0.40 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants