bloqade.qasm2.passes.noise.NoisePass
← Module overview
class
method
method
classNoisePass¶source
bloqade.qasm2.passes.noise.NoisePass
Bases: Pass
Apply a noise model to a quantum circuit.
Signature
class NoisePass(noise_model: noise.MoveNoiseModelABC = noise.TwoRowZoneModel())NOTE: This pass is not guaranteed to be supported long-term in bloqade. We will be moving towards a more general approach to noise modeling in the future.
Usage examples
Section titled “Usage examples”from bloqade import qasm2from bloqade.qasm2.passes import NoisePass
@qasm2.extendeddef main(): q = qasm2.qreg(2) qasm2.h(q[0]) qasm2.cx(q[0], q[1]) return q
# simple IR without any nosiemain.print()
noise_pass = NoisePass(noise_main)
# rewrite stuff in-placenoise_pass.unsafe_run(main)
# now, we do have noise channels in the IRmain.print()Parameters
| Name | Type | Default | Description |
|---|---|---|---|
noise_model | noise.MoveNoiseModelABC | noise.TwoRowZoneModel() |
Attributes
| Name | Type | Default | Description |
|---|---|---|---|
noise_model | noise.MoveNoiseModelABC | field(default_factory=(noise.TwoRowZoneModel)) | |
address_analysis | address.AddressAnalysis | field(init=False) |
methodget_qubit_values¶source
bloqade.qasm2.passes.noise.NoisePass.get_qubit_values
methodunsafe_run¶source
bloqade.qasm2.passes.noise.NoisePass.unsafe_run