RPNG#
- class tqec.plaquette.RPNG(r, p, n, g)[source]#
Bases:
object
Organize a single RPNG value
-z1- rpng
(r) data qubit reset basis or h or - (p) data basis for the controlled operation (x means CNOT controlled on the ancilla and targeting the data qubit, y means CY, z means CZ) (n) time step (positive integers, all distinct, typically in 1-5) (g) data qubit measure basis or h or -
Assumptions on the circuit: - if not otherwise stated, a basis can be {x,y,z} - the ancilla is always the control qubit for the CNOT, CY, or CZ gates - time step of r same as ancilla reset (always 0) - time step of g same as ancilla measurement (by default 6)
- Parameters:
r (ExtendedBasisEnum | None)
p (BasisEnum | None)
n (int | None)
g (ExtendedBasisEnum | None)
- r data qubit reset basis or h or -
- p data basis for the controlled operation
- Type:
assuming a=z, x means CNOT controlled on the ancilla and targeting the data qubit, y means CY, z means CZ
- n time step
- Type:
positive integers, all distinct, typically in 1-5
- g data qubit measure basis or h or -
Methods
__init__
(r, p, n, g)from_string
(rpng_string)Initialize the RPNG object from a 4-character string
get_g_op
()Get the measurement operation or Hadamard
get_r_op
()Get the reset operation or Hadamard
Attributes
is_null
Check if the RPNG object is null, i.e. all fields are None.
r
p
n
g
Detailed methods
- __init__(r, p, n, g)#
- Parameters:
r (ExtendedBasisEnum | None)
p (BasisEnum | None)
n (int | None)
g (ExtendedBasisEnum | None)
- Return type:
None