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

Bug/fix for circuits api error #1775

Merged
merged 7 commits into from
Sep 12, 2023
Merged

Conversation

Prasy12
Copy link
Collaborator

@Prasy12 Prasy12 commented Sep 11, 2023

  • I have added the tests to cover my changes.
  • I have updated the documentation and CHANGELOG accordingly.
  • I have read the CONTRIBUTING document.

@Prasy12 Prasy12 requested a review from a team as a code owner September 11, 2023 16:13
@codecov
Copy link

codecov bot commented Sep 12, 2023

Codecov Report

❗ No coverage uploaded for pull request base (qelectron@7611721). Click here to learn what that means.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             qelectron    #1775   +/-   ##
============================================
  Coverage             ?   89.69%           
============================================
  Files                ?      115           
  Lines                ?     6654           
  Branches             ?        0           
============================================
  Hits                 ?     5968           
  Misses               ?      686           
  Partials             ?        0           
Flag Coverage Δ *Carryforward flag
Dispatcher 86.69% <0.00%> (?) Carriedforward from 55a1ea9
SDK 91.58% <0.00%> (?) Carriedforward from 55a1ea9
UI_Backend 89.65% <0.00%> (?)

*This pull request uses carry forward flags. Click here to find out more.

@kessler-frost kessler-frost merged commit a0ca914 into qelectron Sep 12, 2023
11 checks passed
@kessler-frost kessler-frost deleted the bug/fix-for-circuits-api-error branch September 12, 2023 07:52
AlejandroEsquivel added a commit that referenced this pull request Sep 13, 2023
* simplify conditional

* change to requirements to >= rather than ==

* docstring and type hints for `qelectron()`

* move `QElectronInfo` beside `QNodeSpecs` and `QNodeQE`

* docstring and type hints for `QNodeQE`

* docstring and type hints for `QNodeFutureResult`; move class to top

* docstring for `QCluster`

* docstrings for qiskit executors

* docstring for `Simulator`

* remove `get_config` default from `Simulator`

* remove `get_config` defaults from base qexecutors

* remove top-level qelectron config

* correct `init_runtime_service` to use instances

* link to qiskit docs for options

* edit `QiskitExecutor` description

* generalize type hint for base cluster

* expand `QCluster` docstring; add missing `executors`

* revise `qelectron` description

* copy `selector` description from clusters

* add recommendation to `device` description

* add parallelism mention to `Simulator` description

* remove `backend` from docstring; make attr "private"

* Trying Sankalp

* Trying another one of Sankalp's suggestions

* Added full docstrings

* let's try one more time

* type hint `qnode` as `Optional` for consistency

* rephrase qelectron docstring

* match qelectron description to electron

* rephrase qclusters docstring

* use :code: tags for better docstring rendering

* replace link to options. link elsewhere in docs.

* add dependency `autodoc-pydantic`; configure

* api expose qelectrons

* api executors for qiskit, ibmq, and simulator

* api executors and plugins include qelectrons

* api entry for qclusters

* enable original device shots and wires for `Simulator`

* enable original device shots and wires for `IBMQExecutor`

* typo fix

* minor edits, still figuring out why config test is failing

* shots handled with device shots, run_kwargs are now hashable and jsonable by being converted into a tuple of tuples, changes to server core and utils reverted

* removed old hashable kwargs

* docstring changes

* typo fix

* autopep8 cleanup

* return dummy result with correct shape

* refactor future result creation

* add `batch_transform` with override

* add `run_later` test

* unrelated - remove unused import

* Changed dict method as per Ara's suggestion and verified executors still work

* braketqubit.rst inserted at correct points for indexing

* split docs into two files for local and remote braket

* Remote docs done

* local executor docs completed

* some typos fixed

* more typos fixed

* Changed over to thread based for local executor and made neccessary changes to batch_submit

* change discoverable config variables in aws plugin

* change s3 bucket default to tuple

* code restructuring

* simplify overridden `batch_transform`

* correct overridden `batch_execute`

* add test case

* more import fixes

* fixing plugin imports

* separate conftest and pennylane tests dir

* update aws plugins - avoid issue #33

* fix qelectron decorator import; organize imports

* basic tests for braket plugin

* Fixed importing with the executors

* removed duplicate lmdbm requirement

* updated requirements workflow to ignore qserver in the sdk-only case

* removed the references to experimental

* pinned package versions for qelectron stuff

* removed the plugin print statement

* use `Optional[int]` for executor `shots` fields

* remove accidental comma

* React virtualised for qelectron list

* changes for qelectron route

* Qelectron table styling

* override `self.gradient_fn` to avoid warning

* changes to default configs

* Remote device update

* header alignment for qelectron list

* fix for overflow startime in qlectron list

* Changes to the response model in jobs api.

* Updated changelog

* use `qml.math` to check for trainable params

* minor change

* remove `RuntimeOptions`; use dict-tuple approach

