Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Implements the structure of a general
qiboml
model #20base: main
Are you sure you want to change the base?
Implements the structure of a general
qiboml
model #20Changes from all commits
420ac26
7e828ff
0e8656b
2c79d18
e015465
12c53e8
aa38656
06d4a16
a6ac851
3c09554
82a7079
ddec82a
10f533b
76a2b2b
86969bd
e10ffe6
5ab8583
6aeaa1b
3f166e3
8fff5b8
c27cfdf
542f64a
c9e48b8
d69b130
2e0c1bd
42c0a1b
87ea094
474ad93
ce108f9
2469037
7b6b3a2
2a2d881
1c049d1
9bffae7
13f6a31
c78f189
2ac5168
6213bfe
3dacd8d
7b6b7af
0313bb2
ffc37ea
6916600
c0120ff
8b8db4d
af8001e
71286eb
59aadf7
26944a6
e9f3e32
3e2a0e5
bf116f0
eb39ca8
2726853
ef91fc2
a610cf4
606cbb9
a44942e
97ef336
e516fb5
87d0f02
bd7d1a0
f1f43fd
6820b25
c0fd516
51037fd
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Large diffs are not rendered by default.
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.
You should never import from a level directly above yours, and the package
__init__.py
is directly above everything.I'd suggest you to move this definition in a standalone module (though I still a bit undecided about which would be the best course of action for this...).
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.
Instead of this, I believe it would be more elegant to use a
._qubits
attribute, and expose a.qubits
property.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.
The problem I see here, though, is that then you will need to construct the layer as:
if you want to specify the qubits. I am not sure if there's any workaround with
dataclasses
.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.
Interestingly enough, you can do it with Pydantic:
(though you can not use
._qubit
, since fields are supposed to be public, and they can not contain leading underscores)