StarTopologyGateSet

class StarTopologyGateSet(name, n_qubits, *, spam_qubits=(0,), **properties)

Topology axis: a gate set defined on a star topology.

The central qubit is qubit 0, and every outer qubit is connected to it by a directed native two-qubit interaction. This class supplies only the topology (topology and logical_permutation_circuit) and the device’s state preparation and readout. It leaves construction abstract, so it is combined with a construction class such as EntanglerGateSet (e.g. class CROTGateSet(EntanglerGateSet, StarTopologyGateSet)), or subclassed directly by a gate set that supplies its own native-circuit hooks.

spam_qubits names the qubits whose state preparation and measurement (SPAM) the device performs together. A reset of any of them resets all of them at once. One readout resolves their populations together, so it measures \(Z\) on each of them and every product of those from the same data. A qubit outside the group gets \(|0\rangle\) by an exchange with a reset qubit. The default, (0,), resets and reads the central qubit alone.

Parameters:
  • name (str) – Gate set name.

  • n_qubits (int) – Number of qubits in the star register, including the central qubit 0.

  • spam_qubits (Sequence[int]) – Qubits the device resets and reads out together.

  • **properties (Any) – Gate properties, as GateSet takes them.

Raises:

ValidationError – If spam_qubits is empty, repeats a qubit or names one outside the register.

Attributes

gate_durations

Return the duration of every native gate that has one.

gate_errors

Return the error of every native gate that has one.

native_gates

Return the native gates supported by the gate set.

placements

Return where a native entangler sits, and which one.

reserved_qubits_by_gate

Return the qubits every native gate reserves while it runs.

routing_edges

Return the topology entries usable for pairwise routing.

spam_qubits

Return the qubits the device resets and reads out together.

topology

Return the qubit set every native entangling gate can be built on.

Methods

gate_duration(gate)

Return a native gate's duration, or None when it has none.

gate_error(gate)

Return a native gate's average gate infidelity on its own qubits, or None when it has none.

lower_resets(circuit)

Rewrite a circuit's resets as the resets the device performs.

pauli_readout_native(pauli_readout[, ...])

Return the native readout a requested Pauli string is realized through by default.

pauli_readouts_native()

Return every Pauli string the hardware reads out directly.

random_circuit(n_gates[, seed])

Generate a random circuit in the native gate set.

reserved_qubits(gate)

Return the qubits a native gate reserves while it runs.

reset_circuit(qubits)

Build the circuit resetting these qubits to \(|0\rangle\).

with_properties(*[, ...])

Return a copy of this gate set with new errors, durations or reserved qubits.