---
title: "Linear Codes over the Integer Residue Ring ${\\mathbb{Z}}_4$"
canonical: "https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/index-linear-codes-over-z4.html"
source: "https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/index-linear-codes-over-z4.md"
part: "Coding Theory"
chapter: "Linear Codes over the Integer Residue Ring ${\\mathbb{Z}}_4$"
breadcrumbs:
  - {"title": "Magma Handbook", "source": "https://docs.magma-maths.org/v2.30-1/index.md"}
  - {"title": "Coding Theory", "source": "https://docs.magma-maths.org/v2.30-1/CodingTheory/index-coding-theory.md"}
prev: {"title": "Bibliography", "source": "https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverFiniteRings/bibliography.md"}
next: {"title": "Introduction", "source": "https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/introduction.md"}
---

<a id="linear-codes-over-the-integer-residue-ring-mathbb-z-4"></a>
<a id="error-correcting-linear-code"></a>
<a id="chap-codez4"></a>
# Linear Codes over the Integer Residue Ring ${\mathbb{Z}}_4$

- [Introduction](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/introduction.md)
- [Constructions for ${\mathbb{Z}}_4$ Codes](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/constructions.md)
  - [The Gray Map](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/constructions.md#the-gray-map)
    - [`GrayMap(C): Code → Map`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/constructions.md#function-graymap-code)
    - [`GrayMapImage(C): Code → [ ModTupRngElt ]`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/constructions.md#function-graymapimage-code)
    - [`HasLinearGrayMapImage(C): Code → BoolElt, Code`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/constructions.md#function-haslineargraymapimage-code)
    - [Example: Gray Map Image of the Octacode](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/constructions.md#example-ex-660fb9)
  - [Families of Codes over ${\mathbb{Z}}_4$](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/constructions.md#families-of-codes-over-mathbb-z-4)
    - [`KerdockCode(m): RngIntElt → Code`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/constructions.md#function-kerdockcode-rngintelt)
    - [`PreparataCode(m): RngIntElt → Code`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/constructions.md#function-preparatacode-rngintelt)
    - [`ReedMullerCodeZ4(r, m): RngIntElt, RngIntElt → Code`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/constructions.md#function-reedmullercodez4-rngintelt-rngintelt)
    - [`GoethalsCode(m): RngIntElt → Code`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/constructions.md#function-goethalscode-rngintelt)
    - [`DelsarteGoethalsCode(m, delta): RngIntElt, RngIntElt → Code`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/constructions.md#function-delsartegoethalscode-rngintelt-rngintelt)
    - [`GoethalsDelsarteCode(m, delta): RngIntElt, RngIntElt → Code`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/constructions.md#function-goethalsdelsartecode-rngintelt-rngintelt)
    - [`QRCodeZ4(p): RngIntElt → Code`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/constructions.md#function-qrcodez4-rngintelt)
    - [`GolayCodeZ4(e): BoolElt → Code`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/constructions.md#function-golaycodez4-boolelt)
    - [`SimplexAlphaCodeZ4(k): RngIntElt → Code`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/constructions.md#function-simplexalphacodez4-rngintelt)
    - [`SimplexBetaCodeZ4(k): RngIntElt → Code`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/constructions.md#function-simplexbetacodez4-rngintelt)
    - [Example: Kerdock and Preparata Codes](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/constructions.md#example-ex-79827c)
    - [`HadamardCodeZ4(δ, m): RngIntElt, RngIntElt → CodeLinRng, Mtrx`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/constructions.md#function-hadamardcodez4-rngintelt-rngintelt)
    - [`ExtendedPerfectCodeZ4(δ, m): RngIntElt, RngIntElt → CodeLinRng, Mtrx`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/constructions.md#function-extendedperfectcodez4-rngintelt-rngintelt)
    - [Example: Hadamard Codes over Z4](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/constructions.md#example-ex-6e1c45)
    - [`ReedMullerCodeZ4(r, m): RngIntElt, RngIntElt → CodeLinRng`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/constructions.md#function-reedmullercodez4-rngintelt-rngintelt-2)
    - [`ReedMullerCodeQRMZ4(r, m): RngIntElt, RngIntElt → CodeLinRng`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/constructions.md#function-reedmullercodeqrmz4-rngintelt-rngintelt)
    - [`ReedMullerCodesLRMZ4(r, m): RngIntElt, RngIntElt → SeqEnum`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/constructions.md#function-reedmullercodeslrmz4-rngintelt-rngintelt)
    - [`ReedMullerCodeRMZ4(s, r, m): RngIntElt, RngIntElt, RngIntElt → CodeLinRng, Mtrx`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/constructions.md#function-reedmullercodermz4-rngintelt-rngintelt-rngintelt)
    - [Example: Nested Reed-Muller Codes over Z4](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/constructions.md#example-ex-797694)
    - [`ReedMullerCodesRMZ4(s, m): RngIntElt, RngIntElt → Tup`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/constructions.md#function-reedmullercodesrmz4-rngintelt-rngintelt)
    - [Example: Family of Reed-Muller Codes over Z4](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/constructions.md#example-ex-c9bc7a)
  - [Derived Binary Codes](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/constructions.md#derived-binary-codes)
    - [`BinaryResidueCode(C): Code → Code`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/constructions.md#function-binaryresiduecode-code)
    - [`BinaryTorsionCode(C): Code → Code`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/constructions.md#function-binarytorsioncode-code)
    - [`Z4CodeFromBinaryChain(C1, C2): Code, Code → Code`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/constructions.md#function-z4codefrombinarychain-code-code)
    - [Example: Derived Binary Codes of the Z4 Golay Code](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/constructions.md#example-ex-08428d)
  - [New Codes from Old](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/constructions.md#new-codes-from-old)
    - [`PlotkinSum(A, B): Mtrx, Mtrx → Mtrx`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/constructions.md#function-plotkinsum-mtrx-mtrx)
    - [`PlotkinSum(C, D): Code, Code → Code`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/constructions.md#function-plotkinsum-code-code)
    - [`QuaternaryPlotkinSum(A, B): Mtrx, Mtrx → Mtrx`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/constructions.md#function-quaternaryplotkinsum-mtrx-mtrx)
    - [`QuaternaryPlotkinSum(C, D): Code, Code → Code`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/constructions.md#function-quaternaryplotkinsum-code-code)
    - [`BQPlotkinSum(A, B, C): Mtrx, Mtrx, Mtrx → Mtrx`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/constructions.md#function-bqplotkinsum-mtrx-mtrx-mtrx)
    - [`BQPlotkinSum(D, E, F): Code, Code, Code → Code`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/constructions.md#function-bqplotkinsum-code-code-code)
    - [`DoublePlotkinSum(A, B, C, D): Mtrx, Mtrx, Mtrx, Mtrx → Mtrx`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/constructions.md#function-doubleplotkinsum-mtrx-mtrx-mtrx-mtrx)
    - [`DoublePlotkinSum(E, F, G, H): Code, Code, Code, Code → Code`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/constructions.md#function-doubleplotkinsum-code-code-code-code)
    - [`DualKroneckerZ4(C): CodeLinRng → CodeLinRng`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/constructions.md#function-dualkroneckerz4-codelinrng)
    - [Example: Plotkin Sums of Matrices and Codes](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/constructions.md#example-ex-b631eb)
    - [Example: Reed-Muller Codes as Plotkin Sums](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/constructions.md#example-ex-c3f759)
- [Invariants](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/z4-invar.md)
  - [The Standard Form](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/z4-invar.md#the-standard-form)
    - [`StandardForm(C): Code → Code, Map`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/z4-invar.md#function-standardform-code)
    - [Example: Standard Form of a Code over Z4](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/z4-invar.md#example-ex-48fad2)
    - [`StandardFormDual(C): CodeLinRng → CodeLinRng, Map`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/z4-invar.md#function-standardformdual-codelinrng)
  - [Structures Associated with the Gray Map](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/z4-invar.md#structures-associated-with-the-gray-map)
    - [`MinRowsGeneratorMatrix(C): CodeLinRng → ModMatRngElt`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/z4-invar.md#function-minrowsgeneratormatrix-codelinrng)
    - [`MinRowsParityCheckMatrix(C): CodeLinRng → ModMatRngElt`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/z4-invar.md#function-minrowsparitycheckmatrix-codelinrng)
    - [`DualZ4(C): CodeLinRng → CodeLinRng`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/z4-invar.md#function-dualz4-codelinrng)
    - [Example: Generator Matrices with Minimum Rows](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/z4-invar.md#example-ex-3b2558)
    - [`SpanZ2CodeZ4(C): CodeLinRng → CodeLinFld`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/z4-invar.md#function-spanz2codez4-codelinrng)
    - [`KernelZ2CodeZ4(C): CodeLinRng → CodeLinRng`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/z4-invar.md#function-kernelz2codez4-codelinrng)
    - [`KernelCosetRepresentatives(C): CodeLinRng → SeqEnum, SeqEnum`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/z4-invar.md#function-kernelcosetrepresentatives-codelinrng)
    - [`DimensionOfSpanZ2(C): CodeLinRng → RngIntElt`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/z4-invar.md#function-dimensionofspanz2-codelinrng)
    - [`RankZ2(C): CodeLinRng → RngIntElt`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/z4-invar.md#function-rankz2-codelinrng)
    - [`DimensionOfKernelZ2(C): CodeLinRng → RngIntElt`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/z4-invar.md#function-dimensionofkernelz2-codelinrng)
    - [Example: Kernel and Span of a Code over Z4](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/z4-invar.md#example-ex-bb9d15)
  - [Coset Representatives](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/z4-invar.md#coset-representatives)
    - [`CosetRepresentatives(C): CodeLinRng → SeqEnum`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/z4-invar.md#function-cosetrepresentatives-codelinrng)
    - [`CosetRepresentatives(C, S): CodeLinRng, CodeLinRng → SeqEnum, SeqEnum`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/z4-invar.md#function-cosetrepresentatives-codelinrng-codelinrng)
    - [Example: Coset Representatives of a Code](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/z4-invar.md#example-ex-551655)
  - [Information Space and Information Sets](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/z4-invar.md#information-space-and-information-sets)
    - [`InformationSpace(C): CodeLinRng → ModTupRng, ModTupFld, Map, Map`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/z4-invar.md#function-informationspace-codelinrng)
    - [Example: Information Space of a Code over Z4](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/z4-invar.md#example-ex-5fc04a)
    - [`InformationSet(C): CodeLinRng → ModTupRng, ModTupFld, Map, Map`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/z4-invar.md#function-informationset-codelinrng)
    - [`IsInformationSet(C, I): CodeLinRng, [RngIntElt] → BoolElt, BoolElt`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/z4-invar.md#function-isinformationset-codelinrng-rngintelt)
    - [Example: Information Sets of a Hadamard Code](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/z4-invar.md#example-ex-1d41b7)
  - [Syndrome Space and Coset Leaders](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/z4-invar.md#syndrome-space-and-coset-leaders)
    - [`SyndromeSpace(C): CodeLinRng → ModTupRng, ModTupFld`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/z4-invar.md#function-syndromespace-codelinrng)
    - [`Syndrome(u, C): ModTupFldElt, CodeLinRng → ModTupRngElt`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/z4-invar.md#function-syndrome-modtupfldelt-codelinrng)
    - [`Syndrome(u, C): ModTupRngElt, CodeLinRng → ModTupRngElt`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/z4-invar.md#function-syndrome-modtuprngelt-codelinrng)
    - [`CosetLeaders(C): CodeLinRng → SetIndx, Map`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/z4-invar.md#function-cosetleaders-codelinrng)
    - [Example: Syndrome Space and Coset Leaders](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/z4-invar.md#example-ex-5bce83)
  - [Miscellaneous Functions](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/z4-invar.md#miscellaneous-functions)
    - [`Correlation(v): ModTupRngElt → RngQuadElt`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/z4-invar.md#function-correlation-modtuprngelt)
- [Weight Distributions](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/weight-distribution.md)
  - [Hamming Weight](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/weight-distribution.md#hamming-weight)
    - [`MinimumWeight(C): Code → RngIntElt`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/weight-distribution.md#function-minimumweight-code)
    - [`MinimumDistance(C): Code → RngIntElt`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/weight-distribution.md#function-minimumdistance-code)
    - [`WeightDistribution(C): Code → [ <RngIntElt, RngIntElt> ]`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/weight-distribution.md#function-weightdistribution-code)
    - [`DualWeightDistribution(C): Code → [ <RngIntElt, RngIntElt> ]`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/weight-distribution.md#function-dualweightdistribution-code)
    - [Example: Weight Distribution of a Quadratic Residue Code](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/weight-distribution.md#example-ex-601dad)
  - [Lee Weight](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/weight-distribution.md#lee-weight)
    - [`LeeWeight(a): RngIntRes → RngIntElt`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/weight-distribution.md#function-leeweight-rngintres)
    - [`LeeWeight(v): ModTupRngElt → RngIntElt`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/weight-distribution.md#function-leeweight-modtuprngelt)
    - [`LeeDistance(u, v): ModTupRngElt, ModTupRngElt → RngIntElt`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/weight-distribution.md#function-leedistance-modtuprngelt-modtuprngelt)
    - [`MinimumLeeWeight(C): Code → RngIntElt`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/weight-distribution.md#function-minimumleeweight-code)
    - [`MinimumLeeDistance(C): Code → RngIntElt`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/weight-distribution.md#function-minimumleedistance-code)
    - [`LeeWeightDistribution(C): Code → SeqEnum`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/weight-distribution.md#function-leeweightdistribution-code)
    - [`DualLeeWeightDistribution(C): Code → SeqEnum`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/weight-distribution.md#function-dualleeweightdistribution-code)
    - [`WordsOfLeeWeight(C, w): Code, RngIntElt → SetEnum`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/weight-distribution.md#function-wordsofleeweight-code-rngintelt)
    - [`WordsOfBoundedLeeWeight(C, l, u): Code, RngIntElt, RngIntElt → SetEnum`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/weight-distribution.md#function-wordsofboundedleeweight-code-rngintelt-rngintelt)
    - [Example: Lee Weight Distribution](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/weight-distribution.md#example-ex-587036)
  - [Euclidean Weight](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/weight-distribution.md#euclidean-weight)
    - [`EuclideanWeight(a): RngIntRes → RngIntElt`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/weight-distribution.md#function-euclideanweight-rngintres)
    - [`EuclideanWeight(v): ModTupRngElt → RngIntElt`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/weight-distribution.md#function-euclideanweight-modtuprngelt)
    - [`EuclideanDistance(u, v): ModTupRngElt, ModTupRngElt → RngIntElt`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/weight-distribution.md#function-euclideandistance-modtuprngelt-modtuprngelt)
    - [`MinimumEuclideanWeight(C): Code → RngIntElt`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/weight-distribution.md#function-minimumeuclideanweight-code)
    - [`MinimumEuclideanDistance(C): Code → RngIntElt`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/weight-distribution.md#function-minimumeuclideandistance-code)
    - [`EuclideanWeightDistribution(C): Code → SeqEnum`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/weight-distribution.md#function-euclideanweightdistribution-code)
    - [`DualEuclideanWeightDistribution(C): Code → SeqEnum`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/weight-distribution.md#function-dualeuclideanweightdistribution-code)
    - [Example: Euclidean Weight Distribution](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/weight-distribution.md#example-ex-9f8213)
- [Weight Enumerators](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/weight-enumerator.md)
  - [`CompleteWeightEnumerator(C): Code → RngMPolElt`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/weight-enumerator.md#function-completeweightenumerator-code)
  - [`SymmetricWeightEnumerator(C): Code → RngMPolElt`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/weight-enumerator.md#function-symmetricweightenumerator-code)
  - [`WeightEnumerator(C): Code → RngMPolElt`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/weight-enumerator.md#function-weightenumerator-code)
  - [`HammingWeightEnumerator(C): Code → RngMPolElt`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/weight-enumerator.md#function-hammingweightenumerator-code)
  - [`LeeWeightEnumerator(C): Code → RngMPolElt`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/weight-enumerator.md#function-leeweightenumerator-code)
  - [`EuclideanWeightEnumerator(C): Code → RngMPolElt`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/weight-enumerator.md#function-euclideanweightenumerator-code)
  - [Example: Weight Enumerators of the Octacode](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/weight-enumerator.md#example-ex-92ee64)
- [Decoding](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/decoding.md)
  - [Coset Decoding](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/decoding.md#coset-decoding)
    - [`CosetDecode(C, u : parameters): CodeLinRng, ModTupFldElt → BoolElt, ModTupRngElt, ModTupFldElt`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/decoding.md#function-cosetdecode-codelinrng-modtupfldelt)
    - [`CosetDecode(C, u : parameters): CodeLinRng, ModTupRngElt → BoolElt, ModTupRngElt, ModTupFldElt`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/decoding.md#function-cosetdecode-codelinrng-modtuprngelt)
    - [`CosetDecode(C, Q : parameters): CodeLinRng, [ModTupFldElt] → SeqEnum, SeqEnum, SeqEnum`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/decoding.md#function-cosetdecode-codelinrng-modtupfldelt-2)
    - [`CosetDecode(C, Q : parameters): CodeLinRng, [ModTupRngElt] → SeqEnum, SeqEnum, SeqEnum`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/decoding.md#function-cosetdecode-codelinrng-modtuprngelt-2)
    - [Example: Coset Decoding of a Hadamard Code](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/decoding.md#example-ex-68b44c)
  - [Syndrome Decoding](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/decoding.md#syndrome-decoding)
    - [`SyndromeDecode(C, u): CodeLinRng, ModTupFldElt → BoolElt, ModTupRngElt, ModTupFldElt`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/decoding.md#function-syndromedecode-codelinrng-modtupfldelt)
    - [`SyndromeDecode(C, u): CodeLinRng, ModTupRngElt → BoolElt, ModTupRngElt, ModTupFldElt`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/decoding.md#function-syndromedecode-codelinrng-modtuprngelt)
    - [`SyndromeDecode(C, Q): CodeLinRng, [ModTupFldElt] → SeqEnum, SeqEnum, SeqEnum`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/decoding.md#function-syndromedecode-codelinrng-modtupfldelt-2)
    - [`SyndromeDecode(C, Q): CodeLinRng, [ModTupRngElt] → SeqEnum, SeqEnum, SeqEnum`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/decoding.md#function-syndromedecode-codelinrng-modtuprngelt-2)
    - [Example: Syndrome Decoding of a Hadamard Code](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/decoding.md#example-ex-1a7dd2)
  - [Lifted Decoding](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/decoding.md#lifted-decoding)
    - [`LiftedDecode(C, u : parameters): CodeLinRng, ModTupFldElt → BoolElt, ModTupRngElt, ModTupFldElt`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/decoding.md#function-lifteddecode-codelinrng-modtupfldelt)
    - [`LiftedDecode(C, u : parameters): CodeLinRng, ModTupRngElt → BoolElt, ModTupRngElt, ModTupFldElt`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/decoding.md#function-lifteddecode-codelinrng-modtuprngelt)
    - [`LiftedDecode(C, Q : parameters): CodeLinRng, [ModTupFldElt] → SeqEnum, SeqEnum, SeqEnum`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/decoding.md#function-lifteddecode-codelinrng-modtupfldelt-2)
    - [`LiftedDecode(C, Q : parameters): CodeLinRng, [ModTupRngElt] → SeqEnum, SeqEnum, SeqEnum`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/decoding.md#function-lifteddecode-codelinrng-modtuprngelt-2)
    - [Example: Lifted Decoding of a Hadamard Code](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/decoding.md#example-ex-403c77)
  - [Permutation Decoding](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/decoding.md#permutation-decoding)
    - [`IsPermutationDecodeSet(C, I, S, s): CodeLinRng, [RngIntElt], [GrpPermElt], RngIntElt → BoolElt`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/decoding.md#function-ispermutationdecodeset-codelinrng-rngintelt-grppermelt-rngintelt)
    - [`PermutationDecode(C, I, S, s, u): CodeLinRng, [RngIntElt], [GrpPermElt], RngIntElt, ModTupFldElt → BoolElt, ModTupRngElt, ModTupFldElt`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/decoding.md#function-permutationdecode-codelinrng-rngintelt-grppermelt-rngintelt-modtupfldelt)
    - [`PermutationDecode(C, I, S, s, u): CodeLinRng, [RngIntElt], [GrpPermElt], RngIntElt, ModTupRngElt → BoolElt, ModTupRngElt, ModTupFldElt`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/decoding.md#function-permutationdecode-codelinrng-rngintelt-grppermelt-rngintelt-modtuprngelt)
    - [`PermutationDecode(C, I, S, s, Q): CodeLinRng, [RngIntElt], [GrpPermElt], RngIntElt, [ModTupFldElt] → [BoolElt], [ModTupRngElt], [ModTupFldElt]`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/decoding.md#function-permutationdecode-codelinrng-rngintelt-grppermelt-rngintelt-modtupfldelt-2)
    - [`PermutationDecode(C, I, S, s, Q): CodeLinRng, [RngIntElt], [GrpPermElt], RngIntElt, [ModTupRngElt] → [BoolElt], [ModTupRngElt], [ModTupFldElt]`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/decoding.md#function-permutationdecode-codelinrng-rngintelt-grppermelt-rngintelt-modtuprngelt-2)
    - [Example: Permutation Decoding of a Hadamard Code](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/decoding.md#example-ex-446a9b)
    - [`PDSetHadamardCodeZ4(δ, m): RngIntElt, RngIntElt → SeqEnum, SeqEnum, SeqEnum, SeqEnum, SeqEnum`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/decoding.md#function-pdsethadamardcodez4-rngintelt-rngintelt)
    - [`PDSetKerdockCodeZ4(m): RngIntElt → SeqEnum, SeqEnum, SeqEnum, SeqEnum`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/decoding.md#function-pdsetkerdockcodez4-rngintelt)
    - [Example: Checking a PD-Set for a Hadamard Code](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/decoding.md#example-ex-a6009d)
- [Automorphism Groups](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/aut_group.md)
  - [`PermutationGroupHadamardCodeZ4(δ, m): RngIntElt, RngIntElt → GrpPerm, Mtrx`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/aut_group.md#function-permutationgrouphadamardcodez4-rngintelt-rngintelt)
  - [`PAutHadamardCodeZ4(δ, m): RngIntElt, RngIntElt → GrpPerm, Mtrx`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/aut_group.md#function-pauthadamardcodez4-rngintelt-rngintelt)
  - [`PermutationGroupHadamardCodeZ4Order(δ, m): RngIntElt, RngIntElt → RngIntElt`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/aut_group.md#function-permutationgrouphadamardcodez4order-rngintelt-rngintelt)
  - [`PAutHadamardCodeZ4Order(δ, m): RngIntElt, RngIntElt → RngIntElt`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/aut_group.md#function-pauthadamardcodez4order-rngintelt-rngintelt)
  - [`PermutationGroupExtendedPerfectCodeZ4(δ, m): RngIntElt, RngIntElt → GrpPerm, Mtrx`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/aut_group.md#function-permutationgroupextendedperfectcodez4-rngintelt-rngintelt)
  - [`PAutExtendedPerfectCodeZ4(δ, m): RngIntElt, RngIntElt → GrpPerm, Mtrx`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/aut_group.md#function-pautextendedperfectcodez4-rngintelt-rngintelt)
  - [`PermutationGroupExtendedPerfectCodeZ4Order(δ, m): RngIntElt, RngIntElt → RngIntElt`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/aut_group.md#function-permutationgroupextendedperfectcodez4order-rngintelt-rngintelt)
  - [`PAutExtendedPerfectCodeZ4Order(δ, m): RngIntElt, RngIntElt → RngIntElt`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/aut_group.md#function-pautextendedperfectcodez4order-rngintelt-rngintelt)
  - [Example: Permutation Automorphisms of a Hadamard Code](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/aut_group.md#example-ex-61ad8c)
  - [`PermutationGroup(C): CodeLinRng → GrpPerm`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/aut_group.md#function-permutationgroup-codelinrng)
  - [`PermutationGroupGrayMapImage(C): CodeLinRng → GrpPerm`](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/aut_group.md#function-permutationgroupgraymapimage-codelinrng)
  - [Example: Permutation Group of a Code over Z4](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/aut_group.md#example-ex-326517)
- [Bibliography](https://docs.magma-maths.org/v2.30-1/CodingTheory/LinearCodesOverZ4/bibliography.md)
