예제 #1
0
        /*
         * public PPTCriterion(QuantumState state)
         * {
         *  State = state;
         *  StateOperator = StateOperator.FromQuantumState(state);
         * }
         *
         * public PPTCriterion(StateOperator @operator)
         * {
         *  StateOperator = @operator;
         * }
         */



        public void Evaluate(StateOperator state, SystemBipartition bipartition)
        {
            EvaluatedMatrix = state.PartialTranspose(bipartition);
            Evd <Complex> evd = EvaluatedMatrix.Matrix.Evd();

            Eigenvalues = evd.EigenValues.ToArray();
        }
예제 #2
0
        private void Reshuffle(StateOperator state, SystemBipartition bipartition)
        {
            EvaluatedMatrix = new Transformation(CreateMatrix.Dense <Complex>(state.RowDimension, state.ColumnDimension));
            int rowOffset = 0, columnOffset = 0;

            for (int i = 0; i < state.RowDimension; i++)
            {
                int reshRowStart = rowOffset * bipartition.DimensionA, reshColumnStart = columnOffset * bipartition.DimensionB;
                int reshRowIterator = reshRowStart, reshColumnIterator = reshColumnStart;
                int reshColumnLimit = reshColumnStart + bipartition.DimensionB;
                for (int j = 0; j < state.RowDimension; j++)
                {
                    EvaluatedMatrix[reshRowIterator, reshColumnIterator] = state[i, j];
                    reshColumnIterator++;
                    if (reshColumnIterator == reshColumnLimit)
                    {
                        reshColumnIterator = reshColumnStart;
                        reshRowIterator++;
                    }
                }
                columnOffset++;
                if (columnOffset == bipartition.DimensionA)
                {
                    columnOffset = 0;
                    rowOffset++;
                }
            }
        }
 public override void Evaluate(QuantumState state, SystemBipartition bipartition)
 {
     if (state.Size == 1)
     {
         SigmaRank = 1;
     }
     else
     {
         EvaluatedMatrix = Transformation.FromStateRowWise(state, bipartition);
         Decompose(EvaluatedMatrix);
     }
 }
예제 #4
0
        private void Qubits_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            //if(!EvaluationAvailable) { sizeChosen = true; CanEvaluate(); }
            if (!Partition.IsEnabled)
            {
                Partition.IsEnabled = true;
            }
            int selectedPartition = Partition.SelectedIndex;
            int qubits            = (int)Qubits.SelectedItem;

            Bipartition = new SystemBipartition(qubits);
            SetPartitions();
            Partition.SelectedIndex =
                (selectedPartition >= Partition.Items.Count) ||
                (selectedPartition == -1) ? 0 : selectedPartition;
            ResizeDefinitionMatrix();
        }
예제 #5
0
 public abstract void DisplayResults(StateOperator @operator, SystemBipartition bipartition);
예제 #6
0
 public abstract void DisplayResults(QuantumState state, SystemBipartition bipartition);
예제 #7
0
 public override void DisplayResults(StateOperator @operator, SystemBipartition bipartition)
 {
     Criterion.Evaluate(@operator, bipartition);
     SetVisuals((ComputableCrossNormCriterion)Criterion);
 }
예제 #8
0
 public override void DisplayResults(QuantumState state, SystemBipartition bipartition)
 {
     DisplayResults(StateOperator.FromQuantumState(state), bipartition);
 }
        //public SchmidtDecomposition(QuantumState state) : base(state) { }


        public override void Evaluate(StateOperator state, SystemBipartition bipartition)
        {
            throw new NotImplementedException();
        }
예제 #10
0
 public override void Evaluate(StateOperator state, SystemBipartition bipartition)
 {
     Reshuffle(state, bipartition);
     Decompose(EvaluatedMatrix);
 }
예제 #11
0
        //public ComputableCrossNormCriterion(QuantumState state) : base(state) { }


        //public ComputableCrossNormCriterion(StateOperator @operator) : base(@operator) { }


        public override void Evaluate(QuantumState state, SystemBipartition bipartition)
        {
            Evaluate(StateOperator.FromQuantumState(state), bipartition);
        }
 public override void DisplayResults(StateOperator @operator, SystemBipartition bipartition)
 {
     throw new NotImplementedException();
 }
 public override void DisplayResults(QuantumState state, SystemBipartition bipartition)
 {
     Criterion.Evaluate(state, bipartition);
     SetVisuals((SchmidtDecomposition)Criterion);
 }
예제 #14
0
 public abstract void Evaluate(StateOperator state, SystemBipartition bipartition);
예제 #15
0
        //public QuantumState State { get; private set;}

        //public StateOperator StateOperator { get; private set; }

        /*
         * public SvdEntanglementCriterion(QuantumState state)
         * {
         *  State = state;
         *  StateOperator = StateOperator.FromQuantumState(state);
         * }
         *
         * public SvdEntanglementCriterion(StateOperator state)
         * {
         *  StateOperator = state;
         * }
         */

        public abstract void Evaluate(QuantumState state, SystemBipartition bipartition);