hybridlane.devices.sandia_qscout¶
Module for all QSCOUT-related functionality [1]
Device details (sandiaqscout.hybrid)¶
The device supports up to 6 qubits (ions) and their associated motional modes. By
default, the center-of-mass (COM) modes are disabled due to their higher noise
levels, but they can be enabled by setting the enable_com_modes option to
True when initializing the device. Thus for a circuit with \(n\) qubits,
there are \(2n-2\) motional modes available by default, or \(2n\) if the COM
modes are enabled.
Wires The device supports hardware wires and virtual wires. Hardware qubits are
addressed with integers \(0\) to \(5\), while motional modes are addressed
using the Qumode object or strings of the form
"m{manifold}i{index}", where manifold is 1 for the lower motional
manifold and 0 for the upper manifold, and index is the index of the mode.
Example with hardware wires:
dev = qml.device("sandiaqscout.hybrid", use_virtual_wires=False, n_qubits=4)
@qml.set_shots(10)
@qml.qnode(dev)
def circuit():
hqml.FockState(3, [0, "m1i2"])
return hqml.expval(qml.Z(0))
print(qml.draw(circuit)())
When using hardware wires, the user is responsible for ensuring that gates adhere to any constraints. Additionally, for optimal performance, the qubits and qumodes should be chosen to maximize coupling strengths to reduce gate time. The lower manifold (1) has stronger couplings.
By default, the device uses virtual wire allocation to assign physical wires to
virtual wires based on constraints of the gates in the circuit. This can be
disabled by setting use_virtual_wires to False when initializing the
device, in which case the circuit must use only physical wires.
Example with virtual wires:
qml.decomposition.enable_graph()
dev = qml.device("sandiaqscout.hybrid", n_qubits=4)
@qml.set_shots(10)
@qml.qnode(dev)
def circuit():
hqml.FockState(3, ["q", "m"])
return hqml.expval(qml.Z("q"))
print(qml.draw(circuit, level="device")())
Note that virtual wire allocation does not yet perform any ranking for valid solutions or noise-aware compilation.
Native gates: The native gate set includes common qubit gates and some hybrid gates,
particularly implementing the Sideband ISA [2]. The native
gates are available in hybridlane.devices.sandia_qscout.ops and currently
include:
Qubit gates: \(R_\phi, R_x, R_y, R_z, S, S^\dagger, S_x, S_x^\dagger, XX, YY, ZZ\)
Hybrid gates: \(JC, AJC, xCD, yCD, zCD, xCS, BS\)
Exporting to Jaqal¶
To run on the ion trap, circuits need to be exported to the Jaqal
[3] language. Hybridlane provides the
to_jaqal() function to convert a QNode to a
Jaqal program. By using that function on a QNode bound to the QSCOUT device, the
resulting Jaqal program will be optimized for the device’s native gate set and
constraints.
Example:
dev = qml.device("sandiaqscout.hybrid", n_qubits=2)
@qml.set_shots(1024)
@qml.qnode(dev)
def circuit(alpha):
hqml.SqueezedCatState(alpha, np.pi / 2, parity="even", wires=["q", "m1i1"])
to_jaqal(circuit, level="device", precision=4)(4)
This will return a Jaqal string, where each tape of the QNode batch is encoded as a subcircuit.
from Calibration_PulseDefinitions.QubitBosonPulses usepulses *
register q[2]
subcircuit {
xCD q[1] 1 1 4.0 0.0
Rz q[1] 11.00
xCD q[1] 1 1 0.0 0.09817
yCD q[1] 1 1 -0.09817 -0.0
Sz q[1]
}
References
Submodules¶
Classes¶
Backend that prepares circuits for the Sandia QSCOUT ion trap |
|
Hardware qumode on the ion trap device. |
Functions¶
|
Returns a compilation pipeline for QscoutIonTrap device |
Gives some defaults for drawing circuits using |
|
|
|
|
Package Contents¶
- hybridlane.devices.sandia_qscout.get_compiler(optimize=True, max_qubits=None, enable_com_modes=False, use_virtual_wires=True)[source]¶
Returns a compilation pipeline for QscoutIonTrap device
- Parameters:
optimize (bool) – Whether to perform any simplifications of the circuit including cancelling inverse gates, merging consecutive rotations, and commuting controlled operators
max_qubits (int | None) – The number of qubits per circuit. If None (default), this will be inferred from each circuit. By setting this number to more qubits than are used in the circuit, this can grant access to additional qumodes.
enable_com_modes (bool) – If True, the center-of-mass qumodes are enabled. As they are likely to be very noisy due to heating, they are disabled by default.
use_virtual_wires (bool) – If True (default), the circuit may contain algorithmic (virtual) wires that will be mapped to physical wires by the compiler. If False, the circuit must contain only physical wires.
- Return type:
- hybridlane.devices.sandia_qscout.get_default_style()[source]¶
Gives some defaults for drawing circuits using
hqml.draw_mplThis adds the following styles to a quantum circuit:
- Qubits are listed before qumodes, and qumodes are plotted from low to high (in
terms of mode)
Qumodes are colored by their mode to be rainbow
This only works if drawing a circuit at the device level, after the circuit wires have been mapped to the hardware wires of the
QscoutIonTrapdevice.
- hybridlane.devices.sandia_qscout.batch_to_jaqal(batch, precision=20)[source]¶
- Parameters:
batch (Sequence[QuantumScript])
precision (int)
- Return type:
LiteralString