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

clifford.py #982

Conversation

AbdullahKazi500
Copy link

Issue #, if available:
#253
Description of changes:
Issue #: N/A

Description of changes:
Implemented a Clifford simulator target for the local simulator by creating a new class CliffordSimulator that inherits from OpenQASMSimulator and provides implementations for its abstract methods. Additionally, implemented the CliffordProgramContext class to handle the translation of OpenQASM instructions into simulator instructions specific to the Clifford simulator. Registered the CliffordSimulator class so that it can be recognized by the Amazon Braket SDK.
Testing done:

Merge Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your pull request.

General

Tests

  • I have added tests that prove my fix is effective or that my feature works (if appropriate)
  • I have checked that my tests are not configured for a specific region or account (if appropriate)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@AbdullahKazi500 AbdullahKazi500 requested a review from a team as a code owner May 31, 2024 05:07
Copy link
Member

@speller26 speller26 left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution; please make the contribution to the default simulator repository.

def __init__(self, **kwargs):
self.__dict__.update(kwargs)

class CliffordSimulator(OpenQASMSimulator):
Copy link
Member

Choose a reason for hiding this comment

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

This doesn't seem to actually build or run the circuit

Copy link
Author

Choose a reason for hiding this comment

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

@speller26 This declares a new class named CliffordSimulator that inherits from the OpenQASMSimulator class.CliffordSimulator will inherit all methods and attributes from OpenQASMSimulator, and you can also add additional methods or override existing ones specific to the behavior of a Clifford simulator.
any comments or feedback appreciated

Copy link
Author

Choose a reason for hiding this comment

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

this code defines a constructor method for initializing instances of the CliffordSimulator class with arbitrary attributes and declares the CliffordSimulator class as a subclass of OpenQASMSimulator.

Copy link
Author

@AbdullahKazi500 AbdullahKazi500 May 31, 2024

Choose a reason for hiding this comment

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

@speller26 made a new PR With the circuit

@speller26
Copy link
Member

Closing as this isn't being worked on.

@speller26 speller26 closed this Jun 4, 2024
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