private Register Init(Quantum.Register reg) { RegisterModel regModel = new RegisterModel( _model.Registers.Count, 0, reg.Width, reg.GetAmplitudes()); if (_quantumRoot == null) { _quantumRoot = _comp.GetRootRegister(reg); } else { _quantumRoot = _comp.GetRootRegister(_quantumRoot, reg); } _parserRoot = new Register(_model, _quantumRoot, null, 0); _listenToModelChanges = false; _model.AddRegister(regModel); _listenToModelChanges = true; return(new Register(_model, reg, regModel)); }