RPNG#
- class tqec.plaquette.RPNG(r, p, n, g)[source]#
Bases:
objectRepresent a single
RPNGstring.## Format specification
The
RPNGstring is a standard format used intqecto unambiguously describe the action(s) being performed on a single data qubit. It is a 4-character string. See each attribute docstring for more details on the possible values for each character.## Example
The following
-z1- rpng
represents a data-qubit with a
CZgate applied at timestep1.- Parameters:
r (ExtendedBasis | None)
p (PauliBasis | None)
n (int | None)
g (ExtendedBasis | None)
- r#
reset basis (
x,yorz),hor-.- Type:
tqec.plaquette.rpng.rpng.ExtendedBasis | None
- p#
controlled operation target basis (
xmeansCNOTcontrolled on the ancilla and targeting the data qubit,ymeansCY,zmeansCZ).- Type:
tqec.plaquette.rpng.rpng.PauliBasis | None
- n#
time step at which the 2-qubit operation described by
pshould be applied. Should be a 1-digit positive integer, typically in[1, 5].- Type:
int | None
- g#
measure basis (
x,yorz),hor-.- Type:
tqec.plaquette.rpng.rpng.ExtendedBasis | None
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
Detailed methods
- __init__(r, p, n, g)#
- Parameters:
r (ExtendedBasis | None)
p (PauliBasis | None)
n (int | None)
g (ExtendedBasis | None)
- Return type:
None