-
Notifications
You must be signed in to change notification settings - Fork 4
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
General Gate Class #32
base: main
Are you sure you want to change the base?
Conversation
…cation of gate matrices
if TYPE_CHECKING: | ||
from numpy.typing import NDArray | ||
|
||
from mqt.yaqs.core.data_structures.networks import MPS | ||
|
||
from ..libraries.gate_library import BaseGate |
Check failure
Code scanning / CodeQL
Module-level cyclic import Error
yaqs.core.libraries.gate_library
yaqs.core.data_structures.simulation_parameters
definition
import
Copilot Autofix AI 12 days ago
Copilot could not generate an autofix suggestion
Copilot could not generate an autofix suggestion for this alert. Try pushing a new commit or if the problem persists contact support.
self.sites = list(sites) | ||
|
||
|
||
class Destroy(BaseGate): |
Check failure
Code scanning / CodeQL
Missing call to `__init__` during object initialization Error
method BaseGate.__init__
__init__ method
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix AI 12 days ago
To fix the problem, we need to ensure that the __init__
method of the BaseGate
class is called when initializing instances of the Destroy
and H
classes. This can be achieved by using the super()
function in the __init__
methods of these subclasses. This approach ensures that the initialization logic of the base class is executed, maintaining the integrity of the object state.
-
Copy modified line R390 -
Copy modified line R424
@@ -389,2 +389,3 @@ | ||
"""Initializes the gate.""" | ||
super().__init__() | ||
return | ||
@@ -422,2 +423,3 @@ | ||
"""Initializes the gate.""" | ||
super().__init__() | ||
return |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #32 +/- ##
=======================================
- Coverage 96.1% 94.5% -1.6%
=======================================
Files 20 20
Lines 1772 1854 +82
=======================================
+ Hits 1703 1753 +50
- Misses 69 101 +32
🚀 New features to boost your workflow:
|
Description
Allows for operation between gates, like multiplication and addition.
Checklist: