mstechly / vqf Goto Github PK
View Code? Open in Web Editor NEWImplementation of Variational Quantum Factoring algorithm.
License: Apache License 2.0
Implementation of Variational Quantum Factoring algorithm.
License: Apache License 2.0
@mstechly When running the pre-processing part on p*q=11*13
the code reports a factorization of 15*9
, which is incorrect. I created a minimal example:
true_p=11; true_q=13; use_true_values=True; m=true_p*true_q
apply_preprocessing = True
preprocessing_verbose = True
optimization_verbose = False
if use_true_values:
p_dict, q_dict, z_dict, clauses = create_clauses(m, true_p, true_q, apply_preprocessing, preprocessing_verbose)
else:
p_dict, q_dict, z_dict, clauses = create_clauses(m, None, None, apply_preprocessing, preprocessing_verbose)
number_of_uknowns, number_of_carry_bits = calculate_number_of_unknowns(p_dict, q_dict, z_dict)
print("Number of unknowns:", number_of_uknowns)
print("Number of carry bits:", number_of_carry_bits)
if clauses[0] == 0 and len(set(clauses)) == 1:
if number_of_uknowns == 0:
p, q = decode_solution(p_dict, q_dict)
print(f'found solution! {p}, {q}')
The link in the README, referenced by "if you're unfamiliar with it you might find my blogpost about QAOA helpful." - returns a 404 for this link:
https://github.com/mstechly/vqf/blob/master/www.mustythoughts.com/Quantum-Approximate-Optimization-Algorithm-Explained.html
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.