uniqc.simulator.get_backend module¶
- uniqc.simulator.get_backend.create_simulator(backend='statevector', program_type='originir', **kwargs)[source]¶
Create a simulator backend.
- Parameters:
backend – Simulator backend name. Supported values include
"statevector","density_matrix","densitymatrix","density","torchquantum", and"mps"(alias"matrix_product_state").program_type – Ignored —
Simulatorauto-detects the input format. Kept for backward compatibility.**kwargs – Additional arguments passed to the simulator constructor.
- Returns:
A simulator instance for the requested backend.
- Raises:
ValueError – If the backend is not supported.
ImportError – If the TorchQuantum backend is requested but optional dependencies are not installed.
- uniqc.simulator.get_backend.get_simulator(backend_type='statevector', program_type='originir', **kwargs)[source]¶
Create a simulator instance (alias for
create_simulator()).The argument order matches
create_simulator()—backend_typefirst, thenprogram_type. Both arguments default to the most common case ("statevector"+"originir").- Parameters:
backend_type – Simulator backend, e.g.
"statevector","density_matrix","mps","torchquantum".program_type – Ignored —
Simulatorauto-detects the input format.**kwargs – Additional arguments passed to the simulator constructor.
- Returns:
A simulator instance.