uniqc.simulator.get_backend module#

Simulator backend factory for UnifiedQuantum.

This module provides a factory function to obtain appropriate simulator instances based on the quantum program type (OriginIR or QASM).

Key exports:
  • get_backend: Factory function to create simulator backends.

uniqc.simulator.get_backend.get_backend(program_type='originir', backend_type='statevector', **kwargs)[source]#

Get a simulator backend for the specified program type.

Parameters:
  • program_type (str) – Type of quantum program (“originir” or “qasm”).

  • backend_type (str) – Backend simulation type (“statevector” or “density_matrix”).

  • **kwargs – Additional arguments passed to the simulator constructor.

Returns:

A BaseSimulator instance for the given program type.

Raises:

ValueError – If program_type is not supported.

Return type:

BaseSimulator