/**
 * This class creates a 2 dimensional matrix
 * exp(i angle)*diag(1,0)
 * Entries of this matrix can be accessed via getEntry(row, col)
 */
public class OneBitP0PhaseFactor extends OneBitGate{
    private double _angle; //internal angle in radians
    private Complex _phaseFactor;
    
/**
 *
 */
    public OneBitP0PhaseFactor(double angle) {
        _angle = angle;
        _phaseFactor = new Complex(Math.cos(angle), Math.sin(angle));
        _entries[0][0] = _phaseFactor;
        _entries[0][1] = Globals.complexZero;
        _entries[1][0] = Globals.complexZero;
        _entries[1][1] = Globals.complexOne;  
    }
/**
 *
 */
    public double getAngle(){
        return _angle;
    }
/**
 *
 */
    public Complex getPhaseFactor(){
        return _phaseFactor;
    }

/**
 *
 */
    public static void main(String[] args){
        System.out.print(((OneBitGate)(
        	new OneBitP0PhaseFactor(Math.PI))).toString());
        
    }

    
}
