Open
Conversation
8df89b8 to
e5edf57
Compare
Ising instances can have many variables but almost no bias terms so a dictionary is naturally a better choice in order to account for sparse bias vectors
Ising instances can make use of arbitrary qubits especially when we have to map to a QPU hardware graph. Makes much more sense to extract the qubit indices and compute n_nodes like this.
allows for user-defined mixer/driver hamiltonian in order to enforce hard constraints tests & docs also updated
added extensive documentation for the Ising QAOA wrapper added images added ising_qaoa to index.rst
added extensive documentation for the Ising QAOA wrapper added images added ising_qaoa to index.rst
the embedding dictionary is a great tool for QPU users since it allows a manual mapping to the hardware using the ``embedding`` one can avoid dead qubits and choose the qubits with the best specs for execution
accomodating for the new ``embedding`` argument in the QAOA class. the embedding removes the need for qubit_indices QAOA solution string must be unembedded since it will be ordered by indices in the logical space
in order to get the correct wavefunction for analysis we need to get the correct number of states. if we shift qubits 0,1 to qubits 4,5 then we have 2**5 possible states in terms of the wavefunction (most of them will be uninteresting to us)
in a seperate pull request to the pyquil repo we will propose to remove this sequence of gates that implement the identity operation. First of all, the operation is superfluous and second of all it messes up the wavefunction calculation since qubit 0 was hardcoded to always be used for this sequence of gates. It becomes a problem if we embedded our problem on qubit 3,4 and want to get the wavefunction since it will always try to involve qubit 0.
doing it this way removes the need for code repetition in maxcut_qaoa, ising_qaoa and so on. this way we handle the unembedding logic in the get_string() method and make it much easier to use for the user.
included support for argument change from n_qubits to qubits (list)
e5edf57 to
d8d92ce
Compare
704e49a to
d8d92ce
Compare
Adding measurement instructions and then running with measure_and_run makes all trials sample the same state.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR depends on PR #141 and implements the following changes:
embeddingwhich is a way of mapping the logical problem to the QPU hardware graph. One maps each logical qubit to a physical qubit of choice by means of a dictionaryRequires PR #373 to be accepted in pyquil in order for all tests to pass. (rigetti/pyquil#373)