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

[QILI-48] Implement platform, backend and settings classes #4

Merged
merged 94 commits into from
Apr 5, 2022

Conversation

amitjansc
Copy link
Contributor

@amitjansc amitjansc commented Mar 28, 2022

Added the following classes:

  • QililabBackend
  • PlatformBuilder and Platform
  • AbstractSettings, PlatformSettings and QubitCalibrationSettings
  • SettingsManager and SettingsHashTable

Added the following class declarations for testing purposes:

  • HardwareCircuit
  • AbstractHardwareGate, I, X, Y, Z

The idea that I followed for the settings files is the following:

  • Each different lab will have its own folder, in this case there is only the qili/ folder (inside settings/). Right now this value is hardcoded in the main __init__.py file, but I believe this variable should depend on the connected user.
  • This folder will have a subfolder for each different platform, which will contain all the necessary settings files.

A working example: in this test, the platform.yml inside platform_0/ file is selected by loading the platform_0 platform here:

qibo.set_backend(backend="qililab", platform="platform_0")

amitjansc and others added 30 commits March 23, 2022 14:52
Add qibo and pyyaml requirements
SettingsLoader to SettingsManager
Copy link
Contributor

@iamtxena iamtxena left a comment

Choose a reason for hiding this comment

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

Nice first prototype.

Added few comments.

examples/example.py Show resolved Hide resolved
src/qililab/__init__.py Show resolved Hide resolved
src/qililab/__init__.py Show resolved Hide resolved
src/qililab/backend.py Outdated Show resolved Hide resolved
src/qililab/backend.py Outdated Show resolved Hide resolved
src/qililab/settings/settings_manager.py Outdated Show resolved Hide resolved
src/qililab/settings/settings_manager.py Outdated Show resolved Hide resolved
tests/test_backend.py Outdated Show resolved Hide resolved
tests/test_backend.py Outdated Show resolved Hide resolved
tests/test_settings_manager.py Outdated Show resolved Hide resolved
Copy link
Contributor

@iamtxena iamtxena left a comment

Choose a reason for hiding this comment

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

Just a typo on a docstring, and ready to merge it! 🚀

Added additional comments, just to point out things that I like it.

src/qililab/platforms/platform.py Outdated Show resolved Hide resolved
src/qililab/settings/platform_settings.py Show resolved Hide resolved
src/qililab/settings/settings_manager.py Show resolved Hide resolved
@amitjansc amitjansc merged commit fc93b43 into main Apr 5, 2022
amitjansc added a commit that referenced this pull request Apr 6, 2022
* chore: 📝 Update requirements

Add qibo and pyyaml requirements

* chore: 🔊 Add raise_error function in config.py file

* feat: ✨ Add AbstractPlatform class.

* style: 🎨 Remove long line

* feat: ✨ Add HardwareCircuit class

* feat: ✨ Add QililabBackend class

* feat: ✨ Add gates.py file

* refactor: ♻️ Remove useless raise_error

* docs: 📝 Update docs of backend and platform classes

Add description of attributes

* feat: ✨ Add I, X, Y, Z gates.

* test: 🧪 Add backend tests

* refactor: ♻️ Remove dummy files and examples

* feat: ✨ Add QiliPlatform class.

* feat: ✨ Add Settings class.

* feat: ✨ Add SettingsLoader class.

* chore: 🔧 Add types-PyYAML to dev-requirements.txt

* ci: configure codecov

* refactor: ♻️ Create one python file for each gate

* fix: 🐛 Remove dummy import

* refactor: ♻️ Change file name

* test: 🧪 Add settings_manager tests. Fix backend tests.

* refactor: ♻️ Change class name

SettingsLoader to SettingsManager

* feat: ✨ Add platform and instrument setting files

* refactor: ♻️ Change gates file names

* build: 🔧 Add typeguard to requirements

* refactor: ♻️ Delete useless methods.

* refactor: ♻️ Change gate name in __init__.

* refactor: ♻️ Remove useless methods

* refactor: ♻️ Remove raise_error

* feat: ✨ Change SettingsManager to singleton

* feat: ✨ Add PlatformSettings class

* feat: ✨ Add AbstractSettings and SettingsLoader classes

* feat: ✨ Add QubitCalibrationSettings class

* refactor: ♻️ Remove Settings class

* refactor: ♻️ Move instrument settings file to single yaml file

* test: 🧪 Update backend and settings_manager tests.

* fix: 🐛 Add init file

* style: 🎨 Remove unused import

* refactor: ♻️ Change classes to dataclass

* style: 🎨 Remove unused import

* ci: 👷 Install requirements.txt before code quality check

* ci: 👷 Add MANIFEST.in file to install yaml files

* ci: 👷 Modify MANIFEST.in file

* fix: 🐛 Call __post_init__() of AbstractPlatform

* refactor: ♻️ Remove SettingsLoader class

* docs: 📝 Remove unused argument docs

* fix: 🐛 Add ClassVar to class variables inside a dataclass

* style: 🎨 Disable sort when dumping yaml file

* feat: ✨ Add buses in PlatformSettings

* style: 🎨 Declare platform attribute instead of setting it to None

* refactor: ♻️ Change settings files structure

* refactor: ♻️ Change platform class name

* refactor: ♻️ Remove raise error

* feat: ✨ Add PlatformBuilder. Add relative imports to __init__.py files.

* refactor: ♻️ Move settings loading to PlatformBuilder

* style: 🎨 Log message when instantiating SettingsManager class

* feat: ✨ Make PlatformBuilder a singleton

* docs: 📝 Add docs

* style: 🎨 Delete unused imports.

* style: 🎨 Delete unused imports.

* style: 🎨 Use match case statement.

* refactor: ♻️ Add SettingsHashTable

* Remove imports from __init__ to avoid circular imports

* refactor: ♻️ Remove typing of current class

* refactor: ♻️ Move all instrument files inside instrument/ folder

* feat: ✨ Add Singleton metaclass

* ci: 👷 Check with pylint only staged files

* refactor: ♻️ Use platform-specific settings

Move all the settings of a specific platform inside the same folder

* style: 🎨 Solve pylint issues.

* refactor: ♻️ Move settings category inside yaml file

* refactor: ♻️ Add category attribute to AbstractSettings

* refactor: ♻️ Remove 'abstract' from any file or class.

Solves comment #4

* refactor: ♻️ Change name PB to PLATFORM_BUILDER

* refactor: ♻️ Remove dataclass from HardwareCircuit

* refactor: ♻️ Change name SM to SETTINGS_MANAGER

* refactor: ♻️ Rename 'platform' to 'platform_name'

* refactor: ♻️ Add constants.py file

* refactor: ♻️ Add DEFAULT_SETTINGS_FOLDERNAME to constants.py file

* refactor: ♻️ Use full name for variables

* docs: 📝 Delete TODO

* style: 🎨 Change settings type

* style: 🎨 Remove typing lsit

