![]()
#Huawei m3 simple desktops fullapply_correction ( raw_counts, qubits, distance = DIST )īy default, M3 computes errors out to the full distance. This can be controlled by the distance keyword argument in apply_correction: m3_quasi = mit. This allows for investigating if large weight errors have much impact on the output. Mitigation when only looking at errors that are up to a given Hamming distance away. nearest_probability_distribution () Truncating based on Hamming distanceĪn additional benefit of the way M3 works is that it is possible to compute the effect of The closest true probability distribution in L2-norm using: closest_probs = m3_quasi. However, if one needsĪ true probability distribution then it is possible to convert from quasi-probabilites to This is suitable for use in computing corrected expectation values. The results of M3 mitigation are quasi-probabilities that nominally contain small negative values. ![]() expval_and_stddev () Closest probability distribution Standard deviation: expval, stddev = quasi. Then the distribution itself can be called to return things like the expectation value and the apply_correction ( raw_counts, qubits, return_mitigation_overhead = True ) This is not doneīy default, but rather turned on using: m3_quasi = mit. It is possible to compute error bounds in a similarly efficient manner. The fact that the zeroth bit is right-most in the bitstring is handled internally. Note that here qubits is a list of which qubits are measured to yield the bits in the output.įor example the list indicates that a measurement on physical qubit 4 was written toĬlassical bit zero in the output bit-strings, physical qubit 3 maps to classical bit 1, etc. cals_from_system ( qubits, shots ) # Apply mitigation to a given dict of raw counts over the specified qubits m3_quasi = mit. M3Mitigation ( backend ) # Compute the 1Q calibration matrices for the given qubits and given number of shots # By default it is over all backend qubits at 8192 shots. M3 is simple to use: import mthree # Specify a mitigator object targeting a given backend mit = mthree. #Huawei m3 simple desktops installThen installation with openmp can be accomplished using: CC =clang CXX =clang python setup.py install -with-openmp On OSX one must install LLVM using homebrew (You cannot use GCC): brew install llvmĪfter which the following (or the like) must be executed in the terminal: export PATH = "/usr/local/opt/llvm/bin: $PATH "Īnd export LDFLAGS = "-L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib" export CPPFLAGS = "-I/usr/local/opt/llvm/include" The openmp and native flags can be used simultaneously using a comma. ![]() ![]() Optionally one can also set -march=native using: python setup.py install -with-native To enable openmp one must have an openmp 3.0+ enabled compiler and install with: python setup.py install -with-openmp #Huawei m3 simple desktops serialYou can pip install M3 in serial mode using PyPi via: pip install mthreeĪlternatively, one can install from source: python setup.py install For example, M3 can compute corrections on 42 qubit GHZ problems in under two seconds on a quad-core machine (depending on the number of unique bitstrings in the output). M3 is a measurement mitigation technique that solves for corrected measurement probabilities using a dimensionality reduction step followed by either direct LU factorization or a preconditioned iterative method that nominally converges in O(1) steps, and can be computed in parallel. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |