unitary
unitary copied to clipboard
Track independent sets of squares in Quantum TicTacToe
Disjoint sets of entangled squares can use separate QuantumWorlds; when performing moves, involved squares can be added to new or existing QuantumWorlds. Then, for updating the board (visual representation), we only need to re-sample QuantumWorlds that changed due to the last move, saving resources.
Alternatively, this could be a feature we automatically keep track of in the QuantumWorld object (with a force re-sample option?)
Live discussion:
- Good performance hack, especially for those paying for access to quantum hardware by the gate.
- However, needs more thought and design before moving forward:
- In general, using the cache might not be want the user wants in all cases.
- Need to figure out what the reasonable default should be, and weigh the complexity of adding this as an option.
- Could also add query about which qubits are entangled.
- Consider for v2?