57d419c21650c6bad57ba7ac6b3b14a219b16a3a,qucumber/complex_wavefunction.py,ComplexWavefunction,generate_hilbert_space,#ComplexWavefunction#Any#,227

Before Change


                d = i
                for j in range(size):
                    d, r = divmod(d, 2)
                    space[i, size - j - 1] = int(r)
            return space

    def compute_normalization(self):
        rCompute the normalization constant of the wavefunction.

After Change


        if (size > self.size_cut):
            raise ValueError("Size of the Hilbert space too large!")
        else:
            d = np.arange(2 ** size)
            space = (((d[:, None] & (1 << np.arange(size)))) > 0)[:, ::-1]
            space = space.astype(int)
            return torch.tensor(space, dtype=torch.double, device=self.device)

    def compute_normalization(self):
        rCompute the normalization constant of the wavefunction.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: PIQuIL/QuCumber
Commit Name: 57d419c21650c6bad57ba7ac6b3b14a219b16a3a
Time: 2018-08-09
Author: emerali@users.noreply.github.com
File Name: qucumber/complex_wavefunction.py
Class Name: ComplexWavefunction
Method Name: generate_hilbert_space


Project Name: deepfakes/faceswap
Commit Name: d93e7b11140c11b43113686849a1c5c74d3a06f2
Time: 2019-10-18
Author: 36920800+torzdf@users.noreply.github.com
File Name: plugins/extract/align/_base.py
Class Name: Aligner
Method Name: finalize


Project Name: PIQuIL/QuCumber
Commit Name: 57d419c21650c6bad57ba7ac6b3b14a219b16a3a
Time: 2018-08-09
Author: emerali@users.noreply.github.com
File Name: qucumber/positive_wavefunction.py
Class Name: PositiveWavefunction
Method Name: generate_hilbert_space