public class LocalCliffordOperator extends Object
Modifier and Type | Field and Description |
---|---|
static LocalCliffordOperator |
H
The Hadamard operator acting on a single qubit.
|
static LocalCliffordOperator |
I
The identity operator acting on a single qubit.
|
static LocalCliffordOperator |
S
The pi/4 phase rotation operator acting on a single qubit.
|
static LocalCliffordOperator |
S_H
The Hermitian conjugate of the pi/4 phase rotation acting on a single qubit.
|
static LocalCliffordOperator |
smiX
The Sqrt(-iX) operator acting on a single qubit.
|
static LocalCliffordOperator |
smiY
The Sqrt(-iY) operator acting on a single qubit.
|
static LocalCliffordOperator |
smiZ
The Sqrt(-iZ) operator acting on a single qubit.
|
static LocalCliffordOperator |
spiX
The Sqrt(+iX) operator acting on a single qubit.
|
static LocalCliffordOperator |
spiY
The Sqrt(+iY) operator acting on a single qubit.
|
static LocalCliffordOperator |
spiZ
The Sqrt(+iZ) operator acting on a single qubit.
|
static LocalCliffordOperator |
X
The Pauli-X operator acting on a single qubit.
|
static LocalCliffordOperator |
Y
The Pauli-Y operator acting on a single qubit.
|
static LocalCliffordOperator |
Z
The Pauli-Z operator acting on a single qubit.
|
Constructor and Description |
---|
LocalCliffordOperator(int code)
Constructor, takes an integer in 0..23.
|
LocalCliffordOperator(int signsymb,
int permsymb)
constructor, takes a sign symbol in 0..3 (for I, X, Y, Z) and a
permutation symbol 0..5 (for A, B, ..., F).
|
Modifier and Type | Method and Description |
---|---|
LocalCliffordOperator |
adjoint()
Returns the Hermitian adjoint of this operator.
|
int |
conjugate(LocalCliffordOperator trans)
Replaces this operator by the conjugation
trans ·
this · trans†
and returns a phase, either +1 if trans is a stabilizer, or -1. |
boolean |
equals(LocalCliffordOperator operator)
Checks whether this LC operator is equal to the specified operator.
|
boolean |
equals(Object o)
Compares the specified object with this local Clifford operator.
|
double[][][] |
getMatrix()
Returns this local Clifford operator as an array representing a 2x2 matrix
of complex numbers.
|
String |
getName()
Returns the name of this local Clifford operator.
|
int |
hashCode()
Returns the hash code for this local Clifford operator.
|
boolean |
isDiagonal()
Returns whether this operator is represented by a diagonal matrix.
|
boolean |
isXY()
Returns whether this operator is the Pauli-X gate or the
Pauli-Y.
|
LocalCliffordOperator |
multiply(LocalCliffordOperator operator)
Muliplies this operator with the specified local Clifford operator.
|
String |
toString()
Returns this operator as a string representation of the 2x2 matrix
representing it.
|
public static final LocalCliffordOperator I
public static final LocalCliffordOperator X
public static final LocalCliffordOperator Y
public static final LocalCliffordOperator Z
public static final LocalCliffordOperator H
public static final LocalCliffordOperator spiZ
public static final LocalCliffordOperator smiZ
public static final LocalCliffordOperator spiY
public static final LocalCliffordOperator smiY
public static final LocalCliffordOperator spiX
public static final LocalCliffordOperator smiX
public static final LocalCliffordOperator S
public static final LocalCliffordOperator S_H
public LocalCliffordOperator(int code)
code
- the code of this operatorpublic LocalCliffordOperator(int signsymb, int permsymb)
signsymb
- the sign symbol of this operatorpermsymb
- the permutation symbol of this operatorpublic String getName()
code | 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 ------------------------------------------------------------------------------- name | IA XA YA ZA IB XB YB ZB IC XC YC ZC ID XD YD ZD IE XE YE ZE IF XF YF ZF usual | I X Y Z S H HS
public int conjugate(LocalCliffordOperator trans)
this
· trans†
and returns a phase, either +1 if trans is a stabilizer, or -1.
A local Clifford operator is a stabilizer if and only if it is
in the Pauli group P1.trans
- the operator which conjugates this operatorIllegalArgumentException
- if this gate is not a Pauli gatepublic LocalCliffordOperator adjoint()
public boolean isXY()
true
if this operator is X or Ypublic boolean isDiagonal()
true
if this operator is represented by a diagonal matrixpublic double[][][] getMatrix()
matrix[row][column][real/imaginary part]with the index ranges
matrix[0..1][0..1][0..1]
.public LocalCliffordOperator multiply(LocalCliffordOperator operator)
operator
- the operator to be multiplied from the rightthis · operator
public boolean equals(LocalCliffordOperator operator)
operator
- the local Clifford operator to be compared with this operatortrue
if and only if both operators are equalpublic String toString()
public boolean equals(Object o)