internal void AddNewQubit() { int newRow = _qubits.Count; QubitModel newQubit = QubitModel.Zero; _qubits.Add(newQubit); }
public void ChangeValue(object parameter) { QubitModel old = Value; if (old == QubitModel.Zero) { Value = QubitModel.One; } else { Value = QubitModel.Zero; } _model.Registers[_registerIndex].ResetQubit(_rowIndex, old); }
public void ResetQubit(int position, QubitModel oldValue) { if (oldValue == QubitModel.Unknown) { for (int i = 0; i < _qubits.Count; i++) { QubitModel q = _qubits[i]; if (q == QubitModel.Unknown) { _qubits[i] = QubitModel.Zero; } } UpdateInitStates(); } else { UpdateInitStates(position); } }
internal void InsertQubit(int position) { QubitModel newQubit = QubitModel.Zero; _qubits.Insert(position, newQubit); }