Qubit¶ class guppyft.code.steane.logical.Qubit[source]¶ A logical qubit encoded in the Steane code. Constructing a Qubit instance prepares it in the logical zero state. static __new__()[source]¶ Prepare a logical qubit in the zero state. Return type: Qubit free()[source]¶ Free the qubit. Return type: None h()[source]¶ H gate. Return type: None measure_z()[source]¶ Destructive measurement of the qubit in the Z basis. Return type: Measurement qec_cycle()[source]¶ Perform a QEC cycle on the logical qubit. Return type: None s()[source]¶ S gate. Return type: None sdg()[source]¶ Sdg gate. Return type: None t()[source]¶ Apply a logical \(T\) gate using magic-state injection. Return type: None tdg()[source]¶ Apply a logical \(T^\dagger\) gate using magic-state injection. Return type: None x()[source]¶ X gate. Return type: None y()[source]¶ Y gate. Return type: None z()[source]¶ Z gate. Return type: None