Skip to content

Commit

Permalink
📝 Update documentation for HSF checker in the approximate equivalence…
Browse files Browse the repository at this point in the history
… checking setting
  • Loading branch information
TeWas committed Nov 11, 2024
1 parent 1c1baf0 commit b92d53e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions docs/source/ApproximateEquivalence.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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."
]
},
{
Expand Down
7 changes: 3 additions & 4 deletions src/EquivalenceCheckingManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit b92d53e

Please sign in to comment.