mafaldaramoa / vqe Goto Github PK
View Code? Open in Web Editor NEWVQE Dissertation Project
VQE Dissertation Project
Hi,
I don't know if you still care about this project, given that it seems you have finished your masters (congrats!). If you don't care about keeping it up to date, that is perfectly reasonable, but do still please let me know how I can cite this if I end up publishing anything based on this.
If you would like to keep things up to date, I've found the following bug in CIRQ_UCCSD_VQE.ipynb:
Using the newest versions of OF and cirq, a KeyError occurs in the measureString function, which I believe is caused because cirq no longer saves the columns from identity Paulis in the results.data after this section:
if (pauliString != "I"*len(qubits)):
s = cirq.Simulator()
results = s.run(circuit,repetitions = repetitions)
It can be fixed by changing the for loop over range(repetitions) to the following:
for j in range(repetitions):
meas = 1
non_identities = 0
for i in range(len(qubits)):
if (pauliString[i] != "I"):
meas = meas*(1-2*np.array(results.data)[j][non_identities]) # was meas = meas*(1-2*results.data[i][j]), but that failed. I guess Cirq changed how they save results.data
non_identities += 1 # This was not here, but is necessary because Cirq no longer adds identity matrices to the results.data
total += meas
Again, you are obviously under no obligation to keep this up to date, and I would love to credit you properly because this has been a great starting point for me in OF and Cirq, so really the main reason I'm posting this is so I can cite this in the future.
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.