old/python/main.py
def CZ(self):
        """
        n wire CZ, CZ acts on n wires only to modify
        last ancilla qubit
        matrix will be in the form
        1 0 0 0 ... 0
        0 1 0 0 ... 0
        0 0 1 0 ... 0
        .     .
        .       .
        .         .
                   1 0
        0 ...      0-1


        """
        I = np.identity(2**self._n)
        I[2**self._n - 1, 2**self._n -1] -= 2
        return I

        n wire CZ, CZ acts on n wires only to modify
        last ancilla qubit
        matrix will be in the form
        1 0 0 0 ... 0
        0 1 0 0 ... 0
        0 0 1 0 ... 0
        .     .
        .       .
        .         .
                   1 0
        0 ...      0-1


        
n wire CZ, CZ acts on n wires only to modify
last ancilla qubit
matrix will be in the form
1 0 0 0 ...
n wire CZ CZ acts on n wires only to modify last ancilla qubit matrix will be in the form 1 0 0 0 ...
def CZ(self):
        I = np.identity(2**self._n)
        I[2**self._n - 1, 2**self._n -1] -= 2
        return I
def CZ ( self ) : I = np . identity ( 2 ** self . _n ) I [ 2 ** self . _n - 1 , 2 ** self . _n - 1 ] -= 2 return I
n wire CZ, CZ acts on n wires only to modify
last ancilla qubit
matrix will be in the form
1 0 0 0 ... 0
0 1 0 0 ... 0
0 0 1 0 ... 0
.
n wire CZ CZ acts on n wires only to modify last ancilla qubit matrix will be in the form 1 0 0 0 ... 0 0 1 0 0 ... 0 0 0 1 0 ... 0 .
"""
        n wire CZ, CZ acts on n wires only to modify
        last ancilla qubit
        matrix will be in the form
        1 0 0 0 ... 0
        0 1 0 0 ... 0
        0 0 1 0 ... 0
        .     .
        .       .
        .         .
                   1 0
        0 ...      0-1


        """
self