f1afb5df71893ff2770c7cc7ca83d2ac68f977d7,tests/test_observables.py,MockWaveFunction,psi,#MockWaveFunction#Any#,86

Before Change



    def psi(self, v):
        // vector/tensor of shape (len(v),)
        amplitude = self.amplitude(v)

        // complex vector; shape: (2, len(v))
        psi = torch.zeros((2,) + amplitude.shape).to(
            dtype=torch.double, device=self.device
        )
        psi[0] = amplitude

        // squeeze down to complex scalar if there was only one visible state
        return psi.squeeze()

After Change



    def psi(self, v):
        // vector/tensor of shape (len(v),)
        return cplx.make_complex(self.amplitude(v))


@pytest.fixture(scope="module")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: PIQuIL/QuCumber
Commit Name: f1afb5df71893ff2770c7cc7ca83d2ac68f977d7
Time: 2019-12-28
Author: emerali@users.noreply.github.com
File Name: tests/test_observables.py
Class Name: MockWaveFunction
Method Name: psi


Project Name: PIQuIL/QuCumber
Commit Name: 10bdd46d76d35cfba3a484b007ea3e14af801813
Time: 2019-12-09
Author: emerali@users.noreply.github.com
File Name: qucumber/nn_states/positive_wavefunction.py
Class Name: PositiveWaveFunction
Method Name: psi


Project Name: PIQuIL/QuCumber
Commit Name: 5b6d66cc2cca191b33e4e532315edd281ddb1436
Time: 2018-08-17
Author: emerali@users.noreply.github.com
File Name: qucumber/nn_states/complex_wavefunction.py
Class Name: ComplexWavefunction
Method Name: psi