{"id":"064e04cc-6dd7-4aa7-b583-46e4da362733","arxiv_id":"2507.16255","paper_version":1,"verdict":"REJECT","confidence":"MODERATE","novelty_score":3.0,"correctness_risk":"high","formal_verification":"none","parameter_count":2,"one_line_summary":"The paper presents a CUDA-Q debugging workflow with classical, uniform, and product state assertions, using Fisher's exact test and Monte Carlo sampling to improve on chi-square-based product state checks.","lead":"A new debugging tool for CUDA-Q lets developers check qubits mid-circuit with statistical assertions. It replaces the chi-square test with Fisher's exact test and Monte Carlo sampling, which handles sparse measurement data better.","discovery_kind":"extension","skeptic_critique":{"model":"deepseek-v4-flash","headline":"Product state assertion tests basis-specific statistical independence, not separability; entangled states with independent computational-basis marginals pass the assertion, so the claimed reliability improvement is unsound.","rationale":"The reader's weakest assumption precisely identifies the load-bearing flaw: the paper's headline contribution is an improved product state assertion, but the assertion logically tests only statistical independence in the computational basis, which is not equivalent to the absence of entanglement. The Fisher/Monte Carlo replacement may fix sparsity-induced chi-square failures, as the X-gate example shows, but it does not fix the fundamentally unsound inference from basis-specific independence to productness. The counterexample state (|0+>+|1->)/√2 is a genuine entangled pure state with exactly independent computational-basis outcomes, so increasing shots cannot help. This makes the central reliability and accuracy claim unsupported for the stated purpose of detecting entanglement. The paper's CUDA-Q port and its honest discussion of static-kernel limitations have some merit, but they do not rescue the headline claim. I agree with the reader's REJECT verdict; no verdict adjustment is needed beyond confirming it.","tokens_in":10340,"tokens_out":5296,"duration_ms":60186,"concrete_test":"Run the product state assertion on a CUDA-Q dynamic kernel implementing the 2-qubit state (|0+>+|1->)/√2, e.g., H q0; H q1; CZ q0 q1, with 10,000 shots. If the assertion reports 'product state' while an independent state-vector computation shows Schmidt rank 2, the false-negative behavior is confirmed. As a control, run a Bell state (H q0; CNOT q0 q1), which should be flagged as entangled, showing the test is not vacuous but is basis-limited. An analytical check: compute the 2x2 independence likelihood surface and verify the entangled state lies exactly on the independence manifold, so no sample size can resolve the error.","verdict_should_be":"REJECT","load_bearing_attack":"The central unsupported step is in Section IV-C: the paper equates statistically independent computational-basis measurement outcomes with a product state. The assertion's null hypothesis is that the two qubit groups are independent in the contingency table; Fisher's exact test and the Monte Carlo method only assess that null. But independence of computational-basis outcomes is necessary, not sufficient, for a product (separable) state. A canonical counterexample is (|0+>+|1->)/√2, whose computational-basis outcomes are exactly uniform over 00, 01, 10, and 11, yielding a large p-value and a 'product state' verdict even though the state is entangled (Schmidt rank 2). This is not a finite-shot artifact: the true distribution is exactly independent in that basis, so increasing shot count cannot fix it. The paper's claimed improvement over chi-square addresses only sparse contingency tables and small expected counts; it does not address the semantic gap between basis-specific independence and entanglement. Because the stated debugging use case is to check whether qubits are entangled or not, the assertion can silently pass entangled states. The paper does not acknowledge this limitation anywhere, despite otherwise candidly discussing static-kernel constraints.","agreement_with_reader":"agree"},"referee_report":{"model":"deepseek-v4-flash","summary":"The paper presents a debugging workflow for CUDA-Q based on statistical assertions. It implements three assertions—classical, uniform, and product state—by inserting calls into dynamically constructed CUDA-Q kernels, sampling the circuit with cudaq.sample, and applying statistical tests. The claimed contribution is twofold: (i) it ports prior Qiskit-based statistical assertions to CUDA-Q and adapts them to CUDA-Q's kernel-based programming model, and (ii) it replaces the chi-square test in the product state assertion with a combination of Fisher's exact test and a Monte Carlo method, which the authors argue is more reliable for sparse measurement distributions. The workflow is demonstrated on the Bernstein-Vazirani algorithm and the Quantum Fourier Transform, with qualitative debugging examples.","tokens_in":10580,"tokens_out":7748,"duration_ms":77530,"significance":"If the claims were sound, the tool would fill a real usability gap in CUDA-Q by providing mid-circuit statistical checks. The statistical-test improvement (Fisher/Monte Carlo over chi-square for sparse tables) is a reasonable incremental idea, and the careful discussion of CUDA-Q's dynamic-kernel constraints is useful for the quantum-software community. However, the central claim about the product state assertion is logically flawed: the assertion tests only statistical independence of computational-basis measurement outcomes, which is not equivalent to a product state. The paper does not acknowledge this limitation, and the presented counterexample shows the assertion can silently accept an entangled state. This undermines the abstract's claim to have improved the 'reliability and accuracy' of the product state assertion.","major_comments":[{"comment":"The product state assertion's semantic foundation is unsound. The null hypothesis is statistical independence of computational-basis measurement outcomes, and the paper equates acceptance of this null with 'likely in a product state.' But independence of computational-basis marginals is necessary, not sufficient, for a product state. A concrete counterexample is the entangled state (|0+> + |1->)/√2, whose measurement probabilities in the computational basis are exactly P(00)=P(01)=P(10)=P(11)=1/4. This distribution is perfectly independent, so Fisher's exact test (or Monte Carlo) will return a large p-value and the assertion will report a product state, even though the state has Schmidt rank 2 and is entangled. This is not a finite-shot artifact; the exact distribution is independent. Consequently, the assertion cannot serve the stated debugging purpose of detecting whether qubit groups are entangled, and the claim in the abstract that the product state assertion's 'reliability and accuracy' are improved is not supported. The paper must either reframe the assertion as a test of basis-specific independence with an explicit statement that it is only a necessary condition for a product state, or replace it with a test that can actually certify productness (e.g., using purity or an entanglement witness).","section":"Section IV-C and IV-C1"},{"comment":"The description of scipy.stats.fisher_exact is factually incorrect. SciPy's fisher_exact function only supports 2x2 contingency tables; it does not automatically invoke a Monte Carlo method for larger tables. The Monte Carlo approach for general contingency tables is available through scipy.stats.chi2_contingency with an appropriate method parameter, or through other Monte Carlo routines. As written, the sentence 'we call scipy.stats.fisher_exact(cont_table). This method calls Fisher's exact test if the contingency table is of size 2 × 2, or else it calls the Monte Carlo Method' is wrong and would lead to a runtime error for non-2x2 tables. This undermines the reproducibility of the implementation and the claim that 'extensive testing ... using scipy.stats.fisher_exact' was performed. The authors should specify the actual functions and parameters used, and correct the text accordingly.","section":"Section IV-C1 and IV-C2"},{"comment":"The argument against the chi-square test contains a technical error. The paper states that zeros in the observed contingency table cause zeros in the expected contingency table (because row and column sums are 'likely zero'), leading to an undefined chi-square statistic. However, the expected count is E_ij = R_i * C_j / N, which is zero only when the entire row or column marginal is zero, not when an individual cell is zero. A sparse table with a zero cell but positive row and column margins still has a positive expected count for that cell. The legitimate concern is that the chi-square approximation is unreliable when expected counts are small, not that the statistic is undefined for zero cells. This reasoning flaw weakens the motivation for replacing chi-square and should be corrected.","section":"Section IV-C2"},{"comment":"The mechanism for 'mid-circuit' sampling is not convincingly described. The paper says the assertion methods 'first sample the current quantum state for a specified number of shots using cudaq.sample to construct a measurement distribution, then run the appropriate statistical test,' and that 'after the assertion is executed, programmers can continue building the circuit as normal, without explicitly rebuilding the quantum state.' In CUDA-Q, cudaq.sample executes a kernel from start to finish and returns measurement outcomes; it does not sample an intermediate state of a partially constructed kernel. The authors do not explain how the intermediate state is extracted or how the circuit continuation is achieved without rebuilding the state. If the tool works by executing a truncated copy of the kernel, that must be stated explicitly; otherwise, the described workflow is not implementable in CUDA-Q as written.","section":"Section V-A"}],"minor_comments":[{"comment":"The statement about the teleportation circuit is confusing: it says a product state assertion should be placed because we expect the qubits to be entangled, and that the assertion should 'return false.' Since the assertion is named after the product state, the relationship between 'false' and 'entangled' should be stated more explicitly to avoid implying the assertion detects the desired state directly.","section":"Section IV-C4"},{"comment":"The observation that 1000 shots 'occasionally led to incorrect results' while 10,000 shots fixed the issue is anecdotal. To support this claim, the authors should report quantitative failure rates, the circuits used, and the statistical significance of the improvement.","section":"Section VIII"},{"comment":"Reference [9] is a Medium blog post that may not be stable or citable as a primary source; consider replacing it with a standard quantum-information textbook. Similarly, reference [12] on Monte Carlo simulation is a general IBM page; a statistics textbook or the SciPy documentation for chi2_contingency would be more appropriate.","section":"References"},{"comment":"The paper frequently uses 'likely' and 'probably' when interpreting p-values (e.g., 'likely entangled'). Given the counterexample in the major comments, such language overstates the conclusions. Please tighten the interpretation to match what statistical independence actually implies.","section":"General"}],"recommendation":"reject","confidential_remarks":"The manuscript is a software-engineering contribution rather than a fundamental physics result, which may be fine for the venue, but the central product-state assertion is logically flawed. The counterexample in Section IV-C is not an edge case from current consensus; it is a straightforward state that any entanglement-checking tool should flag. Because the paper does not acknowledge the limitation, the abstract's headline claim is not defensible. The other issues (SciPy function misuse, chi-square reasoning, mid-circuit sampling description) are serious but could be corrected; however, fixing the semantic gap would require reframing the entire contribution. I therefore recommend rejection rather than major revision."},"author_rebuttal":null,"desk_editor":{"model":"deepseek-v4-flash","letter":"Ella et al. have built something that fills a real gap: CUDA-Q users can now insert statistical assertions mid-circuit using dynamic kernels, and the paper is honest about the static-kernel limitations. The dynamic-kernel integration (StatKernel, make_kernel wrapper) is real work, and the discussion of translating static to dynamic kernels, like the QuakeValue length issue, is useful for anyone doing CUDA-Q tooling. The statistical change from chi-square to Fisher's exact test and Monte Carlo for sparse contingency tables is a sensible improvement for the narrow problem of sparse counts; the X-gate example shows clearly why adding 1 to all cells is bad.\n\nThe soft spots are proportionate to the claims. The biggest one: the product state assertion equates statistical independence of computational-basis measurement outcomes with being in a product state. That is not the same thing. The state (|0+>+|1->)/√2 gives exactly uniform, independent outcomes over 00,01,10,11, yet it is entangled. So a large p-value from Fisher's test does not mean the qubits are in a product state; the assertion can silently pass entangled states. The paper does not acknowledge this limitation, and it matters because the stated use case is checking for entanglement. This is not fixed by more shots. The claimed improvement in reliability over chi-square only addresses the sparse-count problem, not the semantic gap.\n\nSecond: the description of scipy.stats.fisher_exact is wrong. It only handles 2x2 tables; it does not call a Monte Carlo method for larger tables. The text says it does, referencing the SciPy docs. If the tool actually uses scipy.stats.chi2_contingency with simulate_pvalue=True, the paper should say so. As written, a user passing a 32x2 table would get an error, not a Monte Carlo p-value.\n\nThird: the evaluation is anecdotal. Extensive testing is not described; there are no tables or graphs comparing chi-square vs their method on a suite of circuits, and no discussion of false positives/negatives. The one X-gate example is nice but not systematic.\n\nNone of this makes the work worthless. The port is useful, and the soundness issue is fixable by renaming the assertion (e.g., basis-independent or classical independence) and by clearly documenting that it cannot certify separability. The SciPy error is a one-line fix in prose. If these are addressed, the paper would be a solid tool-paper contribution for the quantum software community. As is, I would not cite it for the reliability claim, but I'd give it a serious referee.","headline":"A useful CUDA-Q debugging port with a real but fixable soundness gap in the product state assertion and a likely error about SciPy's fisher_exact.","tokens_in":11059,"tokens_out":4127,"would_cite":false,"duration_ms":40551,"reading_group":"maybe","serious_thinker":"yes","would_accept_peer_review":true},"rs_alignment":null,"lean_confirmation":null,"pith_extraction":{"msc":[],"pacs":[],"model":"deepseek-v4-flash","headline":"This paper claims that replacing chi-square with Fisher's exact test and Monte Carlo simulation makes statistical product state assertions reliable for CUDA-Q debugging.","keywords":["statistical assertions","quantum debugging","CUDA-Q","product state assertion","Fisher's exact test","Monte Carlo method","contingency table","dynamic kernels"],"falsifier":"Prepare the two-qubit entangled state (|0+> + |1->)/√2, run the product state assertion on it, and check whether the assertion reports a product state despite the state being entangled.","tokens_in":10169,"feed_emoji":"🐛","tokens_out":10957,"duration_ms":90447,"temperature":0.7,"pith_summary":"This paper aims to give developers of the CUDA-Q platform a debugging workflow based on statistical assertions: checks inserted into a quantum circuit that sample the measurement distribution and test whether the qubits are in a classical, uniform, or product state. The central claim is that the product state assertion becomes more reliable when the chi-square test is replaced by a combination of Fisher's exact test and the Monte Carlo method, which avoid undefined test statistics on sparse measurement distributions. The authors implement these assertions through a custom dynamic kernel class that allows classical Python checks to run mid-circuit, and they demonstrate the workflow on the Bernstein-Vazirani algorithm and the quantum Fourier transform. If the claim holds, it gives CUDA-Q users a practical way to catch bugs such as missing Hadamard gates without manually inspecting circuits.","feed_headline":"CUDA-Q debugging tool swaps chi-square for Fisher's exact test","feed_subtitle":"The product state assertion now stays accurate on sparse measurement data, so developers can catch bugs mid-circuit.","key_machinery":"The load-bearing object is the observed contingency table of measurement counts for the two qubit groups under test, combined with Fisher's exact test (for 2x2 tables) or the Monte Carlo method (for larger tables). These tests compute a p-value under the null hypothesis that the two groups are statistically independent; a large p-value is taken to mean the qubits are in a product state. The workflow also depends on CUDA-Q's dynamic kernels, which permit classical Python functions to be called mid-circuit, enabling the assertions to sample the current state.","core_discovery":"The authors claim that a contingency table built from sampled computational-basis outcomes, passed through scipy.stats.fisher_exact, yields accurate p-values for product state assertions across circuits where the previous chi-square-based approach fails. For 2x2 tables the method uses Fisher's exact test; for larger tables it uses Monte Carlo simulation with 9999 generated tables, both of which handle zero counts without the division-by-zero problem that plagues the chi-square statistic. They also claim that dynamic kernels in CUDA-Q, wrapped in a custom StatKernel class, allow these statistical assertions to be inserted at arbitrary points in a circuit, and that static kernel examples must be translated to dynamic kernels to use the tool.","pith_inferences":["Because the assertion equates statistical independence of computational-basis outcomes with being a product state, it cannot certify the absence of entanglement; a state such as (|0+> + |1->)/√2 would likely be misreported as a product state.","A more robust product state check would sample in multiple measurement bases or use an entanglement witness, an extension the current framework does not implement.","The dynamic-kernel requirement means existing static-kernel CUDA-Q programs must be rewritten to use the tool, so a translation or injection mechanism for static kernels would substantially widen applicability."],"forward_implications":["CUDA-Q developers can insert classical, uniform, and product state assertions at arbitrary points in dynamically constructed kernels, sampling the current state with cudaq.sample.","The product state assertion using Fisher's exact test and Monte Carlo simulation returns a p-value of 1 for a two-qubit register after an X gate, where a previous chi-square-based assertion incorrectly reported entanglement.","A shot count of 1000 can yield incorrect results for product and uniform state assertions due to p-value fluctuations, while 10,000 shots remediate the issue; the classical assertion remains accurate at 500 shots.","Support for static CUDA-Q kernels remains open, since user-defined classical Python functions cannot currently be called inside them."],"supporting_citations":[{"why":"Introduces the original statistical assertion methodology for classical, uniform, and product states that this work builds on and refines.","marker":"[2]"},{"why":"The prior Qiskit-based implementation of the assertions using chi-square tests, which the authors replace with Fisher's exact test and Monte Carlo.","marker":"[3]"},{"why":"The SciPy function scipy.stats.fisher_exact that the revised product state assertion calls; it dispatches Fisher's exact test for 2x2 tables and Monte Carlo otherwise.","marker":"[10]"},{"why":"Defines the Monte Carlo method used to compute p-values for larger contingency tables by generating tables with the same row and column sums under independence.","marker":"[12]"},{"why":"Supplies the statistical rationale that Fisher's exact test remains valid for small or zero cell counts where the chi-square test is unreliable.","marker":"[13]"},{"why":"Documents CUDA-Q dynamic kernels, the mechanism that allows classical Python assertion functions to be called mid-circuit.","marker":"[15]"}],"fun_headline_variants":["CUDA-Q debugger uses Fisher's exact test for quantum state checks","Fisher's exact test replaces chi-square in CUDA-Q quantum debugger","CUDA-Q statistical assertions: Fisher's exact beats chi-square","Monte Carlo and Fisher's exact test power CUDA-Q quantum debugger"],"cache_read_input_tokens":3200,"weakest_assumption_plain":"The product state assertion relies on the premise that statistically independent measurement outcomes mean the qubits are not entangled, a premise that fails for some entangled states.","fun_headline_variants_meta":{"raw":{"variants":["CUDA-Q debugger uses Fisher's exact test for quantum state checks","Fisher's exact test replaces chi-square in CUDA-Q quantum debugger","CUDA-Q statistical assertions: Fisher's exact beats chi-square","Monte Carlo and Fisher's exact test power CUDA-Q quantum debugger"]},"model":"deepseek-v4-flash","effort":"low","cost_usd":0.000264,"raw_usage":{"total_tokens":1600,"prompt_tokens":938,"completion_tokens":662,"prompt_tokens_details":{"cached_tokens":384},"prompt_cache_hit_tokens":384,"prompt_cache_miss_tokens":554,"completion_tokens_details":{"reasoning_tokens":584}},"tokens_in":554,"tokens_out":662,"duration_ms":6886,"temperature":1.0,"reasoning_tokens":584,"cache_read_input_tokens":384,"cache_creation_input_tokens":0},"cache_creation_input_tokens":0},"created_at":"2026-08-06T15:14:18.573321+00:00","model_set":{"reader":"deepseek-v4-flash"},"falsifier":"Prepare the two-qubit entangled state (|0+> + |1->)/√2, run the product state assertion on it, and check whether the assertion reports a product state despite the state being entangled.","supporting_citations":[{"cited_title":"Qiskit terra: Assertions module,","cited_arxiv_id":null,"evidence_quote":"The prior Qiskit-based implementation of the assertions using chi-square tests, which the authors replace with Fisher's exact test and Monte Carlo."},{"cited_title":"scipy.stats.fisher exact,","cited_arxiv_id":null,"evidence_quote":"The SciPy function scipy.stats.fisher_exact that the revised product state assertion calls; it dispatches Fisher's exact test for 2x2 tables and Monte Carlo otherwise."},{"cited_title":"What is monte carlo simulation?","cited_arxiv_id":null,"evidence_quote":"Defines the Monte Carlo method used to compute p-values for larger contingency tables by generating tables with the same row and column sums under independence."},{"cited_title":"Statistical notes for clinical researchers: Chi-squared test and fisher’s exact test,","cited_arxiv_id":null,"evidence_quote":"Supplies the statistical rationale that Fisher's exact test remains valid for small or zero cell counts where the chi-square test is unreliable."},{"cited_title":"Just-in-Time Kernel Creation,","cited_arxiv_id":null,"evidence_quote":"Documents CUDA-Q dynamic kernels, the mechanism that allows classical Python assertion functions to be called mid-circuit."}],"review_version":1}