uniqc.simulator.get_backend module¶
- uniqc.simulator.get_backend.create_simulator(backend='statevector', program_type='originir', **kwargs)[source]¶
Create a simulator backend.
- Parameters:
backend (str) – Simulator backend name. Supported values include
"statevector","density_matrix","densitymatrix","density","torchquantum", and"mps"(alias"matrix_product_state").program_type (str) – 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.
- Return type:
- uniqc.simulator.get_backend.get_backend(backend_type='statevector', program_type='originir', **kwargs)[source]¶
Deprecated: use
get_simulator()orcreate_simulator().- Parameters:
- Return type:
- 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:
- Returns:
A simulator instance.
- Return type: