Skip to content

Projecting parts of SeleneQuestStates and representing substates #112

@GBoydQ

Description

@GBoydQ

In guppyalgos, we have found it very convenient to have methods that return new SeleneQuestStates but acting on a smaller number of qubits, either through projection, or simply discarding qubits that are not entangled. This is because it makes it much easier to analyse and compare smaller statevectors, and often a lot of the total statevector is irrelevant anyway (ancilla that are returned to 0 etc).
The current way that projection works is that you supply some bitstring that is the desired state of the specified_qubits, and then the relevant projected state on the unspecified qubits is returned.
The problem with this is if you want to do a series of these operations, then your simulation level specified_qubits may have indices that are larger than the total number of qubits in this subsystem state. You have to then keep track of which qubit indices are no longer present and recalculate indices to the 'local' subsystem state.

Some vague ideas for solutions I have thrown together examples of are:

  • a wrapper for SeleneQuestState that silently (probably not desirable) does this reindexing
  • a ProjectedState that is essentially a TracedState but also has a set_specified_qubits() method to handle this logic

(happy to contribute this if it would be helpful, I would need access as I currently cannot add a branch to remote)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions