spheres.spin_circuits.pytket.spin_sym_pytket

spheres.spin_circuits.pytket.spin_sym_pytket(spin)[source]

Given a spin-j state, constructs a qiskit circuit which prepares that state as a permutation symmetric state of 2j qubits. The circuit is probabalistic and depends on the control qubits being postselected on the up/0 state.

Returns a dictionary whose elements are:
  • “circuit”: Qiskit circuit

  • “spin_qubits”: Qiskit quantum register for the qubits encoding the spin

  • “cntrl_qubits”: Qiskit quantum register for the control qubits

  • “cntrl_bits”: Qiskit classical register for the control measurements

  • “postselect_on”: “cntrl_bits” (which classical register to control on)

  • “postselection”: [0] x len(cntrl_bits) (postselection state to impose)

Parameters

spin (qt.Qobj) – Spin-j state.

Returns

circuit_info

Return type

dict