def test_replace_parameters_correctly_gives_instance_with_correctly_set_parameters(
        self, ):
        theta = sympy.Symbol("theta")
        gate = MatrixFactoryGate("V", example_one_qubit_matrix_factory, (1, 2),
                                 1)

        new_gate = gate.replace_params((theta, 0.5))

        assert new_gate == MatrixFactoryGate("V",
                                             example_one_qubit_matrix_factory,
                                             (theta, 0.5), 1)
 def test_applying_dagger_and_replacing_parameters_commutes(self):
     gate = MatrixFactoryGate("V", example_one_qubit_matrix_factory, (1, 0),
                              1)
     new_params = (sympy.Symbol("theta"), 4.2)
     assert (gate.dagger.replace_params(new_params) == gate.replace_params(
         new_params).dagger)