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

Change annealing quadratic keys to strings #8

Merged
merged 2 commits into from
Jan 17, 2020
Merged

Change annealing quadratic keys to strings #8

merged 2 commits into from
Jan 17, 2020

Conversation

speller26
Copy link
Contributor

Because JSON doesn't support tuple keys

Because JSON doesn't support tuple keys
Copy link
Contributor

@kshitijc kshitijc left a comment

Choose a reason for hiding this comment

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

I like the version with the dict better since it:

  • Implicitly enforces duplicate definitions (defining the same tuple twice).
  • Preserves typing information.
  • Avoids having to deal with issues like differentiating "1,2" / '1, 2".

@speller26 speller26 merged commit 0fb7997 into master Jan 17, 2020
@speller26 speller26 deleted the caw branch January 17, 2020 23:08
@avawang1
Copy link
Contributor

In regards to benefits regarding the string approach:

  • The adjacency list approach using the dict leaves open the question of having only some of the nodes defined or having all of the nodes defined (which is basically defining the same tuple twice).
  • list of edges for representing quadratic coefficients is personally more intuitive to me than adjacency lists of these coefficients
  • when customer does .to_ir() in the SDK, it's easier for them to eyeball and validate
  • avoids having to do extra computation from a list of edges to adjacency lists and vice versa
  • we expect that customers will have an automated way of writing the IR, so having a string format for the tuples is a bit better

math411 pushed a commit that referenced this pull request Feb 27, 2022
* feature: support for StartPreserveBlock and EndPreserveBlock instructions. (#94)

* prepare release v1.3.0

* update development version to v1.3.1.dev0

* Update copyright headers (#95)

* feature: StartVerbatimBox and EndVerbatimBox (#96)

Added the StartVerbatimBox and EndVerbatimBox instructions.
The code between the start and end instructions will not be modified by
the compiler, thus delineating a "verbatim" box of code.

The astute reader will notice that this is merely a renaming of the
instructions StartVerbatimBlock and EndVerbatimBlock; this change is
marked as a feature to emphasize the incompatibility with v1.3.0.

* prepare release v1.4.0

* update development version to v1.4.1.dev0

* doc: Fix jaqcd typo in README.md (#97)

* prepare release v1.4.0.post0

* update development version to v1.4.1.dev0

* Fix: Pin pydantic and jsonschema versions (#98)

* prepare release v1.4.1

* update development version to v1.4.2.dev0

* added openqasm program and device capability.

* OpenQASM support initial commit.

* added rigetti/ionq tests; added result_type.py

* updated README.md

* reformatted.

* removed unused import.

* reformatted docstring in openqasm_device_action_properties.py

* reformatted.

* [fix] updated docstring.

* [fix] incoporate Kshitij's comments.

* added openqasm schema header in test_schema_base.py

* reformatted.

* reformatted.

* turn off flake8 for jaqcd results/shared_models import alias.

* updated jaqcd __init__.py to support import results from jaqcd folder.

* empty commit to test github checker.

* empty commit 2 to test github checker.

* Merging in changes from main and updating imports for OpenQASM

* Fixing names and defaults to match docs

* Reformatted with `black`

* Bring in internal changes

* Merge changes from the internal repository (#8)

* Fix typo in supportsPhysicalQubits

cr: https://code.amazon.com/reviews/CR-61878135

* Removing `results` from OpenQASM Program

cr: https://code.amazon.com/reviews/CR-62355578

* Reformat files

Co-authored-by: Srikrishna Jaliparthy <jalipart@amazon.com>
Co-authored-by: Jeffrey Heckey <heckey@amazon.com>

* fix: Revert to old module structure (#9)

Co-authored-by: Sergei-kag-aws <kag@amazon.com>
Co-authored-by: ci <ci>
Co-authored-by: Cody Wang <speller26@gmail.com>
Co-authored-by: Jacky Ko <60188942+kjacky@users.noreply.github.com>
Co-authored-by: Jeffrey Heckey <heckey@amazon.com>
Co-authored-by: shiyunon <shiyunon@amazon.com>
Co-authored-by: Jeff Heckey <jheckey@gmail.com>
Co-authored-by: ℂ𝓞𝔇𝚈 <caw@amazon.com>
Co-authored-by: Srikrishna Jaliparthy <jalipart@amazon.com>
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.

None yet

3 participants