I'm a bit confused about the role of Boolean/Heyting algebras in logic. It seems to me that there are two different facets of their usage that I'm trying to reconcile. The first one is the usual construction of a Boolean/Heyting algebra from equivalence classes of sentences of a theory, in classical/intuitionistic propositional logic - the Lindenbaum-Tarski algebra of the theory.
The other one is using Boolean/Heyting algebras as models or a domain of generalised truth values. By assigning to my propositional symbols values from an arbitrary 2-element Boolean/Heyting algebra, the connectives like and, not, or, and implication follow from the structure of the algebra. Can this be generalised beyond a 2-value Boolean algebra? Enderton, when introducing truth assignments, says that "[While we commit ourselves to 2-valued logic] a particularly interesting case is that for which the truth values form something called a complete Boolean algebra." Does this mean I can have "two-valued" models, "three-valued" models and so on, of a classical propositional theory?
The only connection between these two views I think is that we can view truth assignments/valuations/models of classical propositional logic as a Boolean homomorphism from the corresponding Lindenbaum–Tarski algebra to the 2-element Boolean algebra. Do I also get homomorphisms from a Lindenbaum-Tarski algebra to a n-element Boolean algebra that correspond to "n-valued" models of my theory? Does this work the same for intuitionistic propositional logic/Heyting algebras correspondingly?
What is the generalised connection between these two facets? Awodey in his Category Theory book also hints to a two-faceted correspondence: "The exact correspondence is given by mutually inverse constructions between Heyting algebras and IPCs.We briefly indicate one direction of this correspondence, leaving the other one to the reader’s ingenuity." page 133. Is the "other direction" of this correspondence what I'm looking for?
Another use of Heyting/Boolean algebras is in topos theory, where the structure of a subobject classifier in a topos is generally a Heyting algebra. Is it a Heyting algebra as in the first notion i.e the Lindenbaum algebra of the internal logic or in the second notion i.e as a model/domain of possible truth values of the internal logic. I'd say its the second one but I'm not so sure.
Finally, how does this mesh with Quantum logic? Quantum logic is supposed to arise from the orthocomplemented lattice of closed subspaces of a Hilbert space. So is this lattice the model of some logic? Or is the Lindenbaum-Tarski algebra of this logic? My hunch is that the lattice arising from a specific Hilbert space, is a model that corresponds to a specific quantum system, but then what is the logic whose model that is? Every discussion about quantum logive I've read deals with the lattice part but I can't find anything on the actual "logic", as in the actual formal language with proposition symbols, connectives etc.