PySparQ.pysparq.demo

Standalone native simulator experiments: pysparq info|run|gui.

These CPU experiments expose complex amplitudes, phase-sensitive reference errors, sparse support, and actual classical construction/execution times. They do not submit quantum hardware jobs or estimate quantum execution time.

Classes

Functions

information() → dict

main() → None

run(config) → dict

Run a native experiment and its inverse against independent references.

run_rir_document(program_source, memory_source) → dict

Execute one RIR JSON document natively (wide registers and QRAM included).

Module Contents

class PySparQ.pysparq.demo.Experiment[源代码]
validate() → None[源代码]
basis: int = 3[源代码]
case: str = 'ghz'[源代码]
qubits: int = 4[源代码]
seed: int = 20261109[源代码]
PySparQ.pysparq.demo.information() → dict[源代码]
PySparQ.pysparq.demo.main() → None[源代码]
PySparQ.pysparq.demo.run(config: Experiment) → dict[源代码]

Run a native experiment and its inverse against independent references.

System register state is process-global. Use a separate process for each experiment when other code shares the simulator (the GUI does this).

PySparQ.pysparq.demo.run_rir_document(program_source: str, memory_source: str | None) → dict[源代码]

Execute one RIR JSON document natively (wide registers and QRAM included).

program_source and memory_source are filesystem paths or inline JSON strings; run_rir performs the actual native sparse-state execution, so widths beyond 64 bits and wide sparse QRAM queries run on the real backend. The exported record carries provenance, the program digest and every nonzero amplitude keyed by full-width register values.