10bdd46d76d35cfba3a484b007ea3e14af801813,qucumber/nn_states/positive_wavefunction.py,PositiveWaveFunction,psi,#PositiveWaveFunction#Any#,122

Before Change


        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
        return psi

    def gradient(self, v):
        rCompute the gradient of the effective energy for a batch of states.

After Change


        :rtype: torch.Tensor
        
        // vector/tensor of shape (2, len(v))
        return cplx.make_complex(self.amplitude(v))

    def gradient(self, v):
        rCompute the gradient of the effective energy for a batch of states.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


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: db073909d05ae6f91b7abd8d6251bfa247349447
Time: 2019-12-31
Author: emerali@users.noreply.github.com
File Name: qucumber/utils/cplx.py
Class Name:
Method Name: conjugate


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