From b92d53ec41740134a291a605781d6eb96de08272 Mon Sep 17 00:00:00 2001 From: Theresa Date: Mon, 11 Nov 2024 08:51:10 +0100 Subject: [PATCH] :memo: Update documentation for HSF checker in the approximate equivalence checking setting --- docs/source/ApproximateEquivalence.ipynb | 4 ++-- src/EquivalenceCheckingManager.cpp | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/docs/source/ApproximateEquivalence.ipynb b/docs/source/ApproximateEquivalence.ipynb index f8578be4..d83d90db 100644 --- a/docs/source/ApproximateEquivalence.ipynb +++ b/docs/source/ApproximateEquivalence.ipynb @@ -41,7 +41,7 @@ "1. **ZX-Calculus Equivalence Checker:** Approximate equivalence checking is not yet supported in the ZX-calculus checker, which is not a problem for the equivalence checking workflow, given that the ZX-calculus checker cannot demonstrate non-equivalence of circuits due to its incompleteness. \n", "Therefore, it will simply output 'No Information' for circuits that are approximately but not totally equivalent.\n", "\n", - "1. **Hybrid Schrödinger-Feynman (HSF) Equivalence Checker:** By default, the HSF checker is disabled. It can only be used for approximate equivalence checking. To enable it, the `check_approximate_equivalence` option must also be activated. The HSF checker computes the process distance by dividing the circuit corresponding to $UV^\\dagger$ horizontally into two independent halves: a lower part and an upper part. This is achieved by decomposing controlled gates, acting across both halves, according to the Schmidt decomposition.\n", + "1. **Hybrid Schrödinger-Feynman (HSF) Equivalence Checker:** By default, the HSF checker is disabled. To enable it, both the `run_hsf_checker` flag and the `check_approximate_equivalence` option must be set to true. The HSF checker computes the process distance by dividing the circuit corresponding to $UV^\\dagger$ horizontally into two independent halves: a lower part and an upper part. This is achieved by decomposing controlled gates, acting across both halves, according to the Schmidt decomposition.\n", "By leveraging key trace equalities - specifically,\n", "\n", " • $tr[L⊗U]=tr[L]⋅tr[U]$\n", @@ -176,7 +176,7 @@ "id": "5d7f9c62", "metadata": {}, "source": [ - "To use the HSF checker, it must be explicitly enabled in the configuration. Below, we will explicitly use the HSF checker and disable the other checkers." + "To use the HSF checker, it must be explicitly enabled in the configuration. Below, we will use the HSF checker exclusively and disable the other checkers." ] }, { diff --git a/src/EquivalenceCheckingManager.cpp b/src/EquivalenceCheckingManager.cpp index 6310d8a7..8badcb1f 100644 --- a/src/EquivalenceCheckingManager.cpp +++ b/src/EquivalenceCheckingManager.cpp @@ -393,10 +393,9 @@ EquivalenceCheckingManager::EquivalenceCheckingManager( if (!configuration.functionality.checkApproximateEquivalence && configuration.execution.runHSFChecker) { - std::clog - << "[QCEC] Warning: The HSF checker performs approximate, not exact, " - "equivalence checking. The HSF checker has been disabled. Set " - "'checkApproximateEquivalence' to True to enable it.\n"; + std::clog << "[QCEC] Warning: The HSF checker performs approximate " + "equivalence checking. The HSF checker has been disabled. Set " + "'checkApproximateEquivalence' to True to enable it.\n"; this->configuration.execution.runHSFChecker = false; }