edu.buffalo.fs7.mathlib
Class Decoherence
java.lang.Object
|
+--edu.buffalo.fs7.mathlib.MathObject
|
+--edu.buffalo.fs7.mathlib.MathMap
|
+--edu.buffalo.fs7.mathlib.Decoherence
- All Implemented Interfaces:
- java.lang.Cloneable
- public class Decoherence
- extends MathMap
class representing the effect of decoherence. The decoherence model implemented is
assuming that at every time a decoherence effect is about to occur a random qubit
interacts with an environmental qubit through the following process:
|0>|0> --> |0>|0> and |1>|0> --> sqrt(p)|1>|0> + sqrt(1-p)|0>|1>
where p is the probability that the qubit stays in the state |1> and 1-p the
probability that it decays to |0>. After a decay the state is renormalized.
The underlying assumption is that the state |1> is higher energetic than |0> and
therefore a decay is possible.
|
Constructor Summary |
Decoherence()
create a measurement map for a full measurement |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
presetQubit
public static int presetQubit
Decoherence
public Decoherence()
- create a measurement map for a full measurement
apply
public MathObject apply(double rate,
double decay,
MathObject o)
apply
public MathObject apply(MathObject o)
- applies a decoherence step to a ket vector. In this method a random number is
generated and compared to the error rate per gate (this value right now is
obtained from the circuit_properties variable). If the random number is smaller
the method decohere is called with a random qubit and the decay
probability specified by the ciruit_properties variable.
- Overrides:
apply in class MathMap
- Parameters:
o - Braket
decohere
public static boolean decohere(Braket q,
double p,
int qubit)
- this method decoheres a given qubit in the ket given as well. With probablity
p the qubit remains in state |1>. The state is renormailzed afterwards.
- Parameters:
q - ket vectorp - probability for the state |1> remaining in |1>qubit - the qubit to decohere- Returns:
- true if a decay occured
- See Also:
BinaryOp.implicitApply(Gate, Braket, Matrix)
getLastDecoheredQubit
public static int getLastDecoheredQubit()
- returns the last decohered qubit. -1 if nothing happend during last decoherence
step
decayOccurred
public static boolean decayOccurred()
- returns true if at the last operation the qubit decayed
toString
public java.lang.String toString()
- string representation of the decoherence map
- Overrides:
toString in class MathObject
- Following copied from class:
edu.buffalo.fs7.mathlib.MathObject
- See Also:
MathObject.toParseableString()