Integrators
Part of the noisy quantum gates approach are the Ito integrals, which come up in the calculations many times and dependent on the pulse shape used to implement the gates. The integration is separated into this class to allow for multiple integration methods, unit testing, and caching.
Classes
- class quantum_gates.integrators.Integrator(pulse: Pulse)[source]
Bases:
object
Calculates the integrals for a specific pulse parametrization.
- Parameters:
pulse (Pulse) – Object specifying the pulse waveform and parametrization.
- pulse_parametrization[source]
Function F: [0,1] -> [0,1] representing the parametrization of the pulse.
- Type:
callable
- use_lookup[source]
Tells whether or not the lookup table of the analytical solution should be used.
- Type:
- integrate(integrand: str, theta: float, a: float) float [source]
Evaluates the integrand provided as string from zero to a based on the implicit pulse shape scaled by theta.
If the pulse (pulse_parametrization) is None, we assume that the pulse height is constant. In this case, we do not perform numerical calculation but just lookup the result.
- _analytical_integration(integrand_str: str, theta: float, a: float) float [source]
Lookups up the result of the integration for the case that the parametrization is None.
Note
This method can/should only be used when the pulse height is constant. Otherwise, the result would be wrong.