9cd25caa97a5b33afa8d2b3a069e468a5632c21b,qucumber/observables/pauli.py,SigmaY,apply,#SigmaY#Any#Any#,87

Before Change



        // take real part (imaginary part should be approximately zero)
        // and divide by number of spins
        return cplx.real(psi_ratio_sum).div_(samples.shape[-1])


class SigmaZ(ObservableBase):
    rThe :math:`\sigma_z` observable.

After Change



        // take real part (imaginary part should be approximately zero)
        // and divide by number of spins
        res = cplx.real(psi_ratio_sum).div_(samples.shape[-1])
        if self.absolute:
            return res.abs_()
        else:
            return res


class SigmaZ(ObservableBase):
    rThe :math:`\sigma_z` observable.

    Computes the magnetization in the Z direction of a spin chain.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: PIQuIL/QuCumber
Commit Name: 9cd25caa97a5b33afa8d2b3a069e468a5632c21b
Time: 2019-04-28
Author: emerali@users.noreply.github.com
File Name: qucumber/observables/pauli.py
Class Name: SigmaY
Method Name: apply


Project Name: PIQuIL/QuCumber
Commit Name: 9cd25caa97a5b33afa8d2b3a069e468a5632c21b
Time: 2019-04-28
Author: emerali@users.noreply.github.com
File Name: qucumber/observables/pauli.py
Class Name: SigmaX
Method Name: apply


Project Name: PIQuIL/QuCumber
Commit Name: 78c122a2e07c1800378dab6006b72940a16d602e
Time: 2019-04-27
Author: emerali@users.noreply.github.com
File Name: qucumber/observables/pauli.py
Class Name: SigmaZ
Method Name: apply