Skip to content

Commit

Permalink
Hardware compilation (v8.13)
Browse files Browse the repository at this point in the history
  • Loading branch information
WrathfulSpatula committed Jun 17, 2023
1 parent f146c9e commit 096e2b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ For example:

is a valid file, with 0 ancillae. It is theoretically relatively easy to prepare this result of unitary circuit simulation on a quantum hardware device: first prepare the stabilizer state, (with purely Clifford gates,) then apply the (potentially non-Clifford) 2x2 matrices over the same sequential qubit index order. This can represent a universal quantum state of the logical qubits.

`QrackSimulator` now has a method `set_hardware_encoded()`. The default value of this setting is `false`, which causes ancilla "magic state" qubit "channels" to be encoded depending on _post-selection_. If this setting is `false`, hardware decoding depends on the ancilla qubits all measuring as \|0>, for the correct overall state preparation. However, if this setting is `true`, then every other ancilla qubit (starting with the second-occurring ancilla) is an "open channel" that starts out coding an identity gate, (or "no operation,") but can be re-encoded to avoid the post-selection requirement. To do so, after preparing the state as described in the file, perform `H` gate on all auxiliary, identity-encoding ancilla channels, act `CZ` from each "coding" ancilla to its "identity" partner, then act `H` again on the auxiliary, identity-encoding ancilla. Now, terminal measurement can occur without post-selection, and all logical qubits are deterministically in the intended state, in the ideal.
`QrackSimulator` now has a method `set_hardware_encoded()`. The default value of this setting is `false`, which causes ancilla "magic state" qubit "channels" to be encoded depending on post-selection. If this setting is `false`, hardware decoding depends on the ancilla qubits all measuring as \|0>, for the correct overall state preparation. However, if this setting is `true`, then every other ancilla qubit (starting with the second-occurring ancilla) is an "open channel" that starts out coding an identity gate, (or "no operation,") but can be re-encoded to avoid the post-selection requirement. To do so, after preparing the state as described in the file, perform `H` gate on all auxiliary, identity-encoding ancilla channels, act `CZ` from each "coding" ancilla to its "identity" partner, then act `H` again on the auxiliary, identity-encoding ancilla. Now, terminal measurement can occur without post-selection, and all logical qubits are deterministically in the intended state, in the ideal.

.. toctree::
:maxdepth: 2
Expand Down

0 comments on commit 096e2b7

Please sign in to comment.