qat.fermion.correlators.evaluate_circuits

qat.fermion.correlators.evaluate_circuits(circuit_list, qpu=None, sample_mode=True, nbshots=0)

Evaluate circuits constructed by circuits_for_correlator and return the value of the correlator (without offset).

Parameters:
  • circuit_list (list<pair<complex, Circuit>>) – a list of circuits with associated complex coefficient.

  • qpu (QPU, optional) – a QPU for circuit evaluation

  • sample_mode (bool, optional) – whether to use sample or observable mode

  • nbshots (int, optional) – number of shots to use in sample mode. Ignored in observable mode.

Returns:

the result float: if in sample mode, the standard deviation on the real part of the result float: if in sample mode, the standard deviation on the imaginary part of the result

Return type:

complex