1. A method for generating at least one high fidelity resource state, the method comprising: selecting a classical code in which all of the codewords associated with the code have a weight of zero mod 2g, where g is a positive integer power of two; puncturing the classical code such that a first set of generators retains a weight of zero mod 2g and a second set of generators has a weight of 2g−1 mod 2g; mapping the first set of generators to a set of stabilizer generators; mapping the second set of generators to a set of logical operators; preparing a set of relatively low fidelity resource states in a plurality of physical qubits; performing a decoding process, according to a quantum code represented by the set of stabilizer generators and the set of logical operators, on the physical qubits; and performing, on a set of the physical qubits, measurements whose values correspond to stabilizers of the quantum code to provide a set of measurement values.