Repository navigation
changing the default :initarg of channel-qvm to be valid - #211
Conversation
…l. Also, adding a check-type to ensure that the noise-model argument of a channel-qvm is a valid noise model. Adding tests for this change.
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. |
appleby
left a comment
There was a problem hiding this comment.
Normally I would lean towards Zach's suggestion to make noise-model a required argument, but all the other noisy qvm types seem to default to "empty noise" if a caller doesn't provide any noise, so I think it's reasonable for channel-qvm to follow suit here.
#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-qvmto be anoise-modelwith an empty set of noise-rulesI added a check to
initialize-instanceto ensure that thenoise-model slot ofchannel-qvmis of typenoise-model`added checks to a test in
tests/channel-qvm