qutip_qip.noise

Noise of quantum hardware.

Classes

Noise()

The base class representing noise in a processor.

ControlAmpNoise(coeff[, tlist, indices])

The noise in the amplitude of the control pulse.

RelaxationNoise([t1, t2, targets])

The decoherence on each qubit characterized by two time scales t1 and t2.

DecoherenceNoise(c_ops[, targets, coeff, ...])

The decoherence noise in a processor.

RandomNoise(dt, rand_gen[, indices])

Random noise in the amplitude of the control pulse.

ZZCrossTalk(params)

An always-on ZZ cross talk noise with the corresponding coefficient on each pair of qubits.

class qutip_qip.noise.ControlAmpNoise(coeff, tlist=None, indices=None)[source]

Bases: Noise

The noise in the amplitude of the control pulse.

Parameters
coeff: list

A list of the coefficients for the control Hamiltonians. For available choices, see qutip.QobjEvo.

tlist: array_like, optional

A NumPy array specifies the time of each coefficient.

indices: list of int, optional

The indices of target pulse in the list of pulses.

Attributes
coeff: list

A list of the coefficients for the control Hamiltonians. For available choices, see qutip.QobjEvo.

tlist: array_like

A NumPy array specifies the time of each coefficient.

indices: list of int

The indices of target pulse in the list of pulses.

get_noisy_pulses(dims=None, pulses=None, systematic_noise=None)[source]

Return the input pulses list with noise added and the pulse independent noise in a dummy Pulse object. This is a template method, a method with the same name and signatures needs to be defined in the subclasses.

Parameters
dims: list, optional

The dimension of the components system, the default value is [2,2…,2] for qubits system.

pulseslist of Pulse

The input pulses. The noise will be added to pulses in this list.

systematic_noisePulse

The dummy pulse with no ideal control element.

Returns
noisy_pulses: list ofclass:.Pulse

Noisy pulses.

systematic_noisePulse

The dummy pulse representing pulse-independent noise.

class qutip_qip.noise.DecoherenceNoise(c_ops, targets=None, coeff=None, tlist=None, all_qubits=False)[source]

Bases: Noise

The decoherence noise in a processor. It generates lindblad noise according to the given collapse operator c_ops.

Parameters
c_opsqutip.Qobj or list

The Hamiltonian representing the dynamics of the noise.

targets: int or list, optional

The indices of qubits that are acted on. Default is on all qubits

coeff: list, optional

A list of the coefficients for the control Hamiltonians.

tlist: array_like, optional

A NumPy array specifies the time of each coefficient.

all_qubits: bool, optional

If c_ops contains only single qubits collapse operator, all_qubits=True will allow it to be applied to all qubits.

Attributes
c_opsqutip.Qobj or list

The Hamiltonian representing the dynamics of the noise.

targets: int or list

The indices of qubits that are acted on.

coeff: list

A list of the coefficients for the control Hamiltonians.

tlist: array_like

A NumPy array specifies the time of each coefficient.

all_qubits: bool

If c_ops contains only single qubits collapse operator, all_qubits=True will allow it to be applied to all qubits.

get_noisy_pulses(dims=None, pulses=None, systematic_noise=None)[source]

Return the input pulses list with noise added and the pulse independent noise in a dummy Pulse object.

Parameters
dims: list, optional

The dimension of the components system, the default value is [2, 2, …, 2] for a system of qubits.

pulseslist of Pulse

The input pulses. The noise will be added to pulses in this list.

systematic_noisePulse

The dummy pulse with no ideal control element.

Returns
noisy_pulses: list ofclass:.Pulse

Noisy pulses.

systematic_noisePulse

The dummy pulse representing pulse-independent noise.

class qutip_qip.noise.Noise[source]

Bases: object

The base class representing noise in a processor. The noise object can be added to device.Processor and contributes to evolution.

get_noisy_pulses(dims=None, pulses=None, systematic_noise=None)[source]

Return the input pulses list with noise added and the pulse independent noise in a dummy Pulse object. This is a template method, a method with the same name and signatures needs to be defined in the subclasses.

Parameters
dims: list, optional

The dimension of the components system, the default value is [2,2…,2] for qubits system.

pulseslist of Pulse

The input pulses. The noise will be added to pulses in this list.

systematic_noisePulse

The dummy pulse with no ideal control element.

Returns
noisy_pulses: list ofclass:.Pulse

Noisy pulses.

systematic_noisePulse

The dummy pulse representing pulse-independent noise.

class qutip_qip.noise.RandomNoise(dt, rand_gen, indices=None, **kwargs)[source]

