quantum-computer
v1.0.4
Published
A powerful JavaScript quantum computing simulator! Supports multi-qubit operations.
Readme
�� � �<�b�o�d�y�>� � � � �<�d�i�v� �c�l�a�s�s�=�"�c�o�n�t�a�i�n�e�r�"�>� � � � � � �<�h�1�>��&� �Q�u�a�n�t�u�m� �S�i�m�u�l�a�t�o�r� �J�S�<�/�h�1�>� � � � � � �<�p�>�=� �<�s�t�r�o�n�g�>�Q�u�a�n�t�u�m� �S�i�m�u�l�a�t�o�r� �J�S�<�/�s�t�r�o�n�g�>� �i�s� �a� �p�o�w�e�r�f�u�l� �q�u�a�n�t�u�m� �c�o�m�p�u�t�i�n�g� �s�i�m�u�l�a�t�o�r� �b�u�i�l�t� �w�i�t�h� �J�a�v�a�S�c�r�i�p�t�.� �I�t� �e�n�a�b�l�e�s� �y�o�u� �t�o� �s�i�m�u�l�a�t�e� �m�u�l�t�i�-�q�u�b�i�t� �q�u�a�n�t�u�m� �c�i�r�c�u�i�t�s�,� �a�p�p�l�y� �f�u�n�d�a�m�e�n�t�a�l� �q�u�a�n�t�u�m� �g�a�t�e�s�,� �a�n�d� �p�e�r�f�o�r�m� �<�s�t�r�o�n�g�>�Q�u�a�n�t�u�m� �F�o�u�r�i�e�r� �T�r�a�n�s�f�o�r�m� �(�Q�F�T�)�<�/�s�t�r�o�n�g�>� �a�n�d� �<�s�t�r�o�n�g�>�I�n�v�e�r�s�e� �Q�F�T� �(�I�Q�F�T�)�<�/�s�t�r�o�n�g�>� �w�i�t�h� �a�c�c�u�r�a�t�e� �s�t�a�t�e� �e�v�o�l�u�t�i�o�n� �a�n�d� �m�e�a�s�u�r�e�m�e�n�t�.�<�/�p�>� � � � �<�h�r�>� � � � �<�h�2�>�<�� �F�e�a�t�u�r�e�s�<�/�h�2�>� � � � � � �<�u�l�>� � � � � � � � � � �<�l�i�>�' �<�s�t�r�o�n�g�>�M�u�l�t�i�-�Q�u�b�i�t� �S�i�m�u�l�a�t�i�o�n�<�/�s�t�r�o�n�g�>� � �S�u�p�p�o�r�t�s� �q�u�a�n�t�u�m� �c�i�r�c�u�i�t�s� �w�i�t�h� �m�u�l�t�i�p�l�e� �q�u�b�i�t�s�.�<�/�l�i�>� � � � � � � � � � �<�l�i�>�' �<�s�t�r�o�n�g�>�Q�u�a�n�t�u�m� �G�a�t�e�s�<�/�s�t�r�o�n�g�>� � �I�n�c�l�u�d�e�s� �s�t�a�n�d�a�r�d� �g�a�t�e�s� �l�i�k�e� �<�s�t�r�o�n�g�>�H�a�d�a�m�a�r�d� �(�H�)�,� �P�a�u�l�i� �(�X�,� �Y�,� �Z�)�,� �a�n�d� �P�h�a�s�e� �G�a�t�e�s�<�/�s�t�r�o�n�g�>�.�<�/�l�i�>� � � � � � � � � � �<�l�i�>�' �<�s�t�r�o�n�g�>�Q�u�a�n�t�u�m� �F�o�u�r�i�e�r� �T�r�a�n�s�f�o�r�m� �(�Q�F�T�)�<�/�s�t�r�o�n�g�>� � �I�m�p�l�e�m�e�n�t�s� �Q�F�T� �f�o�r� �f�a�s�t� �q�u�a�n�t�u�m� �s�t�a�t�e� �t�r�a�n�s�f�o�r�m�a�t�i�o�n�.�<�/�l�i�>� � � � � � � � � � �<�l�i�>�' �<�s�t�r�o�n�g�>�I�n�v�e�r�s�e� �Q�F�T� �(�I�Q�F�T�)�<�/�s�t�r�o�n�g�>� � �R�e�v�e�r�s�e�s� �Q�F�T� �f�o�r� �q�u�a�n�t�u�m� �s�i�g�n�a�l� �p�r�o�c�e�s�s�i�n�g�.�<�/�l�i�>� � � � � � � � � � �<�l�i�>�' �<�s�t�r�o�n�g�>�M�e�a�s�u�r�e�m�e�n�t� �&� �A�v�e�r�a�g�i�n�g�<�/�s�t�r�o�n�g�>� � �S�i�m�u�l�a�t�e�s� �q�u�a�n�t�u�m� �m�e�a�s�u�r�e�m�e�n�t� �w�i�t�h� �d�e�p�t�h�-�b�a�s�e�d� �a�v�e�r�a�g�i�n�g� �f�o�r� �r�e�l�i�a�b�l�e� �r�e�s�u�l�t�s�.�<�/�l�i�>� � � � � � �<�/�u�l�>� � � � �<�h�r�>� � � � �<�h�2�>�=���� �I�n�s�t�a�l�l�a�t�i�o�n�<�/�h�2�>� � � � � � �<�p�>�C�l�o�n�e� �t�h�e� �r�e�p�o�s�i�t�o�r�y� �a�n�d� �i�n�s�t�a�l�l� �d�e�p�e�n�d�e�n�c�i�e�s�:�<�/�p�>� � � � � � �<�p�r�e�>�<�c�o�d�e�>�n�p�m� �i� �q�u�a�n�t�u�m�-�c�o�m�p�u�t�e�r�<�/�c�o�d�e�>�<�/�p�r�e�>� � � � �<�h�2�>�=��� �U�s�a�g�e�<�/�h�2�>� � � � � � �<�h�3�>�R�u�n� �t�h�e� �s�i�m�u�l�a�t�o�r�:�<�/�h�3�>� � � � � � �<�p�r�e�>�<�c�o�d�e�>�n�o�d�e� �c�i�r�c�.�j�s�<�/�c�o�d�e�>�<�/�p�r�e�>� � � � �<�h�3�>�E�x�a�m�p�l�e�:� �A�p�p�l�y�i�n�g� �Q�F�T� �&� �I�Q�F�T�<�/�h�3�>� � � � � � �<�p�r�e�>�<�c�o�d�e�>�c�o�n�s�t� �c�i�r�c�u�i�t� �=� �n�e�w� �C�i�r�q�(�3�)�;� � �c�i�r�c�u�i�t�.�a�p�p�l�y�Q�F�T�(�)�;� � �c�i�r�c�u�i�t�.�m�e�a�s�u�r�e�A�l�l�(�)�;� � �c�i�r�c�u�i�t�.�a�p�p�l�y�I�Q�F�T�(�)�;� � �c�i�r�c�u�i�t�.�m�e�a�s�u�r�e�A�l�l�(�)�;�<�/�c�o�d�e�>�<�/�p�r�e�>� � � � �<�h�r�>� � � � �<�h�2�>�>��� �H�o�w� �I�t� �W�o�r�k�s�<�/�h�2�>� � � � � � �<�u�l�>� � � � � � � � � � �<�l�i�>�<�s�t�r�o�n�g�>�S�t�a�t�e� �I�n�i�t�i�a�l�i�z�a�t�i�o�n�<�/�s�t�r�o�n�g�>� � �C�r�e�a�t�e�s� �a� �q�u�a�n�t�u�m� �s�t�a�t�e� �v�e�c�t�o�r�.�<�/�l�i�>� � � � � � � � � � �<�l�i�>�<�s�t�r�o�n�g�>�G�a�t�e� �O�p�e�r�a�t�i�o�n�s�<�/�s�t�r�o�n�g�>� � �A�p�p�l�i�e�s� �u�n�i�t�a�r�y� �t�r�a�n�s�f�o�r�m�a�t�i�o�n�s� �t�o� �s�i�m�u�l�a�t�e� �q�u�a�n�t�u�m� �e�v�o�l�u�t�i�o�n�.�<�/�l�i�>� � � � � � � � � � �<�l�i�>�<�s�t�r�o�n�g�>�Q�F�T� �&� �I�Q�F�T�<�/�s�t�r�o�n�g�>� � �T�r�a�n�s�f�o�r�m�s� �a�n�d� �r�e�c�o�n�s�t�r�u�c�t�s� �q�u�a�n�t�u�m� �s�t�a�t�e�s�.�<�/�l�i�>� � � � � � � � � � �<�l�i�>�<�s�t�r�o�n�g�>�M�e�a�s�u�r�e�m�e�n�t�<�/�s�t�r�o�n�g�>� � �C�o�l�l�a�p�s�e�s� �q�u�a�n�t�u�m� �s�t�a�t�e�s� �a�n�d� �a�v�e�r�a�g�e�s� �r�e�s�u�l�t�s� �o�v�e�r� �m�u�l�t�i�p�l�e� �r�u�n�s�.�<�/�l�i�>� � � � � � �<�/�u�l�>� � � � �<�h�2�>�<د� �F�u�t�u�r�e� �E�n�h�a�n�c�e�m�e�n�t�s�<�/�h�2�>� � � � � � �<�u�l�>� � � � � � � � � � �<�l�i�>�=�9� �S�u�p�p�o�r�t� �f�o�r� �c�u�s�t�o�m� �q�u�a�n�t�u�m� �g�a�t�e�s�<�/�l�i�>� � � � � � � � � � �<�l�i�>�=�9� �E�n�t�a�n�g�l�e�m�e�n�t� �o�p�e�r�a�t�i�o�n�s�<�/�l�i�>� � � � � � � � � � �<�l�i�>�=�9� �G�r�o�v�e�r� s� �&� �S�h�o�r� s� �a�l�g�o�r�i�t�h�m� �i�m�p�l�e�m�e�n�t�a�t�i�o�n�<�/�l�i�>� � � � � � �<�/�u�l�>� � � � �<�h�2�>�>�� �C�o�n�t�r�i�b�u�t�i�n�g�<�/�h�2�>� � � � � � �<�p�>�F�o�r�k�,� �i�m�p�r�o�v�e�,� �a�n�d� �s�u�b�m�i�t� �a� �p�u�l�l� �r�e�q�u�e�s�t�!� �A�l�l� �c�o�n�t�r�i�b�u�t�i�o�n�s� �a�r�e� �w�e�l�c�o�m�e�.�<�/�p�>� � � � �<�h�3�>�=�� �G�i�t�H�u�b� �R�e�p�o�s�i�t�o�r�y�:� �<�a� �h�r�e�f�=�"�#�"�>�Q�u�a�n�t�u�m� �S�i�m�u�l�a�t�o�r� �J�S�<�/�a�>�<�/�h�3�>� � �<�/�d�i�v�>� � � � �<�/�b�o�d�y�>� � �
