-
Notifications
You must be signed in to change notification settings - Fork 70
Defining the new Backend API classes #764
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
Conversation
a-corni
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additionnal comments:
- I think we can now close #706
- Will it one day be relevant to be able to go from qutip objects/states to the abstract representation ? Do we create an issue for this ? I can be a nice thing to propose at unitary hack for instance...
a-corni
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am done with my comments :)
That will be hard to do in general. I think what we'll have instead is an |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made a mistake, sorry, just waiting for the final comments to be closed and I will approve.
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
* Hotfix: Preserve qubit IDs and order in Register.with_automatic_layout() (#759) * Preserve qubit IDs and order in Register.with_automatic_layout() * Bump version to v1.1.1 * Fail for registers with differentiable coordinates * Bump version to 1.2dev1 * Add pyproject.toml to all packages (#758) * Add pyproject.toml to all packages * Improve the publishing workflow * Fix typo in docstring of draw (#766) * Fix typo in docstring of draw * Fix mypy error * Reverting __repr__ for Channels to default from dataclass, old __repr__ now on __str__ (#770) * Fixes to the amplitude noise implementation (#768) * Include the beam's propagation direction in Channel * Apply amplitude fluctuations from run to run instead of pulse to pulse * Correct emulation of finite-waist effects on amplitude * Fix handling or laser_waist to/from SimConfig * UTs for the noise * Include propagation_dir in the JSON schema * Fix error in conversion between SimConfig and NoiseModel * Add the pulser version to serialized devices * Missing UT for Channel * Adopting review suggestions * Draw the phase curve by default in Sequence.draw() (#771) * Set draw_phase_curve to True by default * Fix phase curve * Always display phase in draw_phase_area * Add method to Sequence to estimate delay introduced before adding pulse (#773) * Add estimate_add_delay * Fix test coverage * Add testing of DMM * Address review comments * Fix test * Deprecate usage of int in QubitIds (#774) * Deprecate usage of int * Fix tutorials * Fix targets * Update warning message * Fix tutorials * Revert "Fix tutorials" This reverts commit a99d615. * Fix tutorial * Fix typing with qubitID=str * Fix tests * Fix typing * Fix tests * Fix built in values for register generation * Fix tests * Address review comments * Converting the Conventions page to markdown (#777) * Setting up Markdown support * Convert Conventions page to markdown * Attempt to use auto-generated labels * Update displayed device specs (#763) * Add all missing specs * Add property specs * Move _specs to BaseDevice In this way, _specs and print_specs can also be called for virtual devices. * Fix syntax for compatibility with older Python * Fix style * Add missing docstring * Fix dosctring style * Improve specs method * Update to fix mypy errors * Fix mypy error * Add tests for BaseDevice.specs property * Fix import order * Various minor improvements One change is to use a string instead of joining elements of a list to get the final string. The reason is that lists were cumbersome to use when there were conditional statements. * Split _specs method in different methods Create one _specs method for each sections (register, layout, device, channels). The layout section is defined only in Device, such that it is not displayed for VirtualDevice. This commit also goes back to using lists for storing the lines. * Remove line * Fix typo in strings * Return list[str] instead of str for specs blocks Also move texts for layout to BaseDevice, since virtual devices can have some layouts properties. --------- Co-authored-by: Henrique Silvério <29920212+HGSilveri@users.noreply.github.com> * Allow definition of a custom phase jump time + Suppress output modulation for phase (#779) * Adding Channel.custom_phase_jump_time * Restrict phase jump time for EOM mode * Eliminate modulation for phase * Unit tests * Improve docstring * Upgrade pulser-simulation to qutip 5 (#783) * Qutip 4 compatible changes * Qutip 5 breaking changes * Fix test, handling of exception in NoiseModel * Convert all Qobj to CSR * Fix typing * Fix typing * Fix lint * Delete print * Address nit * Convert initial state to CSR --------- Co-authored-by: HGSilveri <henrique.silverio@tecnico.ulisboa.pt> Co-authored-by: Henrique Silvério <29920212+HGSilveri@users.noreply.github.com> * Add shortcut to find out if an AbstractArray is differentiable (#784) * Define AbstractArray.is_differentiable * Remove warnings.simplefilter that was overriding pytest filterwarnings * Rename is_differentiable -> requires_grad * Bump version to v1.2.0 * Bump version to 1.3dev0 * Fix test broken by scipy 1.15 (#788) * Fix typing of initial state in EmulatorConfig, fix normalization with qutip 5 (#792) * Delete no-normalization output * Normalize initial state * Bump to v1.2.1 * Add tanh function to ParamObj (#798) * added tanh function to paramobj * Update tests/test_parametrized.py Co-authored-by: Henrique Silvério <29920212+HGSilveri@users.noreply.github.com> * fixed test --------- Co-authored-by: Henrique Silvério <29920212+HGSilveri@users.noreply.github.com> * Allow switch_device to work when Channel uses BaseEOM (#804) * Allow switch_device to work when Channel uses BaseEOM * Bump to v1.2.2 * Bump to v1.3dev2 * Refactor methods in RemoteConnections and PasqalCloud (#796) * Refactor methods in RemoteConnections and PasqalCloud for new connections * Move validate_job_params back to QPUBackend, make add_measurement_to_sequence private * Fixing bug --------- Co-authored-by: Henrique Silvério <29920212+HGSilveri@users.noreply.github.com> * Upgrades to AnalogDevice specs (#807) * Add show option to `RegisterLayout.draw()` (#808) * Fix drawing of interpolated waveform on DMM (#809) * Documentation Upgrade (#811) * Setting up Markdown support * Convert Conventions page to markdown * Attempt to use auto-generated labels * Introduce section about hardware * Redirect api core * Add pulse section * Direct to API core instead of pulse * Add some elements about pulser.devices * Create getting started notebook (#776) * Create initial notebook * Add temporary links * Add programming section * Fix installation of mermaid * Fix figure caption * Taking into account review comments * Fix doc * Try mermaid with mkdown * Address review comments * Fix doc * Add picture * Addressing review comments * Add figure, vector on the bloch sphere, complement to the Device * Make introduction * Add programming.md in ref * Add label * delete ref * Fix programming * Create tutorial Excitation to rydberg state * Address review comments * Add AFM state prep * Fix programming.md * Address review * Delete docs, add hbar * Fix picture * Fixing programming * Transfer cell as raw * Fix sequence * 4-hand fixing * Final fixes * Add paragraph along br * Address review comment * Fix referencing * Fix the notebook * Add note about neighbouring atoms * Creating notebook for hardware section, reorganising specs display in Device, adding the presence of EOM in Channel display * Fix typing * Fix build * fix typing * Fix flake8 * Fix reference * Fix ref * Fix figure * Re-reading myself * Fix rendering * Fix rendering * Fix build * Available devices * Address review comments * Add page on Register creation and Rydberg-Atom interactions + Retire old tutorials (#790) * Deleting tutorials * Adding the Register user manual * Adding links * Undo deleting the tutorials for the repo * Retire tutorials instead * Do the same for the tutorials deleted in #776 * Address review comments * Fix notebook reference * Clear all outputs * Adressing review comments * Address review comments * Add section in conventions on indexed operator notation * Small fixes * Improve formula rendering * Shuffle the description of the arguments * Trying new raw cells * Add remove-input tag to last cell * Fix typing * Add no-index * Delete no-members * Dlete no-index * Reintroduce :noindex: * Improve description of device * Try fixing link to * Fix device and channel description, try hidding the input * Try fixing build * Fix tags to hide_input * Change device descr to "Args", stop trying to mask input * Add link to backend * Move Attributes to Args in Device * Add mention to API doc * Apply some Pasqal branding to the HTML documentation * Use Pulser logo :) * Remove obsolete file * Add seealso sections in programming * Deleting the-channels * Tag The-Channels * referencing to html instead * Going for hardware.ipynb * Add page on Pulses and Waveforms (#793) * Add tutorial on Pulses and Waveforms * Address review comments * Reference fundamentals pages in Programming * Remove signatures from autosummary * API Reference Rework (#722) * Improving autodoc typehints generation * Improving the Register API doc * WIP: New API reference for pulser-core * Try to pass RTD build * Adding `pulser-simulation` module to the API ref * Adding pulser_pasqal ref * Import sorting * Fix UTs * Fix links in new pages * Adding the Sequence page (#802) * WIP * Getting links to work at top-level pulser API * Writing Sequence page * Address review comments * Fix typo * Merge remote-tracking branch 'origin' into docs-v2 * Modifications to the TOC tree (#806) * Reorder pages in Extended Usage * Retire tutorial on AFM state preparation * Slight modifications to the Backend page * Move and update the XY Hamiltonian page * Fix broken links * Fix typo Co-authored-by: Antoine Cornillot <61453516+a-corni@users.noreply.github.com> --------- Co-authored-by: Antoine Cornillot <61453516+a-corni@users.noreply.github.com> * Create introduction to Extended Usage (#800) * Add tanh function to ParamObj (#798) * added tanh function to paramobj * Update tests/test_parametrized.py Co-authored-by: Henrique Silvério <29920212+HGSilveri@users.noreply.github.com> * fixed test --------- Co-authored-by: Henrique Silvério <29920212+HGSilveri@users.noreply.github.com> * Create extended usage doc * Fix doc * Post-rereading correction * Allow switch_device to work when Channel uses BaseEOM (#804) * Allow switch_device to work when Channel uses BaseEOM * Bump to v1.2.2 * Bump to v1.3dev2 * Addressing the confusion btw Weighted Analog and XY * Add more specific links, descr of digital qc * Address review comments * Testing with : * Try with #- * Fix reference * Fix links to sections * Fix hamiltonian * Fix apidoc ref --------- Co-authored-by: Vytautas Abramavicius <145791635+vytautas-a@users.noreply.github.com> Co-authored-by: Henrique Silvério <29920212+HGSilveri@users.noreply.github.com> Co-authored-by: HGSilveri <henrique.silverio@tecnico.ulisboa.pt> --------- Co-authored-by: a_corni <antoine.cornillot@pasqal.com> Co-authored-by: Antoine Cornillot <61453516+a-corni@users.noreply.github.com> Co-authored-by: Benjamin Becquet <benjamin.becquet@pasqal.com> Co-authored-by: Benjamin Becquet <benjamin.becquet@gmail.com> Co-authored-by: Vytautas Abramavicius <145791635+vytautas-a@users.noreply.github.com> * Defining the new Backend API classes (#764) * Introducing the Results class * Defining State and Operator ABCs * Defining the Observable ABC * Updates to State and Operator ABCs * Introducing EmulationConfig * Define the default observables * Define the EmulatorBackend ABC * Implement more flexible evaluation time matching * Finish up changes in the config base classes * Include total sequence duration in Results * Import sorting * Fix typing issues * Applying review suggestions * Rename QubitDensity -> Occupation * Change State to require `probabilities()` instead of `sample()` * Docstring updates * Removing 'custom_operators' option * Definition of QutipState * Definition of QutipOp * Remove Results.meas_basis * Revert to having `State.sample()` as the abstractmethod * Incorporating UUIDs in observables * Add Results.get_tagged_results() * Misc adjustments * First UTs for pulser.backend classes * UTs for QutipState and QutipOperator * Unit tests for observables * Unit tests for Results * Make UT compatible with Python 3.9 * Fix docs build * Expose relevant new classes * Check interaction matrix is symmetric * Separate times and result values in Results * Check that evaluation times are unique * Finishing touches * Enforce evaluation times to be in ascending order * Explicitly enforce that results are stored with asceding evaluation times * Implementing review suggestion * Rename SecondMomentOfEnergy -> EnergySecondMoment * Add review suggestion * Add warnings * Change cutoffs * Fix docs * Improve handling of ParamObj in InterpolatedWaveform (#813) * Improve gestion of ParamObj in InterpolatedWaveform * Fix regex * Fix tests * Address review comments * Reverting __new__ signature * Fix black * Bump version to 1.3.0 * Bump version to 1.4dev0 * Add time-ordering operator in programming.md (#817) Time ordering operator missing in the integral definition of the final state * Define Code Owners for pulser-simulation (#816) * Fix drawing of legends for local qubit quantities (#825) * Add global phase shift (#829) * Add _phase_shift implementation without targets * Update docstrings * Add phase shift to test_switch_device * Add support for (de)serialization * Add warning and filter these in tests * Change to pytest.warn where possible * Address comments * Make catch_phase_shift_warning fixture * [DevEx] Replacing ValueError with more specific errors wherever possible (#828) * [DevEx] Replacing ValueError with more specific errors wherever possible - resolves #819 This should make it easier for client libraries to catch error we raise and do something useful with them. * Applying feedback * fix tutorial effectve noise channel with qutip 5 (#830) * fix tutorial effectve noise channel with qutip 5 * Fix linting --------- Co-authored-by: Aurelien Nober <aurelien.nober@pasqal.com> Co-authored-by: a_corni <antoine.cornillot@pasqal.com> * Support State and Operator serialization (#832) * Support State serialization * Add serialization support in Operator * Move repr info out of __init__ * Check imag explicitly * Apply review suggestion * Wrap around _from_state_amplitudes * Wrap around _from_operator_repr * Use overlap to safeguard against in-place modifications of State * Fix sampling weights sum assertion (#823) Because of large weights vector, sometimes the sum (which should be 1 for np.random.multinomial) doesn't pass the assert. Use custom code for sampling instead, with equivalent performance. Co-authored-by: Anton Quelle <anton.quelle@pasqal.com> * Store result from tag and uuid (#836) * store raw * fix tests * Remove pulser-pasqal from repo (#834) * Remove pulser-pasqal from repo * Completing UTs * Allow additional parameters in EmulationConfig (#838) * Support EmulationConfig serialization (#826) * to absract repr on observables * add state operator from string classes * fix flake and black * fix mypy * eigenstates in StateFromString * comments fix * first basic test * refining tests for obs and config serialization * StateRepr class * add comment to config * fix mypy * fix test and mypy * simplify obs repr * remove operator serialization * add schema and optional validation * update config-schema * update config-schema * add OperatorRepe * add not_from_amplitude test * fix schema 1/2 * update config-schema to support complex * new check in validate eigenstates * state repr docstring * add example docstring for StateRepr and OperatorRepr * test suggestion * fix test * update StateRepr and OperatorRepr dump load tests * better test scoping * fix required in schema * config repr test * parametrize config test * additionalproperties false * stateresult not supported * better error AbstractReprError * Numpy v2 support (#837) * Edit requirements to allow for numpy v2 * Add ruff to check for numpy v2 rule * Add copy kwarg to abstract array * Fix test binary ops * Add copy logic on __array__ * Make __array__ a bit nicer * Fix mypy errors * Add ruff to CI * Remove ruff version pinning * Add ruff to dev_requirements * Fix ruff command in CI * Add test for array copy * Add skipif for failing tests in np2 * Update CI to test v1 and v2 of numpy * Add no-cover on numpy v2 code * Try to fix ci * Fix after review * Add numpy matrix to PR actions * Fix gh workflow syntax * Only vary numpy version on 'with-torch' * Fix syntax * try different order * Another attempt to fix ci config * Use exclude instead of include * Check if tests run on all platforms * Check if macos-latest runs on python3.9 again * Reduce testing matrix regarding numpy versions * Revert "Check if tests run on all platforms" This reverts commit b5de95c. * Add (de)serializer to Results (#833) * json encoder and test * formatting * 100% coverage again * code review * added validation * docstring formatting and manifest * more code review comments * line break * move test * Support Python 3.13 (#840) * Support Python 3.13 * Upgrade minimal torch version * Go back to testing always on macos-latest * [TEMP] Run full CI tests * Accomodate numpy version * Revert "[TEMP] Run full CI tests" This reverts commit 5c81cb5. * Remove Windows marker * Enforce numpy 2 on 'numpy-v2' CI tag * [DevEx] Rework (de)serialization exceptions (#835) * [DevEx] Rework (de)serialization exceptions * Applying feedback * [FIX] Fix definition of InterpolatedWaveform with values as Variable (#841) * Fix init of InterpolatedWaveform with Variable values * Fix black * take into account ParamObj * Add EmulationConfig deserializer (#839) * Add EmulationConfig deserializer * update state repr test * _convert_complex respect tuples * test deserializer StateRepr and OperatorRepr * coverage for weird error * update config deserialization test * exeption deprecation * format * test config not from str * test config repr * additional kwargs --------- Co-authored-by: stefano.grava <stefano.grava@pasqal.com> * Release v1.4.0 * Bump to v1.5dev0 * Add QutipBackendV2: using Qutip with new API (#847) Co-authored-by: HGSilveri <henrique.silverio@tecnico.ulisboa.pt> * Replace wheel with build for packaging (#853) * Replace wheel with build for packaging * Fix dist path * Update release instructions (#855) * Update release instructions * Update link to portal * Update instructions * Optimize the size of the doc homepage animation (#860) * Factorize eigenstates and FullOp validation (#859) Don't want to have to do that in e.g. emu-mps * Add constraints on the minimum layout filling fraction (#856) * Add constraints on the minimum layout filling fraction * Fix test * Updating JSON schema * Implement suggestion * Fix typo * Improve docstring --------- Co-authored-by: Pim Venderbosch <pim.venderbosch@pasqal.com> * Allow general callback in EmulationConfig (#862) * FIX: Clarify “No DMM” error message (#864) * fix: clarify “No DMM” error message * fix: adjust test_dmm_declaration in test_sequence to expect full “No DMM called…” error message * Use sequence.device instead of _device, fix black * Fix linting --------- Co-authored-by: igoreduardobraga <igoredubraga@gmail.com> * Update tutorial on QUBO, Pulse Optimization, Create tuto on MWIS (#821) * Update tutorial on QUBO, Create tuto on MWIS * Add mwis tuto to index * Fix reference in QUBO tutorial * Delete Ref in QUBO tuto * Take into account review comments * Delete QAOA, improve QAA for QUBO, MWIS, fix and simplify Optim * Fix links, replace attachments by files * Fix link * Fixing link * Adding links to other notebooks in MWIS and QAA * Adding QAA notebook to doc, QAOA to retired notebooks * Fix cell output * Link to Documentation instead of github * Delete cell content, take into review comments --------- Co-authored-by: Henrique Silvério <29920212+HGSilveri@users.noreply.github.com> Co-authored-by: HGSilveri <henrique.silverio@tecnico.ulisboa.pt> Co-authored-by: Harold Erbin <harold.erbin@gmail.com> Co-authored-by: RafaelMALima <81188798+RafaelMALima@users.noreply.github.com> Co-authored-by: Antoine Cornillot <61453516+a-corni@users.noreply.github.com> Co-authored-by: a_corni <antoine.cornillot@pasqal.com> Co-authored-by: Vytautas Abramavicius <145791635+vytautas-a@users.noreply.github.com> Co-authored-by: Benjamin Becquet <benjamin.becquet@pasqal.com> Co-authored-by: Benjamin Becquet <benjamin.becquet@gmail.com> Co-authored-by: Louis-PaulHenry <79902647+Louis-PaulHenry@users.noreply.github.com> Co-authored-by: Pim Venderbosch <pim.venderbosch@pasqal.com> Co-authored-by: David Teller <D.O.Teller@gmail.com> Co-authored-by: AurelienNober <aurelien.nober@dataiku.com> Co-authored-by: Aurelien Nober <aurelien.nober@pasqal.com> Co-authored-by: Pablo Le Hénaff <pablo.le-henaff@pasqal.com> Co-authored-by: Anton Quelle <anton.quelle@pasqal.com> Co-authored-by: Stefano Grava <stefano0grava@gmail.com> Co-authored-by: David Teller <david.teller@pasqal.com> Co-authored-by: stefano.grava <stefano.grava@pasqal.com> Co-authored-by: igoreduardobraga <igoredubraga@gmail.com>
* merged upstream * added option do draw empty sites\nformatting * typing hints * Draw layout and register on the same plot (#772) * Hotfix: Preserve qubit IDs and order in Register.with_automatic_layout() (#759) * Preserve qubit IDs and order in Register.with_automatic_layout() * Bump version to v1.1.1 * Fail for registers with differentiable coordinates * Bump version to 1.2dev1 * Add pyproject.toml to all packages (#758) * Add pyproject.toml to all packages * Improve the publishing workflow * Fix typo in docstring of draw (#766) * Fix typo in docstring of draw * Fix mypy error * Reverting __repr__ for Channels to default from dataclass, old __repr__ now on __str__ (#770) * Fixes to the amplitude noise implementation (#768) * Include the beam's propagation direction in Channel * Apply amplitude fluctuations from run to run instead of pulse to pulse * Correct emulation of finite-waist effects on amplitude * Fix handling or laser_waist to/from SimConfig * UTs for the noise * Include propagation_dir in the JSON schema * Fix error in conversion between SimConfig and NoiseModel * Add the pulser version to serialized devices * Missing UT for Channel * Adopting review suggestions * Draw the phase curve by default in Sequence.draw() (#771) * Set draw_phase_curve to True by default * Fix phase curve * Always display phase in draw_phase_area * Add method to Sequence to estimate delay introduced before adding pulse (#773) * Add estimate_add_delay * Fix test coverage * Add testing of DMM * Address review comments * Fix test * Deprecate usage of int in QubitIds (#774) * Deprecate usage of int * Fix tutorials * Fix targets * Update warning message * Fix tutorials * Revert "Fix tutorials" This reverts commit a99d615. * Fix tutorial * Fix typing with qubitID=str * Fix tests * Fix typing * Fix tests * Fix built in values for register generation * Fix tests * Address review comments * Converting the Conventions page to markdown (#777) * Setting up Markdown support * Convert Conventions page to markdown * Attempt to use auto-generated labels * Update displayed device specs (#763) * Add all missing specs * Add property specs * Move _specs to BaseDevice In this way, _specs and print_specs can also be called for virtual devices. * Fix syntax for compatibility with older Python * Fix style * Add missing docstring * Fix dosctring style * Improve specs method * Update to fix mypy errors * Fix mypy error * Add tests for BaseDevice.specs property * Fix import order * Various minor improvements One change is to use a string instead of joining elements of a list to get the final string. The reason is that lists were cumbersome to use when there were conditional statements. * Split _specs method in different methods Create one _specs method for each sections (register, layout, device, channels). The layout section is defined only in Device, such that it is not displayed for VirtualDevice. This commit also goes back to using lists for storing the lines. * Remove line * Fix typo in strings * Return list[str] instead of str for specs blocks Also move texts for layout to BaseDevice, since virtual devices can have some layouts properties. --------- Co-authored-by: Henrique Silvério <29920212+HGSilveri@users.noreply.github.com> * Allow definition of a custom phase jump time + Suppress output modulation for phase (#779) * Adding Channel.custom_phase_jump_time * Restrict phase jump time for EOM mode * Eliminate modulation for phase * Unit tests * Improve docstring * Upgrade pulser-simulation to qutip 5 (#783) * Qutip 4 compatible changes * Qutip 5 breaking changes * Fix test, handling of exception in NoiseModel * Convert all Qobj to CSR * Fix typing * Fix typing * Fix lint * Delete print * Address nit * Convert initial state to CSR --------- Co-authored-by: HGSilveri <henrique.silverio@tecnico.ulisboa.pt> Co-authored-by: Henrique Silvério <29920212+HGSilveri@users.noreply.github.com> * Add shortcut to find out if an AbstractArray is differentiable (#784) * Define AbstractArray.is_differentiable * Remove warnings.simplefilter that was overriding pytest filterwarnings * Rename is_differentiable -> requires_grad * Bump version to v1.2.0 * Bump version to 1.3dev0 * Fix test broken by scipy 1.15 (#788) * Fix typing of initial state in EmulatorConfig, fix normalization with qutip 5 (#792) * Delete no-normalization output * Normalize initial state * Bump to v1.2.1 * Add tanh function to ParamObj (#798) * added tanh function to paramobj * Update tests/test_parametrized.py Co-authored-by: Henrique Silvério <29920212+HGSilveri@users.noreply.github.com> * fixed test --------- Co-authored-by: Henrique Silvério <29920212+HGSilveri@users.noreply.github.com> * Allow switch_device to work when Channel uses BaseEOM (#804) * Allow switch_device to work when Channel uses BaseEOM * Bump to v1.2.2 * Bump to v1.3dev2 * Refactor methods in RemoteConnections and PasqalCloud (#796) * Refactor methods in RemoteConnections and PasqalCloud for new connections * Move validate_job_params back to QPUBackend, make add_measurement_to_sequence private * Fixing bug --------- Co-authored-by: Henrique Silvério <29920212+HGSilveri@users.noreply.github.com> * Upgrades to AnalogDevice specs (#807) * Add show option to `RegisterLayout.draw()` (#808) * Fix drawing of interpolated waveform on DMM (#809) * Documentation Upgrade (#811) * Setting up Markdown support * Convert Conventions page to markdown * Attempt to use auto-generated labels * Introduce section about hardware * Redirect api core * Add pulse section * Direct to API core instead of pulse * Add some elements about pulser.devices * Create getting started notebook (#776) * Create initial notebook * Add temporary links * Add programming section * Fix installation of mermaid * Fix figure caption * Taking into account review comments * Fix doc * Try mermaid with mkdown * Address review comments * Fix doc * Add picture * Addressing review comments * Add figure, vector on the bloch sphere, complement to the Device * Make introduction * Add programming.md in ref * Add label * delete ref * Fix programming * Create tutorial Excitation to rydberg state * Address review comments * Add AFM state prep * Fix programming.md * Address review * Delete docs, add hbar * Fix picture * Fixing programming * Transfer cell as raw * Fix sequence * 4-hand fixing * Final fixes * Add paragraph along br * Address review comment * Fix referencing * Fix the notebook * Add note about neighbouring atoms * Creating notebook for hardware section, reorganising specs display in Device, adding the presence of EOM in Channel display * Fix typing * Fix build * fix typing * Fix flake8 * Fix reference * Fix ref * Fix figure * Re-reading myself * Fix rendering * Fix rendering * Fix build * Available devices * Address review comments * Add page on Register creation and Rydberg-Atom interactions + Retire old tutorials (#790) * Deleting tutorials * Adding the Register user manual * Adding links * Undo deleting the tutorials for the repo * Retire tutorials instead * Do the same for the tutorials deleted in #776 * Address review comments * Fix notebook reference * Clear all outputs * Adressing review comments * Address review comments * Add section in conventions on indexed operator notation * Small fixes * Improve formula rendering * Shuffle the description of the arguments * Trying new raw cells * Add remove-input tag to last cell * Fix typing * Add no-index * Delete no-members * Dlete no-index * Reintroduce :noindex: * Improve description of device * Try fixing link to * Fix device and channel description, try hidding the input * Try fixing build * Fix tags to hide_input * Change device descr to "Args", stop trying to mask input * Add link to backend * Move Attributes to Args in Device * Add mention to API doc * Apply some Pasqal branding to the HTML documentation * Use Pulser logo :) * Remove obsolete file * Add seealso sections in programming * Deleting the-channels * Tag The-Channels * referencing to html instead * Going for hardware.ipynb * Add page on Pulses and Waveforms (#793) * Add tutorial on Pulses and Waveforms * Address review comments * Reference fundamentals pages in Programming * Remove signatures from autosummary * API Reference Rework (#722) * Improving autodoc typehints generation * Improving the Register API doc * WIP: New API reference for pulser-core * Try to pass RTD build * Adding `pulser-simulation` module to the API ref * Adding pulser_pasqal ref * Import sorting * Fix UTs * Fix links in new pages * Adding the Sequence page (#802) * WIP * Getting links to work at top-level pulser API * Writing Sequence page * Address review comments * Fix typo * Merge remote-tracking branch 'origin' into docs-v2 * Modifications to the TOC tree (#806) * Reorder pages in Extended Usage * Retire tutorial on AFM state preparation * Slight modifications to the Backend page * Move and update the XY Hamiltonian page * Fix broken links * Fix typo Co-authored-by: Antoine Cornillot <61453516+a-corni@users.noreply.github.com> --------- Co-authored-by: Antoine Cornillot <61453516+a-corni@users.noreply.github.com> * Create introduction to Extended Usage (#800) * Add tanh function to ParamObj (#798) * added tanh function to paramobj * Update tests/test_parametrized.py Co-authored-by: Henrique Silvério <29920212+HGSilveri@users.noreply.github.com> * fixed test --------- Co-authored-by: Henrique Silvério <29920212+HGSilveri@users.noreply.github.com> * Create extended usage doc * Fix doc * Post-rereading correction * Allow switch_device to work when Channel uses BaseEOM (#804) * Allow switch_device to work when Channel uses BaseEOM * Bump to v1.2.2 * Bump to v1.3dev2 * Addressing the confusion btw Weighted Analog and XY * Add more specific links, descr of digital qc * Address review comments * Testing with : * Try with #- * Fix reference * Fix links to sections * Fix hamiltonian * Fix apidoc ref --------- Co-authored-by: Vytautas Abramavicius <145791635+vytautas-a@users.noreply.github.com> Co-authored-by: Henrique Silvério <29920212+HGSilveri@users.noreply.github.com> Co-authored-by: HGSilveri <henrique.silverio@tecnico.ulisboa.pt> --------- Co-authored-by: a_corni <antoine.cornillot@pasqal.com> Co-authored-by: Antoine Cornillot <61453516+a-corni@users.noreply.github.com> Co-authored-by: Benjamin Becquet <benjamin.becquet@pasqal.com> Co-authored-by: Benjamin Becquet <benjamin.becquet@gmail.com> Co-authored-by: Vytautas Abramavicius <145791635+vytautas-a@users.noreply.github.com> * Defining the new Backend API classes (#764) * Introducing the Results class * Defining State and Operator ABCs * Defining the Observable ABC * Updates to State and Operator ABCs * Introducing EmulationConfig * Define the default observables * Define the EmulatorBackend ABC * Implement more flexible evaluation time matching * Finish up changes in the config base classes * Include total sequence duration in Results * Import sorting * Fix typing issues * Applying review suggestions * Rename QubitDensity -> Occupation * Change State to require `probabilities()` instead of `sample()` * Docstring updates * Removing 'custom_operators' option * Definition of QutipState * Definition of QutipOp * Remove Results.meas_basis * Revert to having `State.sample()` as the abstractmethod * Incorporating UUIDs in observables * Add Results.get_tagged_results() * Misc adjustments * First UTs for pulser.backend classes * UTs for QutipState and QutipOperator * Unit tests for observables * Unit tests for Results * Make UT compatible with Python 3.9 * Fix docs build * Expose relevant new classes * Check interaction matrix is symmetric * Separate times and result values in Results * Check that evaluation times are unique * Finishing touches * Enforce evaluation times to be in ascending order * Explicitly enforce that results are stored with asceding evaluation times * Implementing review suggestion * Rename SecondMomentOfEnergy -> EnergySecondMoment * Add review suggestion * Add warnings * Change cutoffs * Fix docs * Improve handling of ParamObj in InterpolatedWaveform (#813) * Improve gestion of ParamObj in InterpolatedWaveform * Fix regex * Fix tests * Address review comments * Reverting __new__ signature * Fix black * Bump version to 1.3.0 * Bump version to 1.4dev0 * Add time-ordering operator in programming.md (#817) Time ordering operator missing in the integral definition of the final state * Define Code Owners for pulser-simulation (#816) * Fix drawing of legends for local qubit quantities (#825) * Add global phase shift (#829) * Add _phase_shift implementation without targets * Update docstrings * Add phase shift to test_switch_device * Add support for (de)serialization * Add warning and filter these in tests * Change to pytest.warn where possible * Address comments * Make catch_phase_shift_warning fixture * [DevEx] Replacing ValueError with more specific errors wherever possible (#828) * [DevEx] Replacing ValueError with more specific errors wherever possible - resolves #819 This should make it easier for client libraries to catch error we raise and do something useful with them. * Applying feedback * fix tutorial effectve noise channel with qutip 5 (#830) * fix tutorial effectve noise channel with qutip 5 * Fix linting --------- Co-authored-by: Aurelien Nober <aurelien.nober@pasqal.com> Co-authored-by: a_corni <antoine.cornillot@pasqal.com> * Support State and Operator serialization (#832) * Support State serialization * Add serialization support in Operator * Move repr info out of __init__ * Check imag explicitly * Apply review suggestion * Wrap around _from_state_amplitudes * Wrap around _from_operator_repr * Use overlap to safeguard against in-place modifications of State * Fix sampling weights sum assertion (#823) Because of large weights vector, sometimes the sum (which should be 1 for np.random.multinomial) doesn't pass the assert. Use custom code for sampling instead, with equivalent performance. Co-authored-by: Anton Quelle <anton.quelle@pasqal.com> * Store result from tag and uuid (#836) * store raw * fix tests * Remove pulser-pasqal from repo (#834) * Remove pulser-pasqal from repo * Completing UTs * Allow additional parameters in EmulationConfig (#838) * Support EmulationConfig serialization (#826) * to absract repr on observables * add state operator from string classes * fix flake and black * fix mypy * eigenstates in StateFromString * comments fix * first basic test * refining tests for obs and config serialization * StateRepr class * add comment to config * fix mypy * fix test and mypy * simplify obs repr * remove operator serialization * add schema and optional validation * update config-schema * update config-schema * add OperatorRepe * add not_from_amplitude test * fix schema 1/2 * update config-schema to support complex * new check in validate eigenstates * state repr docstring * add example docstring for StateRepr and OperatorRepr * test suggestion * fix test * update StateRepr and OperatorRepr dump load tests * better test scoping * fix required in schema * config repr test * parametrize config test * additionalproperties false * stateresult not supported * better error AbstractReprError * Numpy v2 support (#837) * Edit requirements to allow for numpy v2 * Add ruff to check for numpy v2 rule * Add copy kwarg to abstract array * Fix test binary ops * Add copy logic on __array__ * Make __array__ a bit nicer * Fix mypy errors * Add ruff to CI * Remove ruff version pinning * Add ruff to dev_requirements * Fix ruff command in CI * Add test for array copy * Add skipif for failing tests in np2 * Update CI to test v1 and v2 of numpy * Add no-cover on numpy v2 code * Try to fix ci * Fix after review * Add numpy matrix to PR actions * Fix gh workflow syntax * Only vary numpy version on 'with-torch' * Fix syntax * try different order * Another attempt to fix ci config * Use exclude instead of include * Check if tests run on all platforms * Check if macos-latest runs on python3.9 again * Reduce testing matrix regarding numpy versions * Revert "Check if tests run on all platforms" This reverts commit b5de95c. * Add (de)serializer to Results (#833) * json encoder and test * formatting * 100% coverage again * code review * added validation * docstring formatting and manifest * more code review comments * line break * move test * Support Python 3.13 (#840) * Support Python 3.13 * Upgrade minimal torch version * Go back to testing always on macos-latest * [TEMP] Run full CI tests * Accomodate numpy version * Revert "[TEMP] Run full CI tests" This reverts commit 5c81cb5. * Remove Windows marker * Enforce numpy 2 on 'numpy-v2' CI tag * [DevEx] Rework (de)serialization exceptions (#835) * [DevEx] Rework (de)serialization exceptions * Applying feedback * [FIX] Fix definition of InterpolatedWaveform with values as Variable (#841) * Fix init of InterpolatedWaveform with Variable values * Fix black * take into account ParamObj * Add EmulationConfig deserializer (#839) * Add EmulationConfig deserializer * update state repr test * _convert_complex respect tuples * test deserializer StateRepr and OperatorRepr * coverage for weird error * update config deserialization test * exeption deprecation * format * test config not from str * test config repr * additional kwargs --------- Co-authored-by: stefano.grava <stefano.grava@pasqal.com> * Release v1.4.0 * Bump to v1.5dev0 * Add QutipBackendV2: using Qutip with new API (#847) Co-authored-by: HGSilveri <henrique.silverio@tecnico.ulisboa.pt> * Replace wheel with build for packaging (#853) * Replace wheel with build for packaging * Fix dist path * Update release instructions (#855) * Update release instructions * Update link to portal * Update instructions * Optimize the size of the doc homepage animation (#860) * Factorize eigenstates and FullOp validation (#859) Don't want to have to do that in e.g. emu-mps * Add constraints on the minimum layout filling fraction (#856) * Add constraints on the minimum layout filling fraction * Fix test * Updating JSON schema * Implement suggestion * Fix typo * Improve docstring --------- Co-authored-by: Pim Venderbosch <pim.venderbosch@pasqal.com> * Allow general callback in EmulationConfig (#862) * FIX: Clarify “No DMM” error message (#864) * fix: clarify “No DMM” error message * fix: adjust test_dmm_declaration in test_sequence to expect full “No DMM called…” error message * Use sequence.device instead of _device, fix black * Fix linting --------- Co-authored-by: igoreduardobraga <igoredubraga@gmail.com> * Update tutorial on QUBO, Pulse Optimization, Create tuto on MWIS (#821) * Update tutorial on QUBO, Create tuto on MWIS * Add mwis tuto to index * Fix reference in QUBO tutorial * Delete Ref in QUBO tuto * Take into account review comments * Delete QAOA, improve QAA for QUBO, MWIS, fix and simplify Optim * Fix links, replace attachments by files * Fix link * Fixing link * Adding links to other notebooks in MWIS and QAA * Adding QAA notebook to doc, QAOA to retired notebooks * Fix cell output * Link to Documentation instead of github * Delete cell content, take into review comments --------- Co-authored-by: Henrique Silvério <29920212+HGSilveri@users.noreply.github.com> Co-authored-by: HGSilveri <henrique.silverio@tecnico.ulisboa.pt> Co-authored-by: Harold Erbin <harold.erbin@gmail.com> Co-authored-by: RafaelMALima <81188798+RafaelMALima@users.noreply.github.com> Co-authored-by: Antoine Cornillot <61453516+a-corni@users.noreply.github.com> Co-authored-by: a_corni <antoine.cornillot@pasqal.com> Co-authored-by: Vytautas Abramavicius <145791635+vytautas-a@users.noreply.github.com> Co-authored-by: Benjamin Becquet <benjamin.becquet@pasqal.com> Co-authored-by: Benjamin Becquet <benjamin.becquet@gmail.com> Co-authored-by: Louis-PaulHenry <79902647+Louis-PaulHenry@users.noreply.github.com> Co-authored-by: Pim Venderbosch <pim.venderbosch@pasqal.com> Co-authored-by: David Teller <D.O.Teller@gmail.com> Co-authored-by: AurelienNober <aurelien.nober@dataiku.com> Co-authored-by: Aurelien Nober <aurelien.nober@pasqal.com> Co-authored-by: Pablo Le Hénaff <pablo.le-henaff@pasqal.com> Co-authored-by: Anton Quelle <anton.quelle@pasqal.com> Co-authored-by: Stefano Grava <stefano0grava@gmail.com> Co-authored-by: David Teller <david.teller@pasqal.com> Co-authored-by: stefano.grava <stefano.grava@pasqal.com> Co-authored-by: igoreduardobraga <igoredubraga@gmail.com> * Delete empty color, draw traps as black circles filled with white, atoms with their color * Fix typing * Revert change to _seq_drawer --------- Co-authored-by: Briac Flesselles <briac.flesselles@gmail.com> Co-authored-by: BrFle <yakforcom@gmail.com> Co-authored-by: Henrique Silvério <29920212+HGSilveri@users.noreply.github.com> Co-authored-by: HGSilveri <henrique.silverio@tecnico.ulisboa.pt> Co-authored-by: Harold Erbin <harold.erbin@gmail.com> Co-authored-by: RafaelMALima <81188798+RafaelMALima@users.noreply.github.com> Co-authored-by: Vytautas Abramavicius <145791635+vytautas-a@users.noreply.github.com> Co-authored-by: Benjamin Becquet <benjamin.becquet@pasqal.com> Co-authored-by: Benjamin Becquet <benjamin.becquet@gmail.com> Co-authored-by: Louis-PaulHenry <79902647+Louis-PaulHenry@users.noreply.github.com> Co-authored-by: Pim Venderbosch <pim.venderbosch@pasqal.com> Co-authored-by: David Teller <D.O.Teller@gmail.com> Co-authored-by: AurelienNober <aurelien.nober@dataiku.com> Co-authored-by: Aurelien Nober <aurelien.nober@pasqal.com> Co-authored-by: Pablo Le Hénaff <pablo.le-henaff@pasqal.com> Co-authored-by: Anton Quelle <anton.quelle@pasqal.com> Co-authored-by: Stefano Grava <stefano0grava@gmail.com> Co-authored-by: David Teller <david.teller@pasqal.com> Co-authored-by: stefano.grava <stefano.grava@pasqal.com> Co-authored-by: igoreduardobraga <igoredubraga@gmail.com>
Resultsclass and makeResulta subclass of it in backwards compatible wayStateandOperatorABCsBackendConfigand definesEmulatorConfigEmulatorBackendABCCallbackandObservableABCsTo do:
QutipStateto have an exampleQutipOperator