<jupyter_start><jupyter_text>Using package block_sphere Few Gates:- h_gate()- x_gate()- y_gate()- z_gate()- sqrt_y_gate()- s_gate()- custom_gate(x,y,z,angle, label) here A=(x,y,z) defines OA is axis of rotation<jupyter_code># !pip install pycairo
# !pip install pylatex
# !pip install drawSvg
# !pip install latextools
# !pip install pdflatex
# !pip install hyperbolic
# !pip install imageio_ffmpeg

from IPython.display import clear_output
clear_output()
import bloch_sphere
from bloch_sphere.animate_bloch import do_or_save_animation, AnimState,draw_bloch_sphere
from bloch_sphere.animate_bloch_compare import render_animation

@do_or_save_animation('my_animation', save=False, fps=20, preview=True)
# Or
# @do_or_save_animation('my_animation', save='gif', fps=20, preview=False)
# @do_or_save_animation('anim_zgate', save='mp4', fps=20, preview=True)
def animate(state: AnimState):
    state.y_gate()
    # state.y_gate()
    # state.s_gate()
    # state.s_gate()
    ...
    state.wait() 
@do_or_save_animation('my_animation', save=False, fps=20, preview=True)
def animate(state:AnimState):
        state.custom_gate(1,0,0,r_pi=1,label="RX Gate")
        state.wait(2)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.129783693843594, 'fraction_numerical': 0.011647254575707155, 'mean_word_length': 6.335365853658536, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '483736', 'license': 'MIT', 'n_tokens_mistral': 470, 'n_tokens_neox': 443, 'n_words': 88, 'path': 'examples/notebook/Test-I bloch_sphere package.ipynb', 'repo_name': 'nama-aman/bloch_sphere', 'size': '1202'}