It would be nice to have functionality whereby codes can be constructed one stabilizer/qubit at a time. e.g.
qcode = StabilizerCode()
qcode.add_stabilizer(00001111)
qcode.add_stabilizer(11110000)
The code's properties will change as stabilizers are added. How can make sure that the code properties are updated dynamically?
Solution 1 (Slow)
Add a method StabilizerCode.update_code_attributes() every time a new stabilizer is added.
- This would get quite slow if we are adding 1000s of stabilizers.
Solution 2 (Faster)
- Make all current attributes private.
- Write getters for each attributes.
- Set a paramters
_code_state_changed: bool
- Each @Property getter should check whether
_code_state_changed is set to true. If yes, then the update_code_params function should be called.
Please any other ideas you might have...
@LiamVS99 @noszitomi
It would be nice to have functionality whereby codes can be constructed one stabilizer/qubit at a time. e.g.
The code's properties will change as stabilizers are added. How can make sure that the code properties are updated dynamically?
Solution 1 (Slow)
Add a method
StabilizerCode.update_code_attributes()every time a new stabilizer is added.Solution 2 (Faster)
_code_state_changed: bool_code_state_changedis set to true. If yes, then the update_code_params function should be called.Please any other ideas you might have...
@LiamVS99 @noszitomi