-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
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
New: Limited support for barriers #12
Conversation
020e2d4
to
4a0d542
Compare
@@ -28,17 +28,6 @@ | |||
from ._qcs_job import RigettiQCSJob | |||
|
|||
|
|||
def _remove_barriers(circuit: QuantumCircuit) -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Barrier handling has been moved into the RigettiQCSJob
class, as there's no straightforward way to replace the instruction with a pragma here
4a0d542
to
ae21aa1
Compare
def test_init__circuit_with_barrier__qubit_subset(backend: RigettiQCSBackend, mocker: MockerFixture): | ||
circuit = QuilCircuit(QuantumRegister(2, "q"), ClassicalRegister(2, "ro")) | ||
circuit.h(0) | ||
circuit.barrier(0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that for now, we're taking a naive approach and only "translating" barriers applied to all qubits -- even if it might still be possible to translate it with some deeper/more complex analysis (like in this example, since the only qubit involved is q0).
10a163a
to
7b00a98
Compare
): | ||
make_job(backend, circuit, qc) | ||
|
||
program: Program = quil_to_native_quil_spy.call_args[0][0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
subterfuge!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Smash that merge button.
7b00a98
to
cb45db1
Compare
🎉 This PR is included in version 0.4.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
For QASM
barrier
s affecting all qubits, replace with an empty QuilPRESERVE_BLOCK
. Otherwise, omit.Closes #7