Logical Operations for the Steane Code
Today, I want to discuss how to obtain a universal set of gates for the Steane code.
Previously, we discussed Gottesman's method for constructing the encoded and logical operations for stabilizer codes.
cd = stac.CommonCodes.generate_code('[[7,1,3]]')
print('encoded X =')
print('encoded Z =')
encoded X =
encoded Z =
There are many other -qubit Pauli operators that can act as and . A nicer choice is
Recall that the Clifford group is generated from the operations . We will first show how to find the logical
The Hadamard gate is also transversal (no two qubit gate between the qubits of a single block). It is Why do we know this works? We can check that , and that , which are the required relations that must obey.
logicalH = stac.Circuit()
for i in range(7):
The gate is also transversal and actually just made of seven gates. Let us have two logical qubits, and designate one as control and the other as target. Let the physical qubits of the control logical qubits be indexed by and those of the target logical qubit be indexed by . Then
To check that this works, we have to verify the conjgation relations that we had previously.
Exercise: check that the satisfies these conjugation relations.
logicalCX = stac.Circuit()
for i in range(7):
The gate is the gate, but is often defined in a nicer fashion with an overall phase factor as
Exercise: Compute the conjugacy relations of i.e. for .
Exercise: Verify that the defined satisfies the conjugacy relations that should have.
The Clifford gate set does not allow us to do universal quantum computation, but the addition of the gate will. The gate is or
For the Steane code, it's not possible to create a transversal gate on an encoded qubit. The way to obtain the gate is via magic states. The relevant magic state in our case is This state is used in the following circuit, where be some unknown state on which we want to apply the gate, i.e we want .
Let's evaluate to make sure everything works. Starting with , if we apply the gate from the first qubit to the second, we obtain, Next, we measure the second qubit in the basis. We either obtain and the first qubit is left in the state or we obtain and the first qubit is left in the state In the first case, we have obtained the desired state. In the second case, if we just apply, to the state, we obtain .
In summary, if it is possible to create a state, one can apply a gate to any state using just Clifford operations.
Creating the state
One can probabilistically create the state. The circuit for it is given below, where the second control gate is a gate.
Tstateprep = stac.Circuit()
Tstateprep.append('CX', 1, 0)
Tstateprep.append('cp(pi/2)', 1, 0)
# an iteration that yielded 0 for the measurement
# an iteration that yielded 1 for the measurement
Exercise: Evaluate this circuit by hand to show that if the measurement outcome is , then the first qubit will be in the state.
If instead the measurement outcome is , then we apply the operator to correct the state.