* remove random whitespace

* add `expand` method to handle multi-circuit result

* fix getting executor backend name

* make `get_results` multi-result compatible

* organize imports

* generalize metadata handling

* adapt test to dict-tuple change on `QiskitExecutor`

* adapt test for more variation of shot noise

* typo fix

* update to install instructions

* Fixes for 'Qubit' typo and qlecron table gap in ui

* Fix for empty gate sizes on Qelectron circuits.

* mediaquery for list height in 945 and 1024 resolutions

* Fix for qelectron job table height for some resolutions

* Changes for lmdb data validation

* UI side error handling and snackbars

* Fix for gate wires iteration on get job details.

* UI changes for many gates in circuit and runtime 0ms fix

* Fix for failed test cases in ui

* Fix for more gates in UI circuit tab

* Removed default qbit wire initialization.

* No. of i-Qubit Gates:text change

* qelectron for sublattice

* upgrade pennylane requirement

* define list of valid devs & add 'device' validator

* include and propagate qnode device name in `QElectronInfo`

* handle `'default.gaussian'` being original device

* increment num executions original and custom device

* use original qnode wires to correct `qml.state()`

* move `QNodeSpecs` and `QElectronInfo`; pack exec info into new `qelectron_info` field

* organize imports

* add `override_shots` property; use -1 as default

* remove unused `RuntimeOptions` class

* make select qml objects pickleable (e.g. `Projector`)

* amend simulator validator

* improve check for trainable params; handle no args nor kwargs case

* Unit Tests For UI QElectron

* QElectronUI unit tests

* `Simulator` support shot vectors

* add conditional xfail; reorganize; handle `test_probs` in measurements tests

* clean up comment

* remove scalar input check from custom `gradients` method

* use original args and kwargs in run-later device call

* update conftest

* limited batch grad support; allow 'spsa', 'finite-diff', 'parameter-shift', 'best'

* rename `short_name` to "qelectron_device"

* use `gradient_fn="best"` at low-level; fixes return type w/ `diff_method=None`

* update conftest for shot vector

* remove custom gradients; grads are concurrent without

* update conftest

* Changes Qelectron UI BE unit test

* add `qnode_specs` attribute to base executor

* pass `qnode_specs` to executors in qserver

* pass `qnode_specs` to executors in simulator

* clean up; remove old comment

* unify and re-use the `re_execute` pattern from run_later

* Minor fix to default the expand and tab states

* Updated changelog

* improve interface compatibility

* include "auto" as no-reshape no-capability override case

* docstring for `batch_execute`

* update qinfo docstrings

* fix run_later with autograd

* rearrage and annotate pickling module

* remove comment

* use pennylane numpy to avoid new Numpy requirement

* use relative import from covalent

* Update requirements.txt with new pennylane version

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fixing test and requirements.yml

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* modified manifest for executors

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* minor fixes

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* commented the code for deleting url attribute from summary api

* format changes for covalent CLI

* Reverted dispatcher address issue fix

* debuggin

* should fix things

* debugging

* debugging

* debugging

* debugging

* debugging

* fixed

* another fix

* fixing tests

* trying now

* fixing tests

* fixing tests

* fixing tests

* fixing tests

* removed assert statement

* syncing with develop

* Modify `Electrons` to use Covalent server's QElectron DBs, instead of QServer QElectron DB (#1766)

* improve docstrings

* use Covalent (not QServer) database

* update changelog

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* Update electron_dal.py to make a comment more verbose

* fixed test

* fixed another test

* fixed pydantic errors

* fixing more pydantic errors

* added fix for rtd failing

* switched back to removing pydantic's version upper limit and added pydantic-settings to doc's requirements

* changed autodoc pydantic's version

* Bug/fix for circuits api error (#1775)

* Stringify executor block for circuit info

* minor bug & test case fix for qelecton feature

* minor fix to handle pydantic version changes

* Fix for pydantic version conflict

---------

Co-authored-by: mpvgithub <[email protected]>
Co-authored-by: Manjunath PV <[email protected]>

* add `Optional[]` for `CircuitInfo` fields w/ default `None`

* type hint fixes for QiskitExecutor

* avoid pydantic warning for `gradient_fn`  field

---------

Co-authored-by: Ara Ghukasyan <[email protected]>
Co-authored-by: Sankalp Sanand <[email protected]>
Co-authored-by: jackbaker1001 <[email protected]>
Co-authored-by: Santosh kumar <[email protected]>
Co-authored-by: Ara Ghukasyan <[email protected]>
Co-authored-by: Will Cunningham <[email protected]>
Co-authored-by: sriranjani venkatesan <[email protected]>
Co-authored-by: ArunPsiog <[email protected]>
Co-authored-by: Prasy12 <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Manjunath PV <[email protected]>
Co-authored-by: Prasanna Venkatesh <[email protected]>
Co-authored-by: mpvgithub <[email protected]>
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.

3 participants