Bases: ControlAmpNoise

Random noise in the amplitude of the control pulse. The arguments for the random generator need to be given as key word arguments.

Parameters
dt: float, optional

The time interval between two random amplitude. The coefficients of the noise are the same within this time range.

rand_gen: numpy.random, optional

A random generator in numpy.random, it has to take a size parameter as the size of random numbers in the output array.

indices: list of int, optional

The indices of target pulse in the list of pulses.

**kwargs:

Key word arguments for the random number generator.

Examples

>>> gaussnoise = RandomNoise(             dt=0.1, rand_gen=np.random.normal, loc=mean, scale=std)             
Attributes
dt: float, optional

The time interval between two random amplitude. The coefficients of the noise are the same within this time range.

rand_gen: numpy.random, optional

A random generator in numpy.random, it has to take a size parameter.

indices: list of int

The indices of target pulse in the list of pulses.

**kwargs:

Key word arguments for the random number generator.

get_noisy_pulses(dims=None, pulses=None, systematic_noise=None)[source]

Return the input pulses list with noise added and the pulse independent noise in a dummy Pulse object.

Parameters
dims: list, optional

The dimension of the components system, the default value is [2,2…,2] for qubits system.

pulseslist of Pulse

The input pulses. The noise will be added to pulses in this list.

systematic_noisePulse

The dummy pulse with no ideal control element.

Returns
noisy_pulses: list ofclass:.Pulse

Noisy pulses.

systematic_noisePulse

The dummy pulse representing pulse-independent noise.

class qutip_qip.noise.RelaxationNoise(t1=None, t2=None, targets=None)[source]

Bases: Noise

The decoherence on each qubit characterized by two time scales t1 and t2.

Parameters
t1: float or list, optional

Characterize the decoherence of amplitude damping for each qubit.

t2: float or list, optional

Characterize the decoherence of dephasing for each qubit.

targets: int or list, optional

The indices of qubits that are acted on. Default is on all qubits

Attributes
t1: float or list

Characterize the decoherence of amplitude damping for each qubit.

t2: float or list

Characterize the decoherence of dephasing for each qubit.

targets: int or list

The indices of qubits that are acted on.

get_noisy_pulses(dims=None, pulses=None, systematic_noise=None)[source]

Return the input pulses list with noise added and the pulse independent noise in a dummy Pulse object.

Parameters
dims: list, optional

The dimension of the components system, the default value is [2,2…,2] for qubits system.

pulseslist of Pulse

The input pulses. The noise will be added to pulses in this list.

systematic_noisePulse

The dummy pulse with no ideal control element.

Returns
noisy_pulses: list ofclass:.Pulse

Noisy pulses.

systematic_noisePulse

The dummy pulse representing pulse-independent noise.

class qutip_qip.noise.ZZCrossTalk(params)[source]

Bases: Noise

An always-on ZZ cross talk noise with the corresponding coefficient on each pair of qubits. The operator acts only one the lowerest two levels and is 0 on higher level. Equivalent to tensor(sigmaz(), sigmaz()).

Parameters
params:

Parameters computed from a SCQubits.

get_noisy_pulses(dims=None, pulses=None, systematic_noise=None)[source]

Return the input pulses list with noise added and the pulse independent noise in a dummy Pulse object.

Parameters
dims: list, optional

The dimension of the components system, the default value is [2,2…,2] for qubits system.

pulseslist of Pulse

The input pulses. The noise will be added to pulses in this list.

systematic_noisePulse

The dummy pulse with no ideal control element.

Returns
noisy_pulses: list ofclass:.Pulse

Noisy pulses.

systematic_noisePulse

The dummy pulse representing pulse-independent noise.

qutip_qip.noise.process_noise(pulses, noise_list, dims, t1=None, t2=None, device_noise=False, spline_kind=None)[source]

Apply noise to the input list of pulses. It does not modify the input pulse, but return a new one containing the noise.

Parameters
pulses: list ofclass:.Pulse

The input pulses, on which the noise object will be applied.

noise_list: list ofclass:.Noise

A list of noise objects.

dims: int or list

Dimension of the system. If int, we assume it is the number of qubits in the system. If list, it is the dimension of the component systems.

t1: float or list, optional

Characterize the decoherence of amplitude damping for each qubit. A list of size N or a float for all qubits.

t2: float or list, optional

Characterize the decoherence of dephasing for each qubit. A list of size N or a float for all qubits.

device_noise: bool

If pulse independent noise such as relaxation are included. Default is False.

Returns
noisy_pulses: list ofclass:.Pulse

The noisy pulses, including the system noise.