public Qubit(double zeroProbability) { if (zeroProbability < 0 || zeroProbability > 1) { throw new ArgumentException("probability should be between 0 and 1 included"); } State = new QuantumState(zeroProbability, 1 - zeroProbability); StateOperator = StateOperator.FromQuantumState(State); }
public Qubit(Complex zeroAmplitude, Complex oneAmplitude) { State = new QuantumState(zeroAmplitude, oneAmplitude); StateOperator = StateOperator.FromQuantumState(State); }
public Qubit(Qubit qubit) { State = new QuantumState(qubit.State); StateOperator = new StateOperator(qubit.StateOperator); }