Bug (likely typo) in `core/serialize/serializer_test.py`

Open
#1,129 0 comments 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 1 day

@mhucka is already working on this.

Since Oct 27, 2026.

  • #1130 by @mhucka — open

Assessment

This issue has not been assessed yet.

Description

area/serialization area/tests

In test_serialize_circuit_wrong_type and test_deserialize_circuit_wrong_type, the tests pass input to serializer.serialize_circuit and serializer.deserialize_circuit, but this is incorrect; it should be passing inp.

@parameterized.parameters([{'inp': v} for v in ['wrong', 1.0, None, []]])
def test_serialize_circuit_wrong_type(self, inp):
    """Attempt to serialize invalid objects types."""
    with self.assertRaises(TypeError):
        serializer.serialize_circuit(input)  # <<<<<<<<<< here

@parameterized.parameters([{'inp': v} for v in ['wrong', 1.0, None, []]])
def test_deserialize_circuit_wrong_type(self, inp):
    """Attempt to deserialize invalid objects types."""
    with self.assertRaises(TypeError):
        serializer.deserialize_circuit(input)  # <<<<<<<<<< here
Dominant language
Python
Stars
2.2k
Forks
674
Avg merge
1d 14h
Merged PRs (30d)
5

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from tensorflow/quantum

All issues in tensorflow/quantum

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.