97e9a9150f778aa4f280d676ba4c74423280aa14,cirq/ops/common_gates.py,CZPowGate,_act_on_,#CZPowGate#Any#,957

Before Change


        from cirq.sim import clifford

        if isinstance(args, clifford.ActOnCliffordTableauArgs):
            if protocols.is_parameterized(self) or self.exponent % 1 != 0:
                return NotImplemented
            tableau = args.tableau
            q1 = args.axes[0]
            q2 = args.axes[1]
            if self._exponent % 2 == 1:
                (tableau.xs[:, q2], tableau.zs[:, q2]) = (
                    tableau.zs[:, q2].copy(),
                    tableau.xs[:, q2].copy(),
                )
                tableau.rs[:] ^= (
                    tableau.xs[:, q1] & tableau.zs[:, q2] & (tableau.xs[:, q2] ^ tableau.zs[:, q1])
                )
                tableau.xs[:, q2] ^= tableau.xs[:, q1]
                tableau.zs[:, q1] ^= tableau.zs[:, q2]
                (tableau.xs[:, q2], tableau.zs[:, q2]) = (
                    tableau.zs[:, q2].copy(),
                    tableau.xs[:, q2].copy(),
                )
                tableau.rs[:] ^= tableau.xs[:, q2] & tableau.zs[:, q2]
            return True

        if isinstance(args, clifford.ActOnStabilizerCHFormArgs):
            if protocols.is_parameterized(self) or self.exponent % 1 != 0:
                return NotImplemented
            q1 = args.axes[0]
            q2 = args.axes[1]
            state = args.state

After Change


        from cirq.sim import clifford

        if isinstance(args, clifford.ActOnCliffordTableauArgs):
            if not protocols.has_stabilizer_effect(self):
                return NotImplemented
            tableau = args.tableau
            q1 = args.axes[0]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 6

Non-data size: 11

Instances


Project Name: quantumlib/Cirq
Commit Name: 97e9a9150f778aa4f280d676ba4c74423280aa14
Time: 2021-02-01
Author: smitsanghavi@users.noreply.github.com
File Name: cirq/ops/common_gates.py
Class Name: CZPowGate
Method Name: _act_on_


Project Name: quantumlib/Cirq
Commit Name: 97e9a9150f778aa4f280d676ba4c74423280aa14
Time: 2021-02-01
Author: smitsanghavi@users.noreply.github.com
File Name: cirq/ops/common_gates.py
Class Name: CXPowGate
Method Name: _act_on_


Project Name: quantumlib/Cirq
Commit Name: 97e9a9150f778aa4f280d676ba4c74423280aa14
Time: 2021-02-01
Author: smitsanghavi@users.noreply.github.com
File Name: cirq/ops/common_gates.py
Class Name: ZPowGate
Method Name: _act_on_


Project Name: quantumlib/Cirq
Commit Name: 97e9a9150f778aa4f280d676ba4c74423280aa14
Time: 2021-02-01
Author: smitsanghavi@users.noreply.github.com
File Name: cirq/ops/common_gates.py
Class Name: XPowGate
Method Name: _act_on_


Project Name: quantumlib/Cirq
Commit Name: 97e9a9150f778aa4f280d676ba4c74423280aa14
Time: 2021-02-01
Author: smitsanghavi@users.noreply.github.com
File Name: cirq/ops/common_gates.py
Class Name: YPowGate
Method Name: _act_on_


Project Name: quantumlib/Cirq
Commit Name: 97e9a9150f778aa4f280d676ba4c74423280aa14
Time: 2021-02-01
Author: smitsanghavi@users.noreply.github.com
File Name: cirq/ops/common_gates.py
Class Name: HPowGate
Method Name: _act_on_


Project Name: quantumlib/Cirq
Commit Name: 97e9a9150f778aa4f280d676ba4c74423280aa14
Time: 2021-02-01
Author: smitsanghavi@users.noreply.github.com
File Name: cirq/ops/common_gates.py
Class Name: CZPowGate
Method Name: _act_on_