Closed sophiaponte closed 4 years ago
changed the default noise-model initarg of channel-qvm to be a noise-model with an empty set of noise-rules
Is there any risk this could trip up someone who meant to provide a non-empty noise model but forgot?
Is there any risk this could trip up someone who meant to provide a non-empty noise model but forgot?
Yes, I suppose if someone forgot to provide a noise model, the channel-qvm would run with the default empty noise model as if there were no noise.
So I guess an alternative option is to make the noise model a required argument to the qvm -- that way, the noise model will only be empty if the user explicitly wants it so.
210
The channel-qvm expects its :noise-model slot to be a noise-model object, but it's default initarg is nil. This causes errors when a channel-qvm is created without a defined noise-model argument. To fix this I:
changed the default noise-model initarg of
channel-qvm
to be anoise-model
with an empty set of noise-rulesI added a check to
initialize-instance
to ensure that thenoise-model slot of
channel-qvmis of type
noise-model`added checks to a test in
tests/channel-qvm