* refactor: ♻️ Check that dict has key before deleting it

* test: 🧪 Split tests

* fix: 🐛 Change backend attributes after parent init.

* chore: 📝 Add load_platform example

* refactor: ♻️ Remove dependency from qibo

* style: 🎨 Add entry points

* chore: 📝 Add load_platform example using PLATFORM_BUILDER

* docs: 📝 Fix typo in docs

Co-authored-by: Albert Solana <iamtxena@gmail.com>
amitjansc added a commit that referenced this pull request Apr 19, 2022
* chore: 📝 Update requirements

Add qibo and pyyaml requirements

* chore: 🔊 Add raise_error function in config.py file

* feat: ✨ Add AbstractPlatform class.

* style: 🎨 Remove long line

* feat: ✨ Add HardwareCircuit class

* feat: ✨ Add QililabBackend class

* feat: ✨ Add gates.py file

* refactor: ♻️ Remove useless raise_error

* docs: 📝 Update docs of backend and platform classes

Add description of attributes

* feat: ✨ Add I, X, Y, Z gates.

* test: 🧪 Add backend tests

* refactor: ♻️ Remove dummy files and examples

* feat: ✨ Add QiliPlatform class.

* feat: ✨ Add Settings class.

* feat: ✨ Add SettingsLoader class.

* chore: 🔧 Add types-PyYAML to dev-requirements.txt

* ci: configure codecov

* refactor: ♻️ Create one python file for each gate

* fix: 🐛 Remove dummy import

* refactor: ♻️ Change file name

* test: 🧪 Add settings_manager tests. Fix backend tests.

* refactor: ♻️ Change class name

SettingsLoader to SettingsManager

* feat: ✨ Add platform and instrument setting files

* refactor: ♻️ Change gates file names

* build: 🔧 Add typeguard to requirements

* refactor: ♻️ Delete useless methods.

* refactor: ♻️ Change gate name in __init__.

* refactor: ♻️ Remove useless methods

* refactor: ♻️ Remove raise_error

* feat: ✨ Change SettingsManager to singleton

* feat: ✨ Add PlatformSettings class

* feat: ✨ Add AbstractSettings and SettingsLoader classes

* feat: ✨ Add QubitCalibrationSettings class

* refactor: ♻️ Remove Settings class

* refactor: ♻️ Move instrument settings file to single yaml file

* test: 🧪 Update backend and settings_manager tests.

* fix: 🐛 Add init file

* style: 🎨 Remove unused import

* refactor: ♻️ Change classes to dataclass

* style: 🎨 Remove unused import

* ci: 👷 Install requirements.txt before code quality check

* ci: 👷 Add MANIFEST.in file to install yaml files

* ci: 👷 Modify MANIFEST.in file

* fix: 🐛 Call __post_init__() of AbstractPlatform

* refactor: ♻️ Remove SettingsLoader class

* docs: 📝 Remove unused argument docs

* fix: 🐛 Add ClassVar to class variables inside a dataclass

* style: 🎨 Disable sort when dumping yaml file

* feat: ✨ Add buses in PlatformSettings

* style: 🎨 Declare platform attribute instead of setting it to None

* build: 🔧 Add qblox-instruments to requirements

* refactor: ♻️ Change settings files structure

* refactor: ♻️ Change platform class name

* refactor: ♻️ Remove raise error

* feat: ✨ Add PlatformBuilder. Add relative imports to __init__.py files.

* refactor: ♻️ Move settings loading to PlatformBuilder

* style: 🎨 Log message when instantiating SettingsManager class

* feat: ✨ Make PlatformBuilder a singleton

* docs: 📝 Add docs

* style: 🎨 Delete unused imports.

* style: 🎨 Delete unused imports.

* style: 🎨 Use match case statement.

* feat: ✨ Add instrument skeleton classes

* refactor: ♻️ Add SettingsHashTable

* Remove imports from __init__ to avoid circular imports

* refactor: ♻️ Remove typing of current class

* refactor: ♻️ Move all instrument files inside instrument/ folder

* feat: ✨ Add Singleton metaclass

* ci: 👷 Check with pylint only staged files

* refactor: ♻️ Use platform-specific settings

Move all the settings of a specific platform inside the same folder

* style: 🎨 Solve pylint issues.

* refactor: ♻️ Move settings category inside yaml file

* refactor: ♻️ Add category attribute to AbstractSettings

* refactor: ♻️ Remove 'abstract' from any file or class.

Solves comment #4

* refactor: ♻️ Change name PB to PLATFORM_BUILDER

* refactor: ♻️ Remove dataclass from HardwareCircuit

* refactor: ♻️ Change name SM to SETTINGS_MANAGER

* refactor: ♻️ Rename 'platform' to 'platform_name'

* refactor: ♻️ Add constants.py file

* refactor: ♻️ Add DEFAULT_SETTINGS_FOLDERNAME to constants.py file

* refactor: ♻️ Use full name for variables

* docs: 📝 Delete TODO

* style: 🎨 Change settings type

* style: 🎨 Remove typing lsit

* refactor: ♻️ Check that dict has key before deleting it

* test: 🧪 Split tests

* fix: 🐛 Change backend attributes after parent init.

* chore: 📝 Add load_platform example

* refactor: ♻️ Remove 'settings' from filenames

* feat: ✨ Add instrument settings

* refactor: ♻️ Remove from __init__.py files all classes that won't be used by the user

* refactor: ♻️ Change class and file name

* feat: ✨ Add QbloxPulsar classes

* feat: ✨ Add QbloxPulsarSettings classes

* build: 🔧 Use new version of qblox_instruments

* style: 🎨 Fix settings type

* refactor: ♻️ Remove connect from __init__

