/* * 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(); }
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); } }
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(); }
public abstract void DisplayResults(StateOperator @operator, SystemBipartition bipartition);
public abstract void DisplayResults(QuantumState state, SystemBipartition bipartition);
public override void DisplayResults(StateOperator @operator, SystemBipartition bipartition) { Criterion.Evaluate(@operator, bipartition); SetVisuals((ComputableCrossNormCriterion)Criterion); }
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(); }
public override void Evaluate(StateOperator state, SystemBipartition bipartition) { Reshuffle(state, bipartition); Decompose(EvaluatedMatrix); }
//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); }
public abstract void Evaluate(StateOperator state, SystemBipartition bipartition);
//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);