code: def likelihood(self, outcomes, modelparams, expparams):
          
          
          # By calling the superclass implementation, we can consolidate
          # call counting there.
          super(QubitStatePauliModel, self).likelihood(outcomes, modelparams, expparams)
          
          # Note that expparams['axis'] has shape (n_exp, 3).
          pr0 = 0.5*(1 + np.sum(modelparams*expparams['axis'],1))
          
          # Note that expparams['vis'] has shape (n_exp, ).
          pr0 = expparams['vis'] * pr0 + (1 - expparams['vis']) * 0.5
  
          pr0 = pr0[:,np.newaxis]
  
          # Now we concatenate over outcomes.
          return Model.pr0_to_likelihood_array(outcomes, pr0)
docs: Calculates the likelihood function at the states specified 
          by modelparams and measurement specified by expparams.
          This is given by the Born rule and is the probability of
          outcomes given the state and measurement operator.
          
          Parameters
          ----------
          outcomes = 
              measurement outcome
          expparams = 
              Bloch vector of measurement axis and visibility
          modelparams = 
              quantum state Bloch vector