Skip to content

Execution on Classiq simulators

Classiq offers execution on simulators that are located at the Classiq backend.

Tip

These simulators don't require an account on a different cloud, and are usually fast to execute.

Simulator Usage

from classiq.execution import ClassiqBackendPreferences

preferences = ClassiqBackendPreferences(
    backend_name="Name of requested quantum simulator"
)

Opening info tab

Classiq supports following simulators:

  1. simulator, a general-purpose quantum simulator.

  2. simulator_statevector, which returns the full state vector. Since the state vector is exponentially large, this simulator is only suitable for small circuits.

  3. simulator_density_matrix, a simulator based on density matrices.

  4. simulator_matrix_product_state, which is efficient for simulating circuits with a low level of entanglement.

The enum ClassiqSimulatorBackendNames contains these names.

Nvidia Simulator Usage

Execution on Nvidia simulators requires specific license permissions. Before first use, contact Classiq support.

Classiq supports two types of Nvidia simulators, with the same inputs and outputs but different underlying infrastructure:

  1. The backends ClassiqNvidiaBackendNames.SIMULATOR and ClassiqNvidiaBackendNames.SIMULATOR_STATEVECTOR are better suited when multiple circuits need to be executed in sequence.
  2. The backends ClassiqNvidiaBackendNames.BRAKET_NVIDIA_SIMULATOR and ClassiqNvidiaBackendNames.BRAKET_NVIDIA_SIMULATOR_STATEVECTOR are executed using Amazon Braket's infrastructure, and provide faster execution for single circuits. Credentials for AWS are not needed.

Both ClassiqNvidiaBackendNames.SIMULATOR_STATEVECTOR and ClassiqNvidiaBackendNames.braket_nvidia_simulator_statevector return the state vector at the end of the circuit's execution (analogous to the above simulator_statevector).

from classiq.execution import ClassiqBackendPreferences, ClassiqNvidiaBackendNames

preferences = ClassiqBackendPreferences(
    backend_name=ClassiqNvidiaBackendNames.SIMULATOR
)

Opening info tab

Note

The number of execution requests to the NVIDIA simulator may be limited. If you encounter any problem, contact Classiq support.