qat.qpus.QutipQPU

class qat.qpus.QutipQPU(hardware_model=None, sim_method='deterministic', n_steps=100, n_samples=None, n_procs=None, bosonic_levels=None, extract_states=None, verbose=False, qutip_options=None, **kwargs)

An analog QPU using the QuTiP library. It performs a time-dependent evolution of a quantum state under a Hamiltonian specified in a Schedule.

The QPU supports executing various types of Hamiltonians like spin, bosonic and fermionic schedules and observables (spin and bosonic can be combined). It also includes schedules with stochastic parameters and, alternatively, a noise description of the environment in terms of Lindblad operators - take a look at the ‘Analog’ Noise models section.

For the noisy evolutions, a stochastic method of simulation is provided. It would need n_samples to be specified, i.e. the number of stochastic trajectories.

When working with bosons, one should specify the number of modes and the number of their excitations as tuples in the bosonic_levels list. If one further wishes to specify the psi_0 entering the to_job() of Schedule, the states of the systems should be ordered from belonging to modes with less to modes with more excitations.

Parameters
  • hardware_model (HardwareModel, optional) – a hardware model containing e.g jump operators or stochastic parameters, via jump_operators or params_specification, respectively. Defaults to None for noiseless simulations.

  • sim_method (string, optional) – deterministic (default) or stochastic. If the hardware model contains jump operators, deterministic will solve the Master equation with mesolve of QuTiP, whereas stochastic will do a Monte Carlo simulation with mcsolve. In the case of no jump operators deterministic will pass the problem straight to sesolve, while stochastic will mean that there is a user specified noise (using the Parameter class) which will be evaluated and averaged over n_samples number of times.

  • n_steps (int, optional) – number of simulation steps for mesolve and mcsolve of QuTiP. Default is 100.

  • n_samples (int, optional) – in stochastic mode - the number of trajectories for Monte Carlo simulation with jump operators or the number of noise realizations to average over for user-specified stochastic noise when a Parameter with a PSD in provided.

  • n_procs (int, optional) – in stochastic mode - the number of processes to run trajectories in parallel. Only for jump operators.

  • bosonic_levels (list<tuple<int, int>>, optional) – A list ot tuples for which the first value of each tuple is the number of modes, and the second - the number of their excitations. For example, if we have 10 modes, each with 50 excitations, this will be expressed as bosonic_levels = [(10, 50)]. In contrast, if we have 2 modes with 3 excitations and 1 mode with 5 excitations we would have for the total system bosonic_levels = [(2, 3), (1, 5)]. Only needed if non-two-level systems are present (i.e. not qubits or fermions). Defaults to None.

  • extract_states (list<int>, optional) – list of states to restrict H_resource, H_target, jump_operators, psi_0. The list should include integers between 0 for the first state and e.g. 2**N - 1 for the last one if one is working with N qubits. Defaults to None.

  • qutip_options (dict, optional) – extra options passed to the Qutip solver.

  • nsteps (int, optional) – alias for n_steps (legacy)