tangelo.linq.noisy_simulation package

Submodules

tangelo.linq.noisy_simulation.noise_models module

Generic noise model representation and backend-specific translation function. The Backend class is responsible for taking in the generic noise model at runtime and applying it accordingly to the target compute backend.

Only works for simulators supporting noisy simulation.

class tangelo.linq.noisy_simulation.noise_models.NoiseModel

Bases: object

A class representing a noise model. Not specific to any compute backend. The object holds a dictionary mapping each noisy gate to a list of noise that should be applied every time it is encountered in a circuit.

Pauli noise expects a list of 3 probabilities corresponding to X,Y,Z pauli noises (I is deduced from the sum) Depolarization noise is a special case of Pauli noise, where the 3 probabilities are equal: a float is enough. Please check the notebook tutorial in the example section more a more in-depth description of the different noise channels.

add_quantum_error(abs_gate, noise_type, noise_params)

Adds the desired noise to the gate specified by user. Checks if inputs makes sense.

property noisy_gates
tangelo.linq.noisy_simulation.noise_models.get_qiskit_noise_dict(noise_model)

Takes in generic noise model, converts to a dictionary whose keys are the qiskit basis gates supported by the qasm simulator, to the noises, ensuring there are no redundancy / duplicates on the U-gates in particular.

tangelo.linq.noisy_simulation.noise_models.get_qiskit_noise_model(noise_model)

Takes a NoiseModel object as input, returns an equivalent Qiskit Noise Model, compatible with QASM simulator.

Module contents