* feat: [QILI-48] Implement platform, backend and settings classes (#4)

* chore: 📝 Update requirements

Add qibo and pyyaml requirements

* chore: 🔊 Add raise_error function in config.py file

* feat: ✨ Add AbstractPlatform class.

* style: 🎨 Remove long line

* feat: ✨ Add HardwareCircuit class

* feat: ✨ Add QililabBackend class

* feat: ✨ Add gates.py file

* refactor: ♻️ Remove useless raise_error

* docs: 📝 Update docs of backend and platform classes

Add description of attributes

* feat: ✨ Add I, X, Y, Z gates.

* test: 🧪 Add backend tests

* refactor: ♻️ Remove dummy files and examples

* feat: ✨ Add QiliPlatform class.

* feat: ✨ Add Settings class.

* feat: ✨ Add SettingsLoader class.

* chore: 🔧 Add types-PyYAML to dev-requirements.txt

* ci: configure codecov

* refactor: ♻️ Create one python file for each gate

* fix: 🐛 Remove dummy import

* refactor: ♻️ Change file name

* test: 🧪 Add settings_manager tests. Fix backend tests.

* refactor: ♻️ Change class name

SettingsLoader to SettingsManager

* feat: ✨ Add platform and instrument setting files

* refactor: ♻️ Change gates file names

* build: 🔧 Add typeguard to requirements

* refactor: ♻️ Delete useless methods.

* refactor: ♻️ Change gate name in __init__.

* refactor: ♻️ Remove useless methods

* refactor: ♻️ Remove raise_error

* feat: ✨ Change SettingsManager to singleton

* feat: ✨ Add PlatformSettings class

* feat: ✨ Add AbstractSettings and SettingsLoader classes

* feat: ✨ Add QubitCalibrationSettings class

* refactor: ♻️ Remove Settings class

* refactor: ♻️ Move instrument settings file to single yaml file

* test: 🧪 Update backend and settings_manager tests.

* fix: 🐛 Add init file

* style: 🎨 Remove unused import

* refactor: ♻️ Change classes to dataclass

* style: 🎨 Remove unused import

* ci: 👷 Install requirements.txt before code quality check

* ci: 👷 Add MANIFEST.in file to install yaml files

* ci: 👷 Modify MANIFEST.in file

* fix: 🐛 Call __post_init__() of AbstractPlatform

* refactor: ♻️ Remove SettingsLoader class

* docs: 📝 Remove unused argument docs

* fix: 🐛 Add ClassVar to class variables inside a dataclass

* style: 🎨 Disable sort when dumping yaml file

* feat: ✨ Add buses in PlatformSettings

* style: 🎨 Declare platform attribute instead of setting it to None

* refactor: ♻️ Change settings files structure

* refactor: ♻️ Change platform class name

* refactor: ♻️ Remove raise error

* feat: ✨ Add PlatformBuilder. Add relative imports to __init__.py files.

* refactor: ♻️ Move settings loading to PlatformBuilder

* style: 🎨 Log message when instantiating SettingsManager class

* feat: ✨ Make PlatformBuilder a singleton

* docs: 📝 Add docs

* style: 🎨 Delete unused imports.

* style: 🎨 Delete unused imports.

* style: 🎨 Use match case statement.

* refactor: ♻️ Add SettingsHashTable

* Remove imports from __init__ to avoid circular imports

* refactor: ♻️ Remove typing of current class

* refactor: ♻️ Move all instrument files inside instrument/ folder

* feat: ✨ Add Singleton metaclass

* ci: 👷 Check with pylint only staged files

* refactor: ♻️ Use platform-specific settings

Move all the settings of a specific platform inside the same folder

* style: 🎨 Solve pylint issues.

* refactor: ♻️ Move settings category inside yaml file

* refactor: ♻️ Add category attribute to AbstractSettings

* refactor: ♻️ Remove 'abstract' from any file or class.

Solves comment #4

* refactor: ♻️ Change name PB to PLATFORM_BUILDER

* refactor: ♻️ Remove dataclass from HardwareCircuit

* refactor: ♻️ Change name SM to SETTINGS_MANAGER

* refactor: ♻️ Rename 'platform' to 'platform_name'

* refactor: ♻️ Add constants.py file

* refactor: ♻️ Add DEFAULT_SETTINGS_FOLDERNAME to constants.py file

* refactor: ♻️ Use full name for variables

* docs: 📝 Delete TODO

* style: 🎨 Change settings type

* style: 🎨 Remove typing lsit

* refactor: ♻️ Check that dict has key before deleting it

* test: 🧪 Split tests

* fix: 🐛 Change backend attributes after parent init.

* chore: 📝 Add load_platform example

* refactor: ♻️ Remove dependency from qibo

* style: 🎨 Add entry points

* chore: 📝 Add load_platform example using PLATFORM_BUILDER

* docs: 📝 Fix typo in docs

Co-authored-by: Albert Solana <iamtxena@gmail.com>

* feat: 💩 Check connection before running class method.

We should find a way to avoid running _check_connected() every time

* fix: 🐛 Remove useless settings and change type of attribute.

* test: 🧪 Add tests for instruments

* fix: 🐛 Fix Pulsar connection

* bump: version 0.0.0 → 0.1.0

* revert: ⏪ Delete useless files added in last merge

* test: 🧪 Add more tests for instruments

* feat: ✨ Add upload() and get_acquisitions() methods

* test: 🧪 Fix yaml to pass all tests

* style: 🎨 Remove useless imports and types

* docs: 📝 Add arguments of parent classes also in its children

* feat: ✨ Add Rohde Schwartz SGS100A class

* refactor: ♻️ Move method to parent class.

* test: 🧪 Add tests for Rohde Schwarz

* refactor: ♻️ Structure settings/ and instruments/ directories

* refactor: ♻️ Move SGS100A inside rohde_schwarz folder

* refactor: ♻️ Create generic instruments

* refactor: ♻️ Create generic settings

* test: 🧪 Remove tests of private methods/attributes

* test: 🧪 Add scope to fixtures

* refactor: ♻️ Remove Pulse settings class

* refactor: ♻️ Set to None all un-defined attributes

* refactor: ♻️ Create class property to check connection

* docs: 📝 Fix doc typos.

* revert: ⏪ Remove None values added in commit 77ba88b

* style: 🎨 Remove useless return types

* refactor: ♻️ Move close method to Instrument class

* refactor: ♻️ Use partial imports when using code from other module

* fix: 🐛 Fix circular import

* feat: ✨ Add Device, Pulsar and RohdeSchwarz typings

* refactor: ♻️ Remove location docs from settings classes

* refactor: ♻️ Create QbloxPulsarSettings class

* refactor: ♻️ Add dict argument to Instrument's init and cast it to corresponding settings class

* test: 🧪 Adapt tests to previous changes

* refactor: ♻️ Remove useless hashtable

* fix: 🐛 Add missing __init__

* refactor: ♻️ Remove useless constant

* refactor: ♻️ Move type declaration outside of init

* refactor: ♻️ Cast string attributes to Enum

* test: 🧪 Fix small bug in SettingsManager tests

* test: 🧪 Fix small bug in SettingsManager tests

* test: 🧪 Fix small bug in backend tests

* refactor: ♻️ Move CheckConnected decorator to child classes. Fix decorator.

* test: 🧪 Refactor

* test: 🧪 Add UNIT tests of instruments.

* ci: Check only src/ with mypy

* revert: ⏪ Remove src from mypy command. Add # type: ignore

* ci: Test only with unit tests

* refactor: ♻️ Remove str type in Enums

Co-authored-by: Albert Solana <iamtxena@gmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
amitjansc added a commit that referenced this pull request Apr 26, 2022
* chore: 📝 Update requirements

Add qibo and pyyaml requirements

* chore: 🔊 Add raise_error function in config.py file

* feat: ✨ Add AbstractPlatform class.

* style: 🎨 Remove long line

* feat: ✨ Add HardwareCircuit class

* feat: ✨ Add QililabBackend class

* feat: ✨ Add gates.py file

* refactor: ♻️ Remove useless raise_error

* docs: 📝 Update docs of backend and platform classes

Add description of attributes

* feat: ✨ Add I, X, Y, Z gates.

* test: 🧪 Add backend tests

* refactor: ♻️ Remove dummy files and examples

* feat: ✨ Add QiliPlatform class.

* feat: ✨ Add Settings class.

* feat: ✨ Add SettingsLoader class.

* chore: 🔧 Add types-PyYAML to dev-requirements.txt

* ci: configure codecov

* refactor: ♻️ Create one python file for each gate

* fix: 🐛 Remove dummy import

* refactor: ♻️ Change file name

* test: 🧪 Add settings_manager tests. Fix backend tests.

* refactor: ♻️ Change class name

SettingsLoader to SettingsManager

* feat: ✨ Add platform and instrument setting files

* refactor: ♻️ Change gates file names

* build: 🔧 Add typeguard to requirements

* refactor: ♻️ Delete useless methods.

* refactor: ♻️ Change gate name in __init__.

* refactor: ♻️ Remove useless methods

* refactor: ♻️ Remove raise_error

* feat: ✨ Change SettingsManager to singleton

* feat: ✨ Add PlatformSettings class

* feat: ✨ Add AbstractSettings and SettingsLoader classes

* feat: ✨ Add QubitCalibrationSettings class

* refactor: ♻️ Remove Settings class

* refactor: ♻️ Move instrument settings file to single yaml file

* test: 🧪 Update backend and settings_manager tests.

* fix: 🐛 Add init file

* style: 🎨 Remove unused import

* refactor: ♻️ Change classes to dataclass

* style: 🎨 Remove unused import

* ci: 👷 Install requirements.txt before code quality check

* ci: 👷 Add MANIFEST.in file to install yaml files

* ci: 👷 Modify MANIFEST.in file

* fix: 🐛 Call __post_init__() of AbstractPlatform

* refactor: ♻️ Remove SettingsLoader class

* docs: 📝 Remove unused argument docs

* fix: 🐛 Add ClassVar to class variables inside a dataclass

* style: 🎨 Disable sort when dumping yaml file

* feat: ✨ Add buses in PlatformSettings

* style: 🎨 Declare platform attribute instead of setting it to None

* build: 🔧 Add qblox-instruments to requirements

* refactor: ♻️ Change settings files structure

* refactor: ♻️ Change platform class name

* refactor: ♻️ Remove raise error

* feat: ✨ Add PlatformBuilder. Add relative imports to __init__.py files.

* refactor: ♻️ Move settings loading to PlatformBuilder

* style: 🎨 Log message when instantiating SettingsManager class

* feat: ✨ Make PlatformBuilder a singleton

* docs: 📝 Add docs

* style: 🎨 Delete unused imports.

* style: 🎨 Delete unused imports.

* style: 🎨 Use match case statement.

* feat: ✨ Add instrument skeleton classes

* refactor: ♻️ Add SettingsHashTable

* Remove imports from __init__ to avoid circular imports

* refactor: ♻️ Remove typing of current class

* refactor: ♻️ Move all instrument files inside instrument/ folder

* feat: ✨ Add Singleton metaclass

* ci: 👷 Check with pylint only staged files

* refactor: ♻️ Use platform-specific settings

Move all the settings of a specific platform inside the same folder

* style: 🎨 Solve pylint issues.

* refactor: ♻️ Move settings category inside yaml file

* refactor: ♻️ Add category attribute to AbstractSettings

* style: 🎨 Remove abstract return type

* feat: ✨ Add Schema and SchemaSettings class

* refactor: ♻️ Remove 'abstract' from any file or class.

Solves comment #4

* refactor: ♻️ Change name PB to PLATFORM_BUILDER

* refactor: ♻️ Remove dataclass from HardwareCircuit

* refactor: ♻️ Change name SM to SETTINGS_MANAGER

* refactor: ♻️ Rename 'platform' to 'platform_name'

* refactor: ♻️ Add constants.py file

* refactor: ♻️ Add DEFAULT_SETTINGS_FOLDERNAME to constants.py file

* refactor: ♻️ Use full name for variables

* docs: 📝 Delete TODO

* style: 🎨 Change settings type

* style: 🎨 Remove typing lsit

* refactor: ♻️ Check that dict has key before deleting it

* test: 🧪 Split tests

* fix: 🐛 Change backend attributes after parent init.

* chore: 📝 Add load_platform example

* refactor: ♻️ Remove 'settings' from filenames

* feat: ✨ Add instrument settings

* refactor: ♻️ Remove from __init__.py files all classes that won't be used by the user

* refactor: ♻️ Change class and file name

* feat: ✨ Add QbloxPulsar classes

* feat: ✨ Add QbloxPulsarSettings classes

* refactor: ♻️ Remove dependency from qibo

* style: 🎨 Add entry points

* chore: 📝 Add load_platform example using PLATFORM_BUILDER

* build: 🔧 Use new version of qblox_instruments

* style: 🎨 Fix settings type

* refactor: ♻️ Remove connect from __init__

* docs: 📝 Fix typo in docs

* feat: [QILI-48] Implement platform, backend and settings classes (#4)

* chore: 📝 Update requirements

Add qibo and pyyaml requirements

* chore: 🔊 Add raise_error function in config.py file

* feat: ✨ Add AbstractPlatform class.

* style: 🎨 Remove long line

* feat: ✨ Add HardwareCircuit class

* feat: ✨ Add QililabBackend class

* feat: ✨ Add gates.py file

* refactor: ♻️ Remove useless raise_error

* docs: 📝 Update docs of backend and platform classes

Add description of attributes

* feat: ✨ Add I, X, Y, Z gates.

* test: 🧪 Add backend tests

* refactor: ♻️ Remove dummy files and examples

* feat: ✨ Add QiliPlatform class.

* feat: ✨ Add Settings class.

* feat: ✨ Add SettingsLoader class.

* chore: 🔧 Add types-PyYAML to dev-requirements.txt

* ci: configure codecov

* refactor: ♻️ Create one python file for each gate

* fix: 🐛 Remove dummy import

* refactor: ♻️ Change file name

* test: 🧪 Add settings_manager tests. Fix backend tests.

* refactor: ♻️ Change class name

SettingsLoader to SettingsManager

* feat: ✨ Add platform and instrument setting files

* refactor: ♻️ Change gates file names

* build: 🔧 Add typeguard to requirements

* refactor: ♻️ Delete useless methods.

* refactor: ♻️ Change gate name in __init__.

* refactor: ♻️ Remove useless methods

* refactor: ♻️ Remove raise_error

* feat: ✨ Change SettingsManager to singleton

* feat: ✨ Add PlatformSettings class

* feat: ✨ Add AbstractSettings and SettingsLoader classes

* feat: ✨ Add QubitCalibrationSettings class

* refactor: ♻️ Remove Settings class

* refactor: ♻️ Move instrument settings file to single yaml file

* test: 🧪 Update backend and settings_manager tests.

* fix: 🐛 Add init file

* style: 🎨 Remove unused import

* refactor: ♻️ Change classes to dataclass

* style: 🎨 Remove unused import

* ci: 👷 Install requirements.txt before code quality check

* ci: 👷 Add MANIFEST.in file to install yaml files

* ci: 👷 Modify MANIFEST.in file

* fix: 🐛 Call __post_init__() of AbstractPlatform

* refactor: ♻️ Remove SettingsLoader class

* docs: 📝 Remove unused argument docs

* fix: 🐛 Add ClassVar to class variables inside a dataclass

* style: 🎨 Disable sort when dumping yaml file

* feat: ✨ Add buses in PlatformSettings

* style: 🎨 Declare platform attribute instead of setting it to None

* refactor: ♻️ Change settings files structure

* refactor: ♻️ Change platform class name

* refactor: ♻️ Remove raise error

* feat: ✨ Add PlatformBuilder. Add relative imports to __init__.py files.

* refactor: ♻️ Move settings loading to PlatformBuilder

* style: 🎨 Log message when instantiating SettingsManager class

* feat: ✨ Make PlatformBuilder a singleton

* docs: 📝 Add docs

* style: 🎨 Delete unused imports.

* style: 🎨 Delete unused imports.

* style: 🎨 Use match case statement.

* refactor: ♻️ Add SettingsHashTable

* Remove imports from __init__ to avoid circular imports

* refactor: ♻️ Remove typing of current class

* refactor: ♻️ Move all instrument files inside instrument/ folder

* feat: ✨ Add Singleton metaclass

* ci: 👷 Check with pylint only staged files

* refactor: ♻️ Use platform-specific settings

Move all the settings of a specific platform inside the same folder

* style: 🎨 Solve pylint issues.

* refactor: ♻️ Move settings category inside yaml file

* refactor: ♻️ Add category attribute to AbstractSettings

* refactor: ♻️ Remove 'abstract' from any file or class.

Solves comment #4

* refactor: ♻️ Change name PB to PLATFORM_BUILDER

* refactor: ♻️ Remove dataclass from HardwareCircuit

* refactor: ♻️ Change name SM to SETTINGS_MANAGER

* refactor: ♻️ Rename 'platform' to 'platform_name'

* refactor: ♻️ Add constants.py file

* refactor: ♻️ Add DEFAULT_SETTINGS_FOLDERNAME to constants.py file

* refactor: ♻️ Use full name for variables

* docs: 📝 Delete TODO

* style: 🎨 Change settings type

* style: 🎨 Remove typing lsit

* refactor: ♻️ Check that dict has key before deleting it

* test: 🧪 Split tests

* fix: 🐛 Change backend attributes after parent init.

* chore: 📝 Add load_platform example

* refactor: ♻️ Remove dependency from qibo

* style: 🎨 Add entry points

* chore: 📝 Add load_platform example using PLATFORM_BUILDER

* docs: 📝 Fix typo in docs

Co-authored-by: Albert Solana <iamtxena@gmail.com>

* feat: 💩 Check connection before running class method.

We should find a way to avoid running _check_connected() every time

* fix: 🐛 Remove useless settings and change type of attribute.

* test: 🧪 Add tests for instruments

* fix: 🐛 Fix Pulsar connection

* bump: version 0.0.0 → 0.1.0

* revert: ⏪ Delete useless files added in last merge

* test: 🧪 Add more tests for instruments

* feat: ✨ Add upload() and get_acquisitions() methods

* test: 🧪 Fix yaml to pass all tests

* style: 🎨 Remove useless imports and types

* docs: 📝 Add arguments of parent classes also in its children

* feat: ✨ Add Rohde Schwartz SGS100A class

* refactor: ♻️ Move method to parent class.

* test: 🧪 Add tests for Rohde Schwarz

* refactor: ♻️ Structure settings/ and instruments/ directories

* refactor: ♻️ Move SGS100A inside rohde_schwarz folder

* refactor: ♻️ Create generic instruments

* refactor: ♻️ Create generic settings

* test: 🧪 Remove tests of private methods/attributes

* test: 🧪 Add scope to fixtures

* refactor: ♻️ Remove Pulse settings class

* refactor: ♻️ Set to None all un-defined attributes

* refactor: ♻️ Create class property to check connection

* docs: 📝 Fix doc typos.

* revert: ⏪ Remove None values added in commit 77ba88b

* style: 🎨 Remove useless return types

* refactor: ♻️ Move close method to Instrument class

* fix: 🐛 Fix bug added in merge

* refactor: ♻️ Use partial imports when using code from other module

* fix: 🐛 Fix circular import

* feat: ✨ Add Device, Pulsar and RohdeSchwarz typings

* refactor: ♻️ Remove location docs from settings classes

* refactor: ♻️ Create QbloxPulsarSettings class

* refactor: ♻️ Add dict argument to Instrument's init and cast it to corresponding settings class

* test: 🧪 Adapt tests to previous changes

* refactor: ♻️ Remove useless hashtable

* fix: 🐛 Add missing __init__

* refactor: ♻️ Remove useless constant

* refactor: ♻️ Move type declaration outside of init

* refactor: ♻️ Cast string attributes to Enum

* test: 🧪 Fix small bug in SettingsManager tests

* test: 🧪 Fix small bug in SettingsManager tests

* test: 🧪 Fix small bug in backend tests

* refactor: ♻️ Move CheckConnected decorator to child classes. Fix decorator.

* test: 🧪 Refactor

* test: 🧪 Add UNIT tests of instruments.

* ci: Check only src/ with mypy

* revert: ⏪ Remove src from mypy command. Add # type: ignore

* refactor: ♻️ Remove name attribute from instruments

The settings already have a name attribute

* refactor: ♻️ Add id and name in settings.

Category now corresponds to the 'general' name

* test: 🧪 Pass tests.

* feat: ✨ Add Buses, Bus, Qubit and Resonator classes

* refactor: ♻️ Move gain to QbloxPulsarSettings

* docs: 📝 Fix doc typos.

* feat: ✨ Build platform from schema

* refactor: ♻️ Add category in description of schema elements

* docs: 📝 Update instrument docs.

* style: 🎨 Use lists instead of dicts in YAML files

* refactor: ♻️ Edit ResonatorSettings

* refactor: ♻️ Cast elements of schema to Settings class

* refactor: ♻️ Remove name attribute from platform

* test: 🧪 Pass tests.

* style: 🎨 Fix return type of NameHashTable

* docs: 📝 Fix docs

* refactor: ♻️ Build Qubit classes before loading Resonator class.

Also changed 'id' variable to 'id_' to avoid pylint error

* refactor: ♻️ Load resonator qubits into settings before loading Resonator class

* refactor: ♻️ Move hash table inside platforms module

* refactor: ♻️ Remove load_buses and load_schema methods

* docs: 📝 Fix docs

* docs: 📝 Fix docs

* feat: ✨ Add dump() method to Platform class

* feat: ✨ Load platform from YAML file

* test: 🧪 Pass tests.

* test: 🧪 Pass tests randomly.

* refactor: ♻️ Separate YAML platform builder with DB builder.

* refactor: ♻️ Add abstract PlatformBuilder.

* docs: 📝 Add example with PlatformBuilderYAML

* docs: 📝 Fix Instrument docs

* feat: ✨ Add mixer class

* docs: 📝 Remove docstring from parent classes.

* test: 🧪 Pass tests.

* docs: 📝 Fix docs.

* refactor: ♻️ Load bus item Settings from yaml.

* fix: 🐛 Fix bugs of last commit.

* style: 🎨 Remove useless import.

* refactor: ♻️ Load Schema and Buses before Platform.

* refactor: ♻️ Move Buses, Qubit, Resonator and Schema inside Components folder.

* refactor: ♻️ Move enum_dict_factory inside platform/utils.

* refactor: ♻️ Use sorcery to simplify code.

* refactor: ♻️ Change asdict method name to 'to_dict'.

* refactor: ♻️ Move dump into PlatformBuilder. Return platform dict in __str__.

* refactor: ♻️ Sourcery refactor.

* style: 🎨 Indent printed dict.

* fix: 🐛 Rename qblox files.

* test: 🧪 Fix tests.

* refactor: ♻️ Change PlatformBuilder to PlatformManager.

* docs: 📝 Fix docs.

* refactor: ♻️ Change ENUM comparison.

* fix: 🐛 Add init file.

* refactor: ♻️ Sourcery refactor.

* refactor: ♻️ Rename 'platforms' to 'platform'. Reorder settings files.

* refactor: ♻️ Sourcery refactor.

* refactor: ♻️ Change directory name 'platforms' to 'platform'.

* refactor: ♻️ Move Bus class to separate file.

* refactor: ♻️ Remove useless file.

* refactor: ♻️ Add qubit settings information in resonator settings

* refactor: ♻️ Load all elements from schema

Now schema contains all the settings of each element

* fix: 🐛 Add init file. Mypy fixes.

* feat: ✨ Add __iter__ magic method to Bus and Buses

* fix: 🐛 Fix platform dump and load.

* feat: ✨ Add settings properties to each class

* refactor: ♻️ Move all settings inside each corresponding class

* refactor: ♻️ Remove 'platform_name' attribute from SETTINGS_MANAGER

* refactor: ♻️ Remove 'foldername' attribute from SETTINGS_MANAGER

* style: 🎨 Change attribute name to 'data'.

* refactor: ♻️ Change 'append' method to 'add'.

* refactor: ♻️ Change enum name 'CategorySettings' to 'Category'.

Also add enum with draw options

* test: 🧪 Pass tests.

* refactor: ♻️ Remove string literals

* refactor: ♻️ Remove attributes from PlatformManager.

Create SingletonABC class.

* style: 🎨 Fix docs and imports.

* refactor: ♻️ Change method name.

Co-authored-by: Albert Solana <iamtxena@gmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
amitjansc added a commit that referenced this pull request Apr 26, 2022
* feat: ✨ Add I, X, Y, Z gates.

* test: 🧪 Add backend tests

* refactor: ♻️ Remove dummy files and examples

* feat: ✨ Add QiliPlatform class.

* feat: ✨ Add Settings class.

* feat: ✨ Add SettingsLoader class.

* chore: 🔧 Add types-PyYAML to dev-requirements.txt

* ci: configure codecov

* refactor: ♻️ Create one python file for each gate

* fix: 🐛 Remove dummy import

* refactor: ♻️ Change file name

* test: 🧪 Add settings_manager tests. Fix backend tests.

* refactor: ♻️ Change class name

SettingsLoader to SettingsManager

* feat: ✨ Add platform and instrument setting files

* refactor: ♻️ Change gates file names

* build: 🔧 Add typeguard to requirements

* refactor: ♻️ Delete useless methods.

* refactor: ♻️ Change gate name in __init__.

* refactor: ♻️ Remove useless methods

* refactor: ♻️ Remove raise_error

* feat: ✨ Change SettingsManager to singleton

* feat: ✨ Add PlatformSettings class

* feat: ✨ Add AbstractSettings and SettingsLoader classes

* feat: ✨ Add QubitCalibrationSettings class

* refactor: ♻️ Remove Settings class

* refactor: ♻️ Move instrument settings file to single yaml file

* test: 🧪 Update backend and settings_manager tests.

* fix: 🐛 Add init file

* style: 🎨 Remove unused import

* refactor: ♻️ Change classes to dataclass

* style: 🎨 Remove unused import

* ci: 👷 Install requirements.txt before code quality check

* ci: 👷 Add MANIFEST.in file to install yaml files

* ci: 👷 Modify MANIFEST.in file

* fix: 🐛 Call __post_init__() of AbstractPlatform

* refactor: ♻️ Remove SettingsLoader class

* docs: 📝 Remove unused argument docs

* fix: 🐛 Add ClassVar to class variables inside a dataclass

* style: 🎨 Disable sort when dumping yaml file

* feat: ✨ Add buses in PlatformSettings

* style: 🎨 Declare platform attribute instead of setting it to None

* build: 🔧 Add qblox-instruments to requirements

* refactor: ♻️ Change settings files structure

* refactor: ♻️ Change platform class name

* refactor: ♻️ Remove raise error

* feat: ✨ Add PlatformBuilder. Add relative imports to __init__.py files.

* refactor: ♻️ Move settings loading to PlatformBuilder

* style: 🎨 Log message when instantiating SettingsManager class

* feat: ✨ Make PlatformBuilder a singleton

* docs: 📝 Add docs

* style: 🎨 Delete unused imports.

* style: 🎨 Delete unused imports.

* style: 🎨 Use match case statement.

* feat: ✨ Add instrument skeleton classes

* refactor: ♻️ Add SettingsHashTable

* Remove imports from __init__ to avoid circular imports

* refactor: ♻️ Remove typing of current class

* refactor: ♻️ Move all instrument files inside instrument/ folder

* feat: ✨ Add Singleton metaclass

* ci: 👷 Check with pylint only staged files

* refactor: ♻️ Use platform-specific settings

Move all the settings of a specific platform inside the same folder

* style: 🎨 Solve pylint issues.

* refactor: ♻️ Move settings category inside yaml file

* refactor: ♻️ Add category attribute to AbstractSettings

* style: 🎨 Remove abstract return type

* feat: ✨ Add Schema and SchemaSettings class

* refactor: ♻️ Remove 'abstract' from any file or class.

Solves comment #4

* refactor: ♻️ Change name PB to PLATFORM_BUILDER

* refactor: ♻️ Remove dataclass from HardwareCircuit

* refactor: ♻️ Change name SM to SETTINGS_MANAGER

* refactor: ♻️ Rename 'platform' to 'platform_name'

* refactor: ♻️ Add constants.py file

* refactor: ♻️ Add DEFAULT_SETTINGS_FOLDERNAME to constants.py file

* refactor: ♻️ Use full name for variables

* docs: 📝 Delete TODO

* style: 🎨 Change settings type

* style: 🎨 Remove typing lsit

* refactor: ♻️ Check that dict has key before deleting it

* test: 🧪 Split tests

* fix: 🐛 Change backend attributes after parent init.

* chore: 📝 Add load_platform example

* refactor: ♻️ Remove 'settings' from filenames

* feat: ✨ Add instrument settings

* refactor: ♻️ Remove from __init__.py files all classes that won't be used by the user

* refactor: ♻️ Change class and file name

* feat: ✨ Add QbloxPulsar classes

* feat: ✨ Add QbloxPulsarSettings classes

* refactor: ♻️ Remove dependency from qibo

* style: 🎨 Add entry points

* chore: 📝 Add load_platform example using PLATFORM_BUILDER

* build: 🔧 Use new version of qblox_instruments

* style: 🎨 Fix settings type

* refactor: ♻️ Remove connect from __init__

* docs: 📝 Fix typo in docs

* feat: [QILI-48] Implement platform, backend and settings classes (#4)

* chore: 📝 Update requirements

Add qibo and pyyaml requirements

* chore: 🔊 Add raise_error function in config.py file

* feat: ✨ Add AbstractPlatform class.

* style: 🎨 Remove long line

* feat: ✨ Add HardwareCircuit class

* feat: ✨ Add QililabBackend class

* feat: ✨ Add gates.py file

* refactor: ♻️ Remove useless raise_error

* docs: 📝 Update docs of backend and platform classes

Add description of attributes

* feat: ✨ Add I, X, Y, Z gates.

* test: 🧪 Add backend tests

* refactor: ♻️ Remove dummy files and examples

* feat: ✨ Add QiliPlatform class.

* feat: ✨ Add Settings class.

* feat: ✨ Add SettingsLoader class.

* chore: 🔧 Add types-PyYAML to dev-requirements.txt

* ci: configure codecov

* refactor: ♻️ Create one python file for each gate

* fix: 🐛 Remove dummy import

* refactor: ♻️ Change file name

* test: 🧪 Add settings_manager tests. Fix backend tests.

* refactor: ♻️ Change class name

SettingsLoader to SettingsManager

* feat: ✨ Add platform and instrument setting files

* refactor: ♻️ Change gates file names

* build: 🔧 Add typeguard to requirements

* refactor: ♻️ Delete useless methods.

* refactor: ♻️ Change gate name in __init__.

* refactor: ♻️ Remove useless methods

* refactor: ♻️ Remove raise_error

* feat: ✨ Change SettingsManager to singleton

* feat: ✨ Add PlatformSettings class

* feat: ✨ Add AbstractSettings and SettingsLoader classes

* feat: ✨ Add QubitCalibrationSettings class

* refactor: ♻️ Remove Settings class

* refactor: ♻️ Move instrument settings file to single yaml file

* test: 🧪 Update backend and settings_manager tests.

* fix: 🐛 Add init file

* style: 🎨 Remove unused import

* refactor: ♻️ Change classes to dataclass

* style: 🎨 Remove unused import

* ci: 👷 Install requirements.txt before code quality check

* ci: 👷 Add MANIFEST.in file to install yaml files

* ci: 👷 Modify MANIFEST.in file

* fix: 🐛 Call __post_init__() of AbstractPlatform

* refactor: ♻️ Remove SettingsLoader class

* docs: 📝 Remove unused argument docs

* fix: 🐛 Add ClassVar to class variables inside a dataclass

* style: 🎨 Disable sort when dumping yaml file

* feat: ✨ Add buses in PlatformSettings

* style: 🎨 Declare platform attribute instead of setting it to None

* refactor: ♻️ Change settings files structure

* refactor: ♻️ Change platform class name

* refactor: ♻️ Remove raise error

* feat: ✨ Add PlatformBuilder. Add relative imports to __init__.py files.

* refactor: ♻️ Move settings loading to PlatformBuilder

* style: 🎨 Log message when instantiating SettingsManager class

* feat: ✨ Make PlatformBuilder a singleton

* docs: 📝 Add docs

* style: 🎨 Delete unused imports.

* style: 🎨 Delete unused imports.

* style: 🎨 Use match case statement.

* refactor: ♻️ Add SettingsHashTable

* Remove imports from __init__ to avoid circular imports

* refactor: ♻️ Remove typing of current class

* refactor: ♻️ Move all instrument files inside instrument/ folder

* feat: ✨ Add Singleton metaclass

* ci: 👷 Check with pylint only staged files

* refactor: ♻️ Use platform-specific settings

Move all the settings of a specific platform inside the same folder

* style: 🎨 Solve pylint issues.

* refactor: ♻️ Move settings category inside yaml file

* refactor: ♻️ Add category attribute to AbstractSettings

* refactor: ♻️ Remove 'abstract' from any file or class.

Solves comment #4

* refactor: ♻️ Change name PB to PLATFORM_BUILDER

* refactor: ♻️ Remove dataclass from HardwareCircuit

* refactor: ♻️ Change name SM to SETTINGS_MANAGER

* refactor: ♻️ Rename 'platform' to 'platform_name'

* refactor: ♻️ Add constants.py file

* refactor: ♻️ Add DEFAULT_SETTINGS_FOLDERNAME to constants.py file

* refactor: ♻️ Use full name for variables

* docs: 📝 Delete TODO

* style: 🎨 Change settings type

* style: 🎨 Remove typing lsit

* refactor: ♻️ Check that dict has key before deleting it

* test: 🧪 Split tests

* fix: 🐛 Change backend attributes after parent init.

* chore: 📝 Add load_platform example

* refactor: ♻️ Remove dependency from qibo

* style: 🎨 Add entry points

* chore: 📝 Add load_platform example using PLATFORM_BUILDER

* docs: 📝 Fix typo in docs

Co-authored-by: Albert Solana <iamtxena@gmail.com>

* feat: 💩 Check connection before running class method.

We should find a way to avoid running _check_connected() every time

* fix: 🐛 Remove useless settings and change type of attribute.

* test: 🧪 Add tests for instruments

* fix: 🐛 Fix Pulsar connection

* bump: version 0.0.0 → 0.1.0

* revert: ⏪ Delete useless files added in last merge

* test: 🧪 Add more tests for instruments

* feat: ✨ Add upload() and get_acquisitions() methods

* test: 🧪 Fix yaml to pass all tests

* style: 🎨 Remove useless imports and types

* docs: 📝 Add arguments of parent classes also in its children

* feat: ✨ Add Rohde Schwartz SGS100A class

* refactor: ♻️ Move method to parent class.

* test: 🧪 Add tests for Rohde Schwarz

* refactor: ♻️ Structure settings/ and instruments/ directories

* refactor: ♻️ Move SGS100A inside rohde_schwarz folder

* refactor: ♻️ Create generic instruments

* refactor: ♻️ Create generic settings

* test: 🧪 Remove tests of private methods/attributes

* test: 🧪 Add scope to fixtures

* refactor: ♻️ Remove Pulse settings class

* refactor: ♻️ Set to None all un-defined attributes

* refactor: ♻️ Create class property to check connection

* docs: 📝 Fix doc typos.

* revert: ⏪ Remove None values added in commit 77ba88b

* style: 🎨 Remove useless return types

* refactor: ♻️ Move close method to Instrument class

* fix: 🐛 Fix bug added in merge

* refactor: ♻️ Use partial imports when using code from other module

* fix: 🐛 Fix circular import

* feat: ✨ Add Device, Pulsar and RohdeSchwarz typings

* refactor: ♻️ Remove location docs from settings classes

* refactor: ♻️ Create QbloxPulsarSettings class

* refactor: ♻️ Add dict argument to Instrument's init and cast it to corresponding settings class

* test: 🧪 Adapt tests to previous changes

* refactor: ♻️ Remove useless hashtable

* fix: 🐛 Add missing __init__

* refactor: ♻️ Remove useless constant

* refactor: ♻️ Move type declaration outside of init

* refactor: ♻️ Cast string attributes to Enum

* test: 🧪 Fix small bug in SettingsManager tests

* test: 🧪 Fix small bug in SettingsManager tests

* test: 🧪 Fix small bug in backend tests

* refactor: ♻️ Move CheckConnected decorator to child classes. Fix decorator.

* test: 🧪 Refactor

* test: 🧪 Add UNIT tests of instruments.

* ci: Check only src/ with mypy

* revert: ⏪ Remove src from mypy command. Add # type: ignore

* refactor: ♻️ Remove name attribute from instruments

The settings already have a name attribute

* refactor: ♻️ Add id and name in settings.

Category now corresponds to the 'general' name

* test: 🧪 Pass tests.

* feat: ✨ Add Buses, Bus, Qubit and Resonator classes

* refactor: ♻️ Move gain to QbloxPulsarSettings

* docs: 📝 Fix doc typos.

* feat: ✨ Build platform from schema

* refactor: ♻️ Add category in description of schema elements

* docs: 📝 Update instrument docs.

* style: 🎨 Use lists instead of dicts in YAML files

* refactor: ♻️ Edit ResonatorSettings

* refactor: ♻️ Cast elements of schema to Settings class

* refactor: ♻️ Remove name attribute from platform

* test: 🧪 Pass tests.

* style: 🎨 Fix return type of NameHashTable

* docs: 📝 Fix docs

* refactor: ♻️ Build Qubit classes before loading Resonator class.

Also changed 'id' variable to 'id_' to avoid pylint error

* refactor: ♻️ Load resonator qubits into settings before loading Resonator class

* refactor: ♻️ Move hash table inside platforms module

* refactor: ♻️ Remove load_buses and load_schema methods

* docs: 📝 Fix docs

* docs: 📝 Fix docs

* feat: ✨ Add dump() method to Platform class

* feat: ✨ Load platform from YAML file

* test: 🧪 Pass tests.

* test: 🧪 Pass tests randomly.

* refactor: ♻️ Separate YAML platform builder with DB builder.

* refactor: ♻️ Add abstract PlatformBuilder.

* docs: 📝 Add example with PlatformBuilderYAML

* docs: 📝 Fix Instrument docs

* feat: ✨ Add mixer class

* docs: 📝 Remove docstring from parent classes.

* test: 🧪 Pass tests.

* docs: 📝 Fix docs.

* test: 🧪 Add platform tests.

* test: 🧪 Add platform tests.

* test: 🧪 Run platform tests with both DB and YAML platforms.

* test: 🧪 Use argument in test to avoid pylint error

* test: 🧪 Delete useless import.

* refactor: ♻️ Load bus item Settings from yaml.

* refactor: ♻️ Change filename of qubit instruments.

* fix: 🐛 Fix bugs of last commit.

* test: 🧪 100% coverage.

* style: 🎨 Remove useless imports.

* style: 🎨 Remove useless import.

* refactor: ♻️ Load Schema and Buses before Platform.

* refactor: ♻️ Move Buses, Qubit, Resonator and Schema inside Components folder.

* refactor: ♻️ Move enum_dict_factory inside platform/utils.

* refactor: ♻️ Use sorcery to simplify code.

* refactor: ♻️ Change asdict method name to 'to_dict'.

* refactor: ♻️ Move dump into PlatformBuilder. Return platform dict in __str__.

* refactor: ♻️ Sourcery refactor.

* style: 🎨 Indent printed dict.

* fix: 🐛 Rename qblox files.

* test: 🧪 Fix tests.

* refactor: ♻️ Change PlatformBuilder to PlatformManager.

* docs: 📝 Fix docs.

* refactor: ♻️ Change ENUM comparison.

* fix: 🐛 Add init file.

* refactor: ♻️ Sourcery refactor.

* refactor: ♻️ Rename 'platforms' to 'platform'. Reorder settings files.

* refactor: ♻️ Sourcery refactor.

* refactor: ♻️ Change directory name 'platforms' to 'platform'.

* refactor: ♻️ Move Bus class to separate file.

* refactor: ♻️ Remove useless file.

* refactor: ♻️ Add qubit settings information in resonator settings

* refactor: ♻️ Load all elements from schema

Now schema contains all the settings of each element

* fix: 🐛 Add init file. Mypy fixes.

* feat: ✨ Add __iter__ magic method to Bus and Buses

* fix: 🐛 Fix platform dump and load.

* test: 🧪 Pass all tests.

* feat: ✨ Add settings properties to each class

* refactor: ♻️ Move all settings inside each corresponding class

* test: 🧪 Pass all tests.

* refactor: ♻️ Remove 'platform_name' attribute from SETTINGS_MANAGER

* refactor: ♻️ Remove 'foldername' attribute from SETTINGS_MANAGER

* style: 🎨 Change attribute name to 'data'.

* refactor: ♻️ Change 'append' method to 'add'.

* refactor: ♻️ Change enum name 'CategorySettings' to 'Category'.

Also add enum with draw options

* test: 🧪 Pass tests.

* refactor: ♻️ Remove string literals

* refactor: ♻️ Remove attributes from PlatformManager.

Create SingletonABC class.

* style: 🎨 Fix docs and imports.

* refactor: ♻️ Remove more literals. Add __getitem__ method in Bus and Buses.

* test: 🧪 Add tests.

* test: 🧪 Coverage 100%.

Co-authored-by: Albert Solana <iamtxena@gmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.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

2 participants