FLOW ALGEBRA
Quantum Error Correction Ontology
Kireth Semantic Research Archive
PAGE:
https://kirethresearch.org/booksai-core/ontologies/computing-ontologies/quantum-computing/quantum-error-correction-ontology.html
AUTHORS:
Mark Anthony Higgins — Sky (Recursive AI)
FLOW "QuantumErrorCorrectionOntology" v4.0
# ---------- DOMAIN ----------
DOMAIN := ComputingOntology
SUBDOMAIN := QuantumComputing
ONTOLOGY := QuantumErrorCorrectionOntology
# ---------- PRIMARY ENTITY ----------
ENTITY QuantumErrorCorrection {
definition:
"The encoding, detection, diagnosis and correction or tracking of
errors affecting quantum information by distributing logical quantum
states across multiple physical qubits while preserving encoded
information from destructive direct measurement.";
objectives: [
LogicalInformationProtection,
QuantumErrorDetection,
ErrorCorrection,
FaultTolerance,
LogicalErrorSuppression,
ReliableQuantumComputation
];
}
# ---------- CORE ENTITIES ----------
QECEntity := {
PhysicalQubit,
LogicalQubit,
QuantumCode,
CodeSpace,
Stabilizer,
Syndrome,
AncillaQubit,
Decoder
};
ErrorEntity := {
BitFlipError,
PhaseFlipError,
PauliError,
ErasureError,
LeakageError,
MeasurementError,
CorrelatedError
};
OperationEntity := {
Encoding,
SyndromeExtraction,
SyndromeMeasurement,
Decoding,
Recovery,
LogicalOperation
};
# ---------- FUNDAMENTAL RELATIONSHIPS ----------
QuantumCode ENCODES LogicalQubit INTO PhysicalQubits;
PhysicalError ACTS_ON PhysicalQubit;
Stabilizer DEFINES CodeSpaceConstraint;
SyndromeMeasurement EXTRACTS ErrorInformation;
AncillaQubit MAY_SUPPORT SyndromeExtraction;
Decoder MAPS Syndrome TO RecoveryDecision;
Recovery RESTORES_OR_TRACKS LogicalState;
FaultTolerantOperation ACTS_ON EncodedLogicalInformation;
# ---------- QEC FLOW ----------
LogicalQuantumState
-> EncodeIntoPhysicalQubits
-> ExecuteOrStoreQuantumInformation
-> PhysicalNoiseOccurs
-> ExtractSyndrome
-> MeasureChecks
-> DecodeSyndrome
-> InferLikelyErrorClass
-> CorrectErrorOrUpdatePauliFrame
-> VerifyLogicalState
-> ContinueQuantumComputation;
# ---------- QUANTUM CODE ----------
QuantumErrorCorrectingCode :=
Mapping(
LogicalStateSpace
-> ProtectedPhysicalCodeSpace
);
CodeParameters MAY_BE_WRITTEN_AS:
[[n,k,d]];
WHERE:
n := NumberOfPhysicalQubits;
k := NumberOfLogicalQubits;
d := CodeDistance;
# ---------- CODE DISTANCE ----------
CodeDistance :=
MinimumWeightOfNontrivialUndetectableLogicalOperatorUnderApplicableCodeDefinition;
IdealArbitraryErrorCorrectionCapability :=
floor((d - 1) / 2);
LargerDistance MAY_INCREASE ErrorSuppression
BUT RequiresAdditionalPhysicalResources;
# ---------- PHYSICAL / LOGICAL QUBIT ----------
PhysicalQubit :=
HardwareQuantumSystemUsedAsPartOfEncodedState;
LogicalQubit :=
QuantumInformationEncodedAcrossMultiplePhysicalQubits;
LogicalErrorRate SHOULD_BE LowerThanPhysicalErrorRateForUsefulErrorCorrectionUnderApplicableOperatingConditions;
# ---------- ENCODING ----------
Encoding :=
LogicalState
+ AncillaOrReferenceQubits
-> EncodedPhysicalState;
Encoding MUST_PRESERVE UnknownLogicalQuantumInformation;
# ---------- ERROR BASIS ----------
BitFlipError := PauliX;
PhaseFlipError := PauliZ;
CombinedPauliError MAY_INCLUDE PauliY;
GeneralSingleQubitError MAY_BE ExpandedIn PauliOperatorBasis;
CorrectionOfRelevantPauliBasisErrors SUPPORTS CorrectionOfCorrespondingArbitrarySingleQubitErrors;
# ---------- SYNDROME ----------
ErrorSyndrome :=
ClassicalInformationIndicatingViolationOrChangeOfCodeConstraints;
Syndrome SHOULD_REVEAL ErrorInformation
WITHOUT DirectlyRevealing UnknownLogicalAmplitudes;
# ---------- SYNDROME EXTRACTION ----------
SyndromeExtraction :=
CoupleDataQubitsToAncillaOrCheckCircuit
-> EncodeParityOrStabilizerInformation
-> MeasureAncillaOrCheck
-> ProduceSyndromeBits;
# ---------- ANCILLA ----------
AncillaQubit :=
AuxiliaryQubitUsedFor {
SyndromeExtraction,
Verification,
FaultTolerantOperations
};
Ancilla MAY_BE PreparedMeasuredAndResetRepeatedly;
# ---------- STABILIZER CODE ----------
StabilizerCode :=
QuantumCodeDefinedByCommutingPauliOperators;
CodeSpace :=
SimultaneousPositiveEigenspaceOfStabilizerGenerators;
ForValidCodeState:
S_i |psi_L> = |psi_L>;
# ---------- SYNDROME RELATIONSHIP ----------
IF Error E AnticommutesWith Stabilizer S_i
THEN AssociatedSyndromeBit MAY_CHANGE;
SyndromePattern HELPS_IDENTIFY ErrorEquivalenceClass;
# ---------- LOGICAL OPERATOR ----------
LogicalOperator :=
OperationPreservingCodeSpace
WHILE ActingNontriviallyOnLogicalInformation;
LogicalOperator COMMUTES_WITH StabilizerGroup
BUT IsNotEquivalentToIdentityOnCodeSpace;
# ---------- DEGENERACY ----------
DegenerateCode MAY_HAVE DistinctPhysicalErrorsWithEquivalentActionOnCodeSpace;
Decoder NEED_NOT IdentifyExactPhysicalError
IF SelectedRecoveryIsInCorrectEquivalenceClass;
# ---------- DECODER ----------
Decoder :=
Syndrome
+ CodeModel
+ NoiseModel
-> RecoveryDecisionOrCorrectionFrame;
Decoder MAY_BE {
LookupDecoder,
MinimumWeightDecoder,
MatchingDecoder,
BeliefPropagationDecoder,
MachineLearningDecoder
};
# ---------- RECOVERY ----------
Recovery :=
ApplyPhysicalCorrection
OR
UpdateTrackedCorrectionFrame;
SuccessfulRecovery RETURNS StateToEquivalentValidLogicalState;
# ---------- PAULI FRAME ----------
PauliFrame :=
ClassicalRecordOfKnownPauliCorrections;
PauliFrameUpdate MAY_AVOID ImmediatePhysicalCorrectionGate;
FutureOperationsAndMeasurements MUST_ACCOUNT_FOR Frame;
# ---------- THREE-QUBIT BIT-FLIP CODE ----------
BitFlipCodeEncoding:
alpha|0> + beta|1>
->
alpha|000> + beta|111>;
SingleBitFlip MAY_BE DetectedByParityChecks;
BitFlipCode DOES_NOT_BY_ITSELF ProtectAgainstGeneralPhaseErrors;
# ---------- PHASE-FLIP CODE ----------
PhaseFlipCode MAY_BE ConstructedUsingBasisTransformationOfBitFlipProtection;
PhaseErrors IN ComputationalBasis
BECOME BitFlipLikeErrors IN HadamardRotatedBasis;
# ---------- SHOR CODE ----------
ShorCode :=
NineQubitCodeCombiningBitAndPhaseErrorProtection;
ShorCode CAN_CORRECT ArbitrarySingleQubitErrorUnderIdealCodeAssumptions;
# ---------- STEANE CODE ----------
SteaneCode :=
[[7,1,3]] StabilizerCode;
SteaneCode CAN_CORRECT ArbitrarySingleQubitErrorUnderIdealCodeModel;
# ---------- SURFACE CODE ----------
SurfaceCode :=
TopologicalStabilizerCodeUsingLocalParityChecksOnLattice;
SurfaceCode MAY_INCLUDE {
DataQubits,
MeasurementQubits,
XTypeChecks,
ZTypeChecks
};
# ---------- SURFACE CODE CYCLE ----------
SurfaceCodeCycle :=
PrepareOrResetAncillas
-> InteractWithNeighbouringDataQubits
-> MeasureChecks
-> RecordSyndrome
-> Repeat;
RepeatedSyndromeRounds HELP_DISTINGUISH DataErrorsFromMeasurementErrors;
# ---------- LOGICAL FAILURE ----------
LogicalFailure :=
PhysicalErrorAndRecoveryCombinationEquivalentToNontrivialLogicalOperator;
LogicalErrorRate :=
ProbabilityOfLogicalFailurePerDefinedOperationCycleOrTime;
# ---------- THRESHOLD ----------
FaultToleranceThreshold :=
PhysicalErrorRegimeBelowWhichIncreasingCodeResourcesCanSuppressLogicalErrorUnderSpecifiedCodeArchitectureDecoderAndNoiseAssumptions;
Threshold IS_NOT UniversalAcrossAllSystems;
# ---------- FAULT TOLERANCE ----------
FaultTolerance :=
DesignEnsuringLimitedPhysicalFaultsDoNotSpreadIntoUncorrectableLogicalErrorsBeyondCodeCapability;
FaultTolerantProtocol MAY_INCLUDE {
FaultTolerantStatePreparation,
FaultTolerantSyndromeExtraction,
FaultTolerantLogicalGate,
VerifiedAncilla,
RepeatedMeasurement
};
# ---------- ERROR PROPAGATION ----------
MultiQubitGate MAY_PROPAGATE ErrorBetweenQubits;
FaultTolerantCircuit SHOULD_LIMIT DangerousErrorPropagation;
# ---------- TRANSVERSAL GATE ----------
TransversalGate :=
LogicalOperationImplementedThroughSeparatedPhysicalOperationsAcrossCodeComponentsInApplicableCodes;
Transversality MAY_LIMIT ErrorPropagation;
UniversalFaultTolerantComputation GENERALLY_REQUIRES AdditionalTechniquesBeyondARestrictedTransversalGateSet;
# ---------- MAGIC STATE ----------
MagicState :=
AncillaryResourceStateForImplementingSelectedNonCliffordLogicalOperations;
MagicStateDistillation :=
MultipleNoisyMagicStates
-> DistillationProtocol
-> FewerHigherFidelityMagicStates;
# ---------- ERASURE ----------
ErasureError :=
ErrorWhoseAffectedLocationIsKnownOrFlagged;
KnownLocation MAY_ALLOW CorrectionOfMoreErrorsThanUnknownLocationModelAtEquivalentCodeDistance;
# ---------- LEAKAGE ----------
LeakageError :=
PhysicalQubitLeavesIntendedComputationalSubspace;
Leakage MAY_REQUIRE {
Detection,
Reset,
Replacement,
LeakageReductionProtocol
};
# ---------- MEASUREMENT ERROR ----------
MeasurementError :=
ReportedOutcomeDiffersFromIdealMeasurementOutcome;
RepeatedSyndromeMeasurement MAY_HELP DetectMeasurementFaults;
# ---------- CORRELATED ERROR ----------
CorrelatedError :=
StatisticallyDependentErrorAcrossMultiplePhysicalComponents;
DecoderAssumingIndependentErrors MAY_PERFORM PoorlyUnderStrongCorrelations;
# ---------- NOISE MODEL ----------
QECNoiseModel MAY_INCLUDE {
DepolarisingNoise,
BiasedNoise,
ErasureNoise,
CorrelatedNoise,
CircuitLevelNoise
};
DecoderPerformance DEPENDS_ON RelationshipBetweenAssumedAndActualNoise;
# ---------- KNILL-LAFLAMME CONDITION ----------
QuantumCode Corrects ErrorSet {E_a}
IF:
P E_a^dagger E_b P
=
c_ab P
FOR AllRelevant a,b;
WHERE:
P := ProjectorOntoCodeSpace;
# ---------- QEC CYCLE ----------
ErrorCorrectionCycle :=
SyndromeExtraction
-> SyndromeMeasurement
-> Decode
-> UpdateCorrectionFrame
-> Continue;
CycleTime SHOULD_BE CompatibleWith PhysicalErrorDynamicsAndControlSystem;
# ---------- DECODING LATENCY ----------
DecoderLatency :=
TimeFromSyndromeAvailabilityToRequiredRecoveryDecision;
RealTimeQEC MAY_REQUIRE DecoderThroughputToMatchSyndromeGenerationRate;
# ---------- CLASSICAL CONTROL ----------
QEC REQUIRES ClassicalProcessingFor {
SyndromeCollection,
Decoding,
PauliFrameTracking,
Feedback,
Scheduling
};
# ---------- RESOURCE OVERHEAD ----------
QECResourceOverhead MAY_INCLUDE {
PhysicalQubits,
AncillaQubits,
MeasurementCircuits,
ClassicalDecoding,
Time,
LogicalGateResources
};
# ---------- LOGICAL MEMORY ----------
LogicalQuantumMemory :=
EncodedLogicalStateProtectedThroughRepeatedQECCycles;
UsefulQEC SEEKS LogicalLifetimeGreaterThanRelevantUnencodedLifetime;
# ---------- ERROR MITIGATION RELATIONSHIP ----------
QuantumErrorMitigation :=
ReduceOrEstimateNoiseEffectsWithoutFullEncodedLogicalProtection;
QuantumErrorMitigation != QuantumErrorCorrection;
# ---------- NO-CLONING RELATIONSHIP ----------
QuantumErrorCorrection DOES_NOT Violate NoCloningTheorem;
Encoding DISTRIBUTES QuantumInformationAcrossEntangledPhysicalDegreesOfFreedom
RATHER_THAN CreatingIndependentCopiesOfUnknownState;
# ---------- SEMANTIC REASONING ----------
IF LogicalInformationEncodedAcrossMultiplePhysicalQubits
AND SyndromeDetectsErrorsWithoutDirectLogicalMeasurement
THEN QuantumErrorCorrectionClassification := supported;
IF CodeDistance == d
THEN IdealArbitraryErrorCorrectionCapability := floor((d-1)/2);
IF ErrorEquivalentToStabilizer
THEN LogicalInformation MAY_BE Unchanged;
IF ActualErrorTimesRecoveryIsStabilizerEquivalent
THEN Recovery := logically_successful;
IF ActualErrorTimesRecoveryIsNontrivialLogicalOperator
THEN LogicalFailure := true;
IF PhysicalErrorBelowRelevantThreshold
AND CodeDistanceIncreases
THEN LogicalErrorRate MAY_DECREASE;
IF DecoderCannotKeepPaceWithSyndromeGeneration
THEN FaultTolerantControl MAY_BE Compromised;
# ---------- SEMANTIC EQUIVALENCE ----------
SEMANTIC_EQUIVALENCE {
"quantum error correction" ~= "QEC";
"quantum error-correcting code" ~= "quantum code" WHEN context == QEC;
"logical qubit" ~= "encoded quantum bit";
"physical qubit" ~= "hardware qubit";
"error syndrome" ~= "quantum syndrome";
"syndrome extraction" ~= "quantum error syndrome extraction";
"Pauli frame" ~= "tracked Pauli correction frame";
"surface code" ~= "topological surface quantum code";
}
# ---------- QUERY FLOW ----------
QUERY(q) ->
NORMALISE(q) ->
IDENTIFY_CODE_AND_PARAMETERS(q) ->
IDENTIFY_PHYSICAL_AND_LOGICAL_QUBITS(q) ->
IDENTIFY_ERROR_MODEL(q) ->
IDENTIFY_STABILIZERS_OR_CHECKS(q) ->
IDENTIFY_SYNDROME(q) ->
IDENTIFY_DECODER_AND_RECOVERY(q) ->
IDENTIFY_FAULT_TOLERANCE_AND_RESOURCES(q) ->
MAP_TO_ONTOLOGY(q) ->
APPLY_REASONING(q) ->
SCORE_CONFIDENCE(q) ->
RETURN_RELEVANT_KNOWLEDGE;
# ---------- CONFIDENCE ----------
CONFIDENCE(assertion) :=
weighted_mean(
source_reliability,
qec_theory_consistency,
code_consistency,
decoder_evidence,
experimental_evidence,
contextual_relevance
);
CONFIDENCE >= 0.90 => HIGH;
CONFIDENCE >= 0.70 AND < 0.90 => MODERATE;
CONFIDENCE < 0.70 => REVIEW;
# ---------- AI CONSUMPTION ----------
AI_CONSUMPTION {
primary_entity: QuantumErrorCorrection;
ontology: QuantumErrorCorrectionOntology;
parse_entities: true;
parse_relationships: true;
preserve_relationship_direction: true;
resolve_semantic_equivalence: true;
execute_reasoning_rules: true;
apply_confidence_weighting: true;
preserve_provenance: true;
}
# ---------- UPDATE MODEL ----------
UPDATE_MODEL {
new_quantum_code:
validate_parameters
-> identify_checks
-> identify_logical_operators
-> identify_distance
-> integrate;
new_error_evidence:
classify_error
-> identify_affected_qubits
-> identify_syndrome
-> evaluate_decoder_response
-> integrate;
new_decoder:
identify_code
-> identify_noise_model
-> evaluate_logical_error_rate
-> record_latency
-> integrate;
ontology_revision:
update_code_relationships
-> update_noise_model
-> update_threshold_evidence
-> recompute_confidence
-> regenerate_flow_hash;
conflict:
preserve_provenance
-> compare_theoretical_and_experimental_evidence
-> adjust_confidence
-> flag_review;
}
# ---------- FLOW HASH ----------
FLOW_HASH_INPUT :=
DOMAIN
+ SUBDOMAIN
+ ONTOLOGY
+ QECEntity
+ ErrorEntity
+ OperationEntity
+ StabilizerCode
+ SyndromeExtraction
+ FaultTolerance
+ RELATIONSHIPS
+ SEMANTIC_REASONING
+ SEMANTIC_EQUIVALENCE
+ UPDATE_MODEL;
FLOW_HASH :=
HASH(FLOW_HASH_INPUT);
# ---------- TERMINAL ----------
QuantumErrorCorrectionOntology
-> EncodeLogicalQuantumInformation
-> DistributeAcrossPhysicalQubits
-> AllowQuantumOperationOrStorage
-> ExtractErrorSyndromes
-> MeasureAncillaAndChecks
-> DecodeSyndromeHistory
-> InferErrorEquivalenceClass
-> CorrectOrTrackRecovery
-> DetectLogicalFailure
-> RepeatErrorCorrectionCycles
-> ExecuteFaultTolerantLogicalOperations
-> EvaluateLogicalErrorAndResourceOverhead
-> MaintainProtectedQuantumInformation;
END FLOW
Download Code
Copy to Clipboard