-
Notifications
You must be signed in to change notification settings - Fork 645
enforce qaoa
and noise
as "tertiary" modules
#7266
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
base: fix-optimize-dep
Are you sure you want to change the base?
Conversation
Hello. You may have forgotten to update the changelog!
|
pennylane.qaoa
as an "tertiary" moduloepennylane.qaoa
as an "tertiary" module
pennylane.qaoa
as an "tertiary" moduleqaoa
and noise
as "tertiary" modules
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## fix-optimize-dep #7266 +/- ##
=================================================
Coverage 99.64% 99.64%
=================================================
Files 512 512
Lines 50219 50227 +8
=================================================
+ Hits 50041 50049 +8
Misses 178 178 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Let's start debugging Sphinx with the ":func:~.cycle_mixer
" in line607 of cost.py
Maybe :func: |
Let me first try fixing the |
Compared with previous warnings are they different here: /github/workspace/doc/code/qml_qaoa.rst.rst:24: WARNING: autosummary: stub file not found 'pennylane.qaoa.mixers.prod'. Check your autosummary_generate setting.
/github/workspace/doc/code/qml_qaoa.rst.rst:41: WARNING: autosummary: stub file not found 'pennylane.qaoa.cost.bit_flip_mixer'. Check your autosummary_generate setting.
/github/workspace/doc/code/qml_qaoa.rst.rst:41: WARNING: autosummary: stub file not found 'pennylane.qaoa.cost.cycle_mixer'. Check your autosummary_generate setting.
/github/workspace/doc/code/qml_qaoa.rst.rst:41: WARNING: autosummary: stub file not found 'pennylane.qaoa.cost.loss_hamiltonian'. Check your autosummary_generate setting.
/github/workspace/doc/code/qml_qaoa.rst.rst:41: WARNING: autosummary: stub file not found 'pennylane.qaoa.cost.net_flow_constraint'. Check your autosummary_generate setting.
/github/workspace/doc/code/qml_qaoa.rst.rst:41: WARNING: autosummary: stub file not found 'pennylane.qaoa.cost.out_flow_constraint'. Check your autosummary_generate setting.
/github/workspace/doc/code/qml_qaoa.rst.rst:41: WARNING: autosummary: stub file not found 'pennylane.qaoa.cost.wires_to_edges'. Check your autosummary_generate setting.
/github/workspace/doc/code/qml_qaoa.rst.rst:41: WARNING: autosummary: stub file not found 'pennylane.qaoa.cost.x_mixer'. Check your autosummary_generate setting. |
Looks like the same. Sphinx is still recognizing those class as all in the same local file |
It's annoying that we still don't have Sphinx trigger for drafts 😢 |
yeah lol, first im going to fix the docs landing page then go from there |
Starting from line 1397 massive warnings... https://github.com/PennyLaneAI/pennylane/actions/runs/14411333479/job/40419734554?pr=7266 |
from pennylane.templates import ControlledSequence | ||
from pennylane.wires import WireError, Wires | ||
|
||
# pylint: disable = unnecessary-lambda, too-few-public-methods, too-many-statements, too-many-branches |
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.
❤️
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 decided to try and investigate the too-many-branches
😨 I should know better by now.
from pennylane.measurements import ( | ||
ClassicalShadowMP, | ||
CountsMP, | ||
DensityMatrixMP, | ||
ExpectationMP, | ||
MeasurementProcess, | ||
MeasurementValue, | ||
MidMeasureMP, | ||
MutualInfoMP, | ||
ProbabilityMP, | ||
PurityMP, | ||
SampleMP, | ||
ShadowExpvalMP, | ||
StateMP, | ||
VarianceMP, | ||
VnEntropyMP, | ||
classical_shadow, | ||
counts, | ||
density_matrix, | ||
expval, | ||
measure, | ||
mutual_info, | ||
probs, | ||
purity, | ||
sample, | ||
shadow_expval, | ||
state, | ||
var, | ||
vn_entropy, | ||
) |
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.
Any reason to not use just import pennylane import measurements
here?
Context:
The goal of this PR is to isolate the
noise
andqaoa
module astertiary
modules.Description of the Change:
import pennylane as qml
from this module.I
alias accessible at theops
module level (required to removeqml
dependency innoise
)Benefits: Module dependency enforcement
Possible Drawbacks: N/A
[sc-88858]