Repository navigation
Demo readiness: honest results, working backends, classical baselines - #4
Merged
Merged
Conversation
setup_logging() called logging.basicConfig(force=True) at INFO on import, which flooded output with Qiskit and other third-party logs. The library now only attaches a NullHandler to the superquantx logger; configure_logging() and configure() set up the superquantx logger alone.
- BaseBackend: replace placeholder feature maps, RBF kernel fallback, 0.0 expectation and random Pauli values with real generic implementations built on each backend's own gates: fidelity kernel from statevectors, exact Hamiltonian expectation, RealAmplitudes/EfficientSU2 ansatz, weighted MaxCut QAOA circuit. Qubit order is probed per backend so counts and statevectors can be normalised to one convention. - Simulator: tensordot gate application (correct Toffoli), unknown gates raise instead of being skipped, no dummy result on errors. - Qiskit: drop qiskit_ibm_provider/IBMQ; IBM hardware goes through qiskit-ibm-runtime QiskitRuntimeService and SamplerV2 (untested). - PennyLane: record gates in a PennyLaneCircuit and return counts. - Cirq: fix init order so the simulator is not reset to None. - Braket: Rx/Ry/Rz gate names, accept local:braket/braket_sv, fixed register size, real statevector, raise on errors. - TKET: AerBackend from pytket.extensions.qiskit, radians to half-turns, string count keys, no random-count fallback. - Ocean: gate-model calls raise a clear annealer message; fix the add_measurement signature, the num_reads clash and the MaxCut QUBO sign. - Tests: parametrised Bell, qubit order, expectation and kernel tests run against the real SDKs instead of mocks.
qiskit>=2.6, qiskit-aer>=0.18, qiskit-ibm-runtime>=0.50 (replaces the deprecated qiskit-ibm-provider path).
VQE: exact expectation from the backend, seeded init, exact-diagonalisation baseline, H2 STO-3G Hamiltonian, no random or inf fallbacks. QAOA: weighted MaxCut on the shared backend circuit, multi-start optimisation, best-of-samples partition and a brute-force classical check (solve()). QuantumSVM: no silent RBF fallback, gamma is now the kernel bandwidth, training accuracy no longer double-scales. QuantumNN: no random forward pass, softmax readout over <Z>, exact parameter-shift gradients through the chain rule.
Same stratified folds for the quantum classifier, a tuned RBF SVC and a tuned logistic regression. Quantum kernel bandwidth and C are tuned on a grid the same size as the RBF grid, the kernel is recomputed per fold, hardware cost is reported in circuit evaluations, and the gap to the best classical model gets a Nadeau-Bengio corrected t-test. Protocol follows arXiv:2610.42029.
Remove the fabricated trading numbers (random returns and the hard-coded 0.08 baseline) and the research agent's template 'exponential speedup' text. Portfolio selection now runs CVaR-VQE on a mean-variance QUBO and reports brute force and Markowitz references. Optimization runs QAOA MaxCut or VQE with exact checks. Classification benchmarks against tuned classical models. Trading and research agents keep only the parts backed by real computation and raise NotImplementedError for the rest. The agents demo uses the portfolio and classification agents and exits non-zero on failure.
…lgorithm; honest package docstring
…howcase, benchmarking, FAQ and troubleshooting pages; rewrite backends guide
…ckends, real benchmark output
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Prepares SuperQuantX for the live demo at the Quantum AI Tech Show (4 Nov 2026, "No hype. Just results."). Every number the library, CLI, examples and docs print now comes from a real computation, and every quantum result comes with a classical reference.
What was fake and is now real
0.0or random Pauli valuesinffallbacksgammais the kernel bandwidthNotImplementedErrorsuperquantx benchmarknp.randomresultscompare_to_classicalon moons / circles / irissuperquantx list-backendsbasicConfig(force=True)at INFO on importsuperquantxlogger onlyNew:
superquantx.benchmarks.compare_to_classicalfollowing the protocol of arXiv:2610.42029 (equal tuning grids, per-fold scaling and kernel recomputation, Nadeau-Bengio corrected t-test, cost reported in QPU circuit evaluations). Newexamples/showcase.py(under a minute) and a rewrittenexamples/vqe_molecule.py.Backend status
device="local:braket_sv"; AWS devices untested)Tests
.[all-backends,dev])mkdocs build --strictKey new tests: every backend kernel has unit self-fidelity and depends on its feature map; Bell and qubit-order checks run against the real SDKs instead of mocks; H2 VQE against exact diagonalisation; QAOA against brute force; CLI smoke tests.
Docs
mkdocs build --strictpasses without touching the workflow.CI note (needs a change in the GitHub UI)
.github/workflows/ci.ymlends the lint and test steps with|| true(lines 36, 67, 70), so CI is green even when ruff or pytest fails. This PR does not edit workflows (the token lacks workflow scope). Please remove|| truefrom the pytest steps in the GitHub UI; the ruff step can follow once the remaining style errors are cleaned up.Demo commands
Known gaps
examples/quantum_ml.pyandexamples/full_tutorial.pytake more than 2 to 4 minutes; not demo material.BaseQuantumAlgorithm.optimize()stores exceptions in.errorrather than raising.feature_map_auto(PR Spike: QuantumSVM feature_map=auto (Qmes-style) #2) and the MCP server (separate PR).