tequila.simulators.simulator_api.compile¶
-
tequila.simulators.simulator_api.
compile
(objective: Union[Objective, QCircuit], variables: Dict[Union[Variable, collections.abc.Hashable], numbers.Real] = None, samples: int = None, backend: str = None, noise: tequila.circuit.noise.NoiseModel = None, device: str = None, *args, **kwargs) → Union[BackendCircuit, Objective][source]¶ Compile a tequila objective or circuit to a backend.
- Parameters
objective (Objective:) – tequila objective or circuit
variables (dict, optional:) – The variables of the objective given as dictionary with keys as tequila Variables and values the corresponding real numbers
samples (int, optional:) – if None a full wavefunction simulation is performed, otherwise a fixed number of samples is simulated
backend (str, optional:) – specify the backend or give None for automatic assignment
noise (NoiseModel, optional:) – the noise model to apply to the objective or QCircuit.
device (optional:) – a device on which (or in emulation of which) to sample the circuit.
- Returns
the compiled object.
- Return type
simulators.BackendCircuit or Objective