We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This is the second example README.md:
README.md
import numpy as np from scipy.sparse import csc_matrix import pymatching H = csc_matrix([[1, 1, 0, 0, 0], [0, 1, 1, 0, 0], [0, 0, 1, 1, 0], [0, 0, 0, 1, 1]]) observables = csc_matrix([[1, 0, 0, 0, 0]]) error_probability = 0.1 weights = np.ones(H.shape[1]) * np.log((1-error_probability)/error_probability) matching = pymatching.Matching.from_check_matrix(H, weights=weights, faults_matrix=observables) num_shots = 1000 num_errors = 0 for i in range(num_shots): noise = (np.random.random(H.shape[1]) < error_probability).astype(np.uint8) syndrome = H@noise % 2 predicted_observables = matching.decode(syndrome) actual_observables = observables@noise % 2 num_errors += not np.array_equal(predicted_observables, actual_observables) print(num_errors) # prints 6
However, running it locally prints 8 instead. Here is my local environment:
8
contourpy==1.2.0 cycler==0.12.1 fonttools==4.48.1 kiwisolver==1.4.5 matplotlib==3.8.2 networkx==3.2.1 numpy==1.26.4 packaging==23.2 pillow==10.2.0 PyMatching==2.1.0 pyparsing==3.1.1 python-dateutil==2.8.2 retworkx==0.14.0 rustworkx==0.14.0 scipy==1.12.0 six==1.16.0 stim==1.12.1
The text was updated successfully, but these errors were encountered:
I'm realizing this should be nondeterministic?
Sorry, something went wrong.
No branches or pull requests
This is the second example
README.md
:However, running it locally prints
8
instead. Here is my local environment:The text was updated successfully, but these errors were encountered: