from_xeedq_circuit

from_xeedq_circuit(circuit, gateset)

Read a circuit written in the gate names of the XeedQ toolchain.

The result is a circuit compile() takes:

  • a laser_reset on exactly gateset.spam_qubits becomes a reset on each of them, between two barriers;

  • crotx with no parameter becomes crotxpi2. QUASAR’s own crotx takes an angle, and stays as it is;

  • every other instruction stays as it is.

Parameters:
  • circuit (QuantumCircuit) – Circuit in the toolchain’s gate names.

  • gateset (FixedCROTGateSet) – The gate set the circuit is to be compiled for.

Return type:

QuantumCircuit

Returns:

The circuit in QUASAR’s gate names, with the same registers and global phase.

Raises:

ValidationError – If gateset is not a FixedCROTGateSet, or a laser_reset is not on exactly gateset.spam_